diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..f4510c7 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,50 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/python +{ + "name": "Python 3 Container with Poetry", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:1-3.10-bullseye", + "features": { + "ghcr.io/devcontainers-contrib/features/poetry:2": {} + }, + + // 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": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "poetry config virtualenvs.in-project true && poetry install --no-root && poetry run pre-commit install", + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "ms-toolsai.jupyter", + "ms-python.black-formatter", + "ms-python.mypy-type-checker", + "charliermarsh.ruff", + "ms-toolsai.vscode-jupyter-powertoys", + "mosapride.zenkaku", + "shardulm94.trailing-spaces", + "christian-kohler.path-intellisense", + "VisualStudioExptTeam.vscodeintellicode", + "VisualStudioExptTeam.intellicode-api-usage-examples", + "oderwat.indent-rainbow", + "tamasfe.even-better-toml", + "ms-azuretools.vscode-docker" + ], + "settings": { + "python.defaultInterpreterPath": "./.venv/bin/python", + "python.terminal.activateEnvInCurrentTerminal": true, + "python.terminal.activateEnvironment": true + } + } + } + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4e83e2a..40239cf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,7 @@ repos: - id: end-of-file-fixer - id: pretty-format-json args: [--autofix, --indent, "2", "--no-sort-keys"] + exclude: devcontainer.json - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version.