|
1 | 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the |
2 | 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/python |
3 | 3 | { |
4 | | - "name": "Python 3", |
5 | | - "image": "mcr.microsoft.com/devcontainers/python:3.11", |
| 4 | + "name": "Falcon (CPython 3.14)", |
| 5 | + "image": "mcr.microsoft.com/devcontainers/python:3.14", |
6 | 6 | "features": { |
7 | | - "ghcr.io/devcontainers-contrib/features/tox:1": {} |
8 | | - } |
9 | | - |
10 | | - // Features to add to the dev container. More info: https://containers.dev/features. |
11 | | - // "features": {}, |
12 | | - |
13 | | - // Use 'forwardPorts' to make a list of ports inside the container available locally. |
14 | | - // "forwardPorts": [], |
| 7 | + "ghcr.io/devcontainers-extra/features/ruff:1": {}, |
| 8 | + "ghcr.io/devcontainers-extra/features/tox:2": {} |
| 9 | + }, |
15 | 10 |
|
16 | 11 | // Use 'postCreateCommand' to run commands after the container is created. |
17 | | - // "postCreateCommand": "pip3 install --user -r requirements.txt", |
| 12 | + // NOTE(vytas): We install pytest not via pipx or features so that test collection works via the default interpreter. |
| 13 | + "postCreateCommand": "pip install --upgrade pip pytest && FALCON_DISABLE_CYTHON=y pip install -e .", |
18 | 14 |
|
19 | 15 | // Configure tool-specific properties. |
20 | | - // "customizations": {}, |
| 16 | + "customizations": { |
| 17 | + "vscode": { |
| 18 | + "extensions": [ |
| 19 | + "ms-python.python", |
| 20 | + "ms-python.vscode-pylance", |
| 21 | + "charliermarsh.ruff" |
| 22 | + ], |
| 23 | + "settings": { |
| 24 | + "python.defaultInterpreterPath": "/usr/local/bin/python", |
| 25 | + "python.linting.enabled": true, |
| 26 | + "python.testing.pytestEnabled": true, |
| 27 | + "python.testing.unittestEnabled": false, |
| 28 | + // NOTE(vytas): Disable automatic random port-forwarding as running tox doesn't need it. |
| 29 | + "remote.autoForwardPorts": false |
| 30 | + } |
| 31 | + } |
| 32 | + } |
21 | 33 |
|
22 | 34 | // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. |
| 35 | + // NOTE(vytas): You will probably want to connect as root on rootless Docker/Podman/etc. |
| 36 | + // In rootless setups, the current user is typically mapped to root's UID inside the container. |
| 37 | + // (You may run into permission problems otherwise as the vscode user gets mapped to an ephemeral UID.) |
23 | 38 | // "remoteUser": "root" |
24 | 39 | } |
0 commit comments