diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d0d31f7..30e84b8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,37 +2,36 @@ // README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose { "name": "FFC Extension", - // Update the 'dockerComposeFile' list if you have more compose files or use different names. // The .devcontainer/docker-compose.yml file contains any overrides you need/want to make. "dockerComposeFile": [ "../docker-compose.yaml", "docker-compose.yml" ], - // The 'service' property is the name of the service for the container that VS Code should // use. Update this value and .devcontainer/docker-compose.yml to the real service name. "service": "app", - // The optional 'workspaceFolder' property is the path VS Code should open by default when // connected. This is typically a file mount in .devcontainer/docker-compose.yml "workspaceFolder": "/app", - + "mounts": [ + "source=${localEnv:HOME}/.ssh,target=/root/.ssh,type=bind", + "source=${localEnv:HOME}/.claude,target=/root/.claude,type=bind", + "source=${localEnv:HOME}/.claude.json,target=/root/.claude.json,type=bind" + ], // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, - // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], - // Uncomment the next line if you want start specific services in your Docker Compose config. - "runServices": ["db", "test_db"], - + "runServices": [ + "db", + "test_db" + ], // Uncomment the next line if you want to keep your containers running after VS Code shuts down. // "shutdownAction": "none", - // Uncomment the next line to run commands after the container is created. // "postCreateCommand": "cat /etc/os-release", - // Configure tool-specific properties. "customizations": { "vscode": { @@ -45,9 +44,15 @@ "settings": { "python.defaultInterpreterPath": "/opt/venv/bin/python" } + }, + "jetbrains": { + "backend": "PyCharm", + "plugins": [ + "com.anthropic.code.plugin", + "org.sonarlint.idea" + ] } } - // Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "devcontainer" } diff --git a/.gitignore b/.gitignore index 82784e1..540a81a 100644 --- a/.gitignore +++ b/.gitignore @@ -162,13 +162,6 @@ cython_debug/ # bandit report bandit.json -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -.idea/ - # Postgres data pg_data/ test_pg_data/ diff --git a/dev.Dockerfile b/dev.Dockerfile index 75f526e..1680971 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -1,12 +1,29 @@ FROM python:3.12 -# The uv installer requires curl (and certificates) to download the release archive +# Install basic utilites RUN apt-get update; \ apt-get install -y --no-install-recommends ca-certificates curl vim postgresql-client netcat-openbsd; \ apt-get autoremove --purge -y; \ apt-get clean -y; \ rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* + +# Install Node.js + +ENV NODE_VERSION=24 + +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash \ + && . "$HOME/.nvm/nvm.sh" \ + && nvm install $NODE_VERSION \ + && nvm alias default $NODE_VERSION \ + && nvm use default + + +# Install Claude code + +RUN curl -fsSL https://claude.ai/install.sh | bash + + # Download the latest installer ADD https://astral.sh/uv/install.sh /uv-installer.sh @@ -45,7 +62,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \ uv sync --frozen # setup default PYTEST opts to get config from the right place -ENV PYTEST_ADDOPTS="--rootdir=/app/backend -c /app/backend/pyproject.toml /app/backend" +ENV PYTEST_ADDOPTS="--rootdir=/app/backend -c /app/backend/pyproject.toml --cov-config /app/backend/pyproject.toml /app/backend" # Place executables in the environment at the front of the path ENV PATH="/opt/venv/bin:$PATH"