Skip to content

Commit f17c89c

Browse files
authored
Merge pull request #5 from johnbullnz/main
Remove Dockerfile and VARIANT argument, update README, start using
2 parents 9c45eda + 3328b4e commit f17c89c

File tree

3 files changed

+25
-24
lines changed

3 files changed

+25
-24
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
22
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
33
{
4-
"name": "Python 3",
5-
"image": "mcr.microsoft.com/vscode/devcontainers/python:3.11-bullseye",
4+
"name": "Python 3",
5+
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
66

7-
// Configure tool-specific properties.
8-
"customizations": {
9-
// Configure properties specific to VS Code.
10-
"vscode": {
11-
// Set *default* container specific settings.json values on container create.
12-
"settings": {
7+
// Configure tool-specific properties.
8+
"customizations": {
9+
// Configure properties specific to VS Code.
10+
"vscode": {
11+
// Set *default* container specific settings.json values on container create.
12+
"settings": {
1313
"python.defaultInterpreterPath": "/usr/local/bin/python",
1414
"python.testing.pytestEnabled": true,
1515
"python.testing.unittestEnabled": false,
@@ -18,23 +18,23 @@
1818
".pytest_cache": true,
1919
"__pycache__": true
2020
}
21-
},
21+
},
2222

23-
// Add the IDs of extensions you want installed when the container is created.
24-
"extensions": [
25-
"ms-python.python",
23+
// Add the IDs of extensions you want installed when the container is created.
24+
"extensions": [
25+
"ms-python.python",
2626
"charliermarsh.ruff",
2727
"ms-python.black-formatter"
28-
]
29-
}
30-
},
28+
]
29+
}
30+
},
3131

32-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
33-
// "forwardPorts": [],
32+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
33+
// "forwardPorts": [],
3434

35-
// Use 'postCreateCommand' to run commands after the container is created.
36-
"postCreateCommand": "pip3 install --user -r requirements-dev.txt && pre-commit install",
35+
// Use 'postCreateCommand' to run commands after the container is created.
36+
"postCreateCommand": "pip3 install --user -r requirements-dev.txt && pre-commit install",
3737

38-
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
39-
"remoteUser": "vscode"
38+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
39+
"remoteUser": "vscode"
4040
}

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ It includes `pytest` for testing plus the `pytest-cov` plugin to measure coverag
1111

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

14-
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`.
14+
This repository is setup for Python 3.11. To change the version:
15+
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)
16+
1. Change the config options in `.precommit-config.yaml`
17+
1. Change the version number in `.github/workflows/python.yaml`
1518

1619
## Development instructions
1720

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

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

0 commit comments

Comments
 (0)