diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..201d55ad --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,18 @@ +FROM mcr.microsoft.com/devcontainers/python:3 + +RUN python -m pip install --upgrade pip \ + && python -m pip install pytest pytest-cov \ + && python -m pip install 'flit>=3.8.0' + +ENV FLIT_ROOT_INSTALL=1 + +COPY pyproject.toml README.rst ./ +RUN mkdir -p flit \ + && python -m flit install --only-deps --deps develop \ + && rm -r pyproject.toml README.rst flit + +// ENV FLIT_ALLOW_INVALID=1 + +// COPY pyproject.toml . +// RUN python -m flit install --only-deps --deps develop \ +// && rm -r pyproject.toml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..e4eba884 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,31 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/python-3-miniconda +{ + "name": "Python Environment", + "build": { + "dockerfile": "Dockerfile", + "context": ".." + }, + "customizations": { + "vscode": { + "extensions": [ + "editorconfig.editorconfig", + "github.vscode-pull-request-github", + "ms-azuretools.vscode-docker", + "ms-python.python", + "ms-python.vscode-pylance", + "ms-python.flake8", + "ms-vsliveshare.vsliveshare", + "ryanluker.vscode-coverage-gutters", + "bungcip.better-toml", + "GitHub.copilot" + ], + "settings": { + "python.defaultInterpreterPath": "/usr/local/bin/python", + "flake8.path": [ + "/usr/local/py-utils/bin/flake8" + ] + } + } + } +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..09add968 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,20 @@ +{ + "editor.formatOnSave": true, + "editor.formatOnPaste": true, + "files.trimTrailingWhitespace": true, + "files.autoSave": "onFocusChange", + "git.autofetch": true, + "[jsonc]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + "python.defaultInterpreterPath": "/usr/local/bin/python", + "python.formatting.provider": "autopep8", + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true, + "flake8.args": [ + "--config=.flake8" + ], + "flake8.path": [ + "/usr/local/py-utils/bin/flake8" + ] +}