Skip to content

Commit

Permalink
chore(devcontainer): polish
Browse files Browse the repository at this point in the history
  • Loading branch information
helmut-hoffer-von-ankershoffen committed Dec 25, 2024
1 parent 6f5554e commit 443a67b
Show file tree
Hide file tree
Showing 10 changed files with 136 additions and 123 deletions.
7 changes: 5 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM mcr.microsoft.com/devcontainers/python:1-3.11-bullseye

RUN apt update -y && \
apt install -y --no-install-recommends curl gnupg2 jq less libcairo2 nano procps psmisc && \
RUN curl --proto '=https' --tlsv1.2 -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt update -y && \
apt install -y --no-install-recommends curl gnupg2 jq less libcairo2 nano nodejs procps psmisc && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN npm install --ignore-scripts -g @modelcontextprotocol/inspector@0.3.0
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ghcr.io/devcontainers/features/java:1": {},
"ghcr.io/devcontainers/features/node:1": {}
},
"postCreateCommand": "npm install --ignore-scripts -g @modelcontextprotocol/inspector@0.3.0 && rm -rf .nox && rm -rf .venv && uv sync --frozen && uv venv && source .venv/bin/activate && git config --global --add safe.directory /workspaces/starbridge && uv run pre-commit install",
"postCreateCommand": ".devcontainer/postCreateCommand",
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
Expand All @@ -19,6 +19,7 @@
"charliermarsh.ruff",
"codecov.codecov",
"donjayamanne.python-environment-manager",
"fill-labs.dependi",
"github.vscode-github-actions",
"gruntfuggly.todo-tree",
"kaih2o.python-resource-monitor",
Expand Down
7 changes: 7 additions & 0 deletions .devcontainer/postCreateCommand
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

git config --global --add safe.directory /workspaces/starbridge
rm -rf .nox
rm -rf .venv
uv sync --frozen
uv run pre-commit install
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ repos:
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-illegal-windows-names
- id: check-merge-conflict
args: ["--assume-in-merge"]
Expand All @@ -30,7 +29,7 @@ repos:
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
exclude: "^tests/fixtures/|settings.json$"
exclude: "^tests/fixtures/|.json$"
- id: fix-byte-order-marker
- id: fix-encoding-pragma
args: ["--remove"]
Expand Down
25 changes: 13 additions & 12 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"recommendations": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.debugpy",
"charliermarsh.ruff",
"codecov.codecov",
"donjayamanne.python-environment-manager",
"fill-labs.dependi",
"github.vscode-github-actions",
"gruntfuggly.todo-tree",
"kaih2o.python-resource-monitor",
"charliermarsh.ruff",
"tamasfe.even-better-toml",
"mikestead.dotenv",
"wayou.vscode-todo-highlight",
"gruntfuggly.todo-tree",
"github.vscode-github-actions",
"codecov.codecov",
"oderwat.indent-rainbow",
"ms-azuretools.vscode-docker",
"ms-python.debugpy",
"ms-python.python",
"ms-python.vscode-pylance",
"oderwat.indent-rainbow",
"sonarsource.sonarlint-vscode",
"tamasfe.even-better-toml",
"tomoki1207.pdf",
"sonarsource.sonarlint-vscode"
"wayou.vscode-todo-highlight"
]
}
}
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"ruff.lint.args": [
"--ignore=F401"
],
"python.terminal.activateEnvInCurrentTerminal": true,
"python.defaultInterpreterPath": ".venv/bin/python",
"python.testing.promptToConfigure": false,
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
Expand Down
16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ authors = [
]
requires-python = ">=3.11,<4.0"
dependencies = [
"pydantic>=2.10.2",
"pydantic>=2.10.4",
"pydantic-settings>=2.7.0",
"mcp>=1.0.0",
"mcp>=1.1.2",
"griffe>=1.5.1",
"typer>=0.13.0",
"typer>=0.15.1",
"atlassian-python-api>=3.41.16",
"cairosvg>=2.7.1",
"python-dotenv>=1.0.1",
"svglib>=1.5.1",
"logfire[system-metrics]>=2.7.1",
"logfire[system-metrics]>=2.11.0",
"opentelemetry-api>=1.29.0",
"opentelemetry-instrumentation>=0.50b0",
"opentelemetry-instrumentation-httpx>=0.50b0",
Expand Down Expand Up @@ -96,15 +96,15 @@ dev = [
"pip-audit>=2.7.3",
"pip-licenses>=5.0.0",
"pre-commit>=4.0.1",
"pyright>=1.1.389",
"pytest>=8.3.3",
"pytest-asyncio>=0.24.0",
"pyright>=1.1.391",
"pytest>=8.3.4",
"pytest-asyncio>=0.25.0",
"pytest-cov>=6.0.0",
"pytest-docker>=3.1.1",
"pytest-env>=1.1.5",
"pytest-xdist[psutil]>=3.6.1",
"nox>=2024.10.9",
"ruff>=0.3.0",
"ruff>=0.8.4",
"tomli>=2.1.0",
]

Expand Down
2 changes: 1 addition & 1 deletion tests/starbridge_cli_claude_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_claude_info(runner):
"""Check info spots running process uv"""
result = runner.invoke(cli, ["claude", "info"])
assert result.exit_code == 0
assert "starbridge" in result.stdout
assert "pid" in result.stdout


def test_claude_log(runner: CliRunner, tmp_path: Path) -> None:
Expand Down
2 changes: 1 addition & 1 deletion tests/starbridge_cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_info(runner):
"""Check processes exposed and version matching."""
result = runner.invoke(cli, ["info"])
assert result.exit_code == 0
assert "'starbridge'" in result.stdout
assert "'pid'" in result.stdout
assert f"'version': '{__version__}'" in result.stdout


Expand Down
Loading

0 comments on commit 443a67b

Please sign in to comment.