Skip to content
Merged
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
1 change: 0 additions & 1 deletion .devcontainer/Dockerfile

This file was deleted.

42 changes: 21 additions & 21 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// 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.245.0/containers/python-3
{
"name": "Python 3",
"image": "mcr.microsoft.com/vscode/devcontainers/python:3.11-bullseye",
"name": "Python 3",
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
Expand All @@ -18,23 +18,23 @@
".pytest_cache": true,
"__pycache__": true
}
},
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"charliermarsh.ruff",
"ms-python.black-formatter"
]
}
},
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// 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": "pip3 install --user -r requirements-dev.txt && pre-commit install",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install --user -r requirements-dev.txt && pre-commit install",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ It includes `pytest` for testing plus the `pytest-cov` plugin to measure coverag

The checks and tests are all run using Github actions on every pull request and merge to main.

This repository is setup for Python 3.11. To customize that, change the `VARIANT` argument in `.devcontainer/devcontainer.json`, change the config options in `.precommit-config.yaml` and change the version number in `.github/workflows/python.yaml`.
This repository is setup for Python 3.11. To change the version:
1. Change the `image` argument in `.devcontainer/devcontainer.json` (see [https://github.com/devcontainers/images/tree/main/src/python](https://github.com/devcontainers/images/tree/main/src/python#configuration) for a list of pre-built Docker images)
1. Change the config options in `.precommit-config.yaml`
1. Change the version number in `.github/workflows/python.yaml`

## Development instructions

Expand Down Expand Up @@ -55,7 +58,6 @@ Here's a short explanation of each file/folder in this template:

* `.devcontainer`: Folder containing files used for setting up a devcontainer
* `devcontainer.json`: File configuring the devcontainer, includes VS Code settings
* `Dockerfile`: File with commands to build the devcontainer's Docker image
* `.github`: Folder for Github-specific files and folders
* `workflows`: Folder containing Github actions config files
* `python.yaml`: File configuring Github action that runs tools and tests
Expand Down