Skip to content

Commit e2a2c4e

Browse files
committed
Update devcontainer spec using newer template
1 parent 8a86428 commit e2a2c4e

File tree

4 files changed

+20
-40
lines changed

4 files changed

+20
-40
lines changed

.devcontainer/devcontainer.json

Lines changed: 17 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,22 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
13
{
24
"name": "Python 3",
3-
"build": {
4-
"dockerfile": "Dockerfile",
5-
"context": "..",
6-
"args": {
7-
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9
8-
"VARIANT": "3",
9-
// Options
10-
"INSTALL_NODE": "false",
11-
"NODE_VERSION": "lts/*"
12-
}
13-
},
14-
"containerEnv": {
15-
"PYTHONPATH": "."
16-
},
17-
// Set *default* container specific settings.json values on container create.
18-
"settings": {
19-
"terminal.integrated.shell.linux": "/bin/bash",
20-
"python.pythonPath": "/usr/local/bin/python",
21-
"python.linting.enabled": true,
22-
"python.linting.pylintEnabled": true,
23-
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
24-
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
25-
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
26-
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
27-
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
28-
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
29-
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
30-
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
31-
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
32-
},
33-
// Add the IDs of extensions you want installed when the container is created.
34-
"extensions": [
35-
"ms-python.python"
36-
]
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
// "features": {},
10+
3711
// Use 'forwardPorts' to make a list of ports inside the container available locally.
3812
// "forwardPorts": [],
13+
3914
// Use 'postCreateCommand' to run commands after the container is created.
40-
// "postCreateCommand": "pip3 install --user -r requirements.txt",
41-
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
42-
// "remoteUser": "vscode"
43-
}
15+
"postCreateCommand": "pip3 install --user -r requirements.txt -r requirements_test.txt",
16+
17+
// Configure tool-specific properties.
18+
"customizations": {}
19+
20+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
21+
// "remoteUser": "root"
22+
}

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pyusb==1.2.1

requirements_test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Dependencies for running tests.
2-
pytest
3-
pyusb
2+
pytest>=7.4.3
3+

tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)