Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Poetry doesn't yet support Python 3.10
FROM python:3.9.7

# Environment variables
ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VIRTUALENVS_CREATE=false \
PATH="~/.local/bin:$PATH"

# Copy all project files
COPY . .

# Install poetry and dependencies
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python - && ~/.local/bin/poetry install --no-ansi --no-interaction

# Install pre-commit
RUN pre-commit
26 changes: 26 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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.205.1/containers/python-3
{
"name": "WTPython",
"build": {
"dockerfile": "Dockerfile",
"context": ".." // Set the workdir to be the parent directory of devcontainer.json
},
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.linting.enabled": true,
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.vscode-pylance",
"ms-python.python",
"github.vscode-pull-request-github",
"github.copilot",
"eamodio.gitlens"
],
// Features that vscode will install on build
"features": {
"git": "latest"
}
}