Skip to content

Commit 57b7405

Browse files
committed
Update template with just and current VSCode coventions
1 parent 6ceb188 commit 57b7405

11 files changed

Lines changed: 88 additions & 660 deletions

File tree

‎.devcontainer/Dockerfile‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/python-3/.devcontainer/base.Dockerfile
22

33
# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
4-
ARG VARIANT="3.10-bullseye"
4+
ARG VARIANT="3.14.2-bullseye"
55
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
66

77
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
88
ARG NODE_VERSION="none"
99
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
1010

11+
# Just Installation
12+
COPY --from=ghcr.io/casey/just:latest /just /usr/local/bin/
13+
1114
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
12-
# COPY requirements.txt /tmp/pip-tmp/
13-
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
14-
# && rm -rf /tmp/pip-tmp
15+
COPY ./languages/python/requirements.txt /tmp/pip-tmp/
16+
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
17+
&& rm -rf /tmp/pip-tmp
1518

1619
# [Optional] Uncomment this section to install additional OS packages.
1720
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

‎.devcontainer/devcontainer.json‎

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"build": {
66
"dockerfile": "Dockerfile",
77
"context": "..",
8-
"args": {
8+
"args": {
99
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
1010
// Append -bullseye or -buster to pin to an OS version.
1111
// Use -bullseye variants on local on arm64/Apple Silicon.
@@ -15,30 +15,36 @@
1515
}
1616
},
1717

18-
// Set *default* container specific settings.json values on container create.
19-
"settings": {
20-
"python.autoComplete.extraPaths": ["/workspaces"],
21-
"python.defaultInterpreterPath": "/usr/local/bin/python",
22-
"python.linting.enabled": true,
23-
"python.linting.pycodestyleEnabled": true,
24-
"python.linting.pylintEnabled": true,
25-
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
26-
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
27-
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
28-
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
29-
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
30-
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
31-
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
32-
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
33-
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
34-
},
18+
// Configure tool-specific properties.
19+
"customizations": {
20+
"vscode": {
21+
// Set *default* container specific settings.json values on container create.
22+
"settings": {
23+
"python.autoComplete.extraPaths": ["/workspaces"],
24+
"python.defaultInterpreterPath": "/usr/local/bin/python",
25+
"python.linting.enabled": true,
26+
"python.linting.pycodestyleEnabled": true,
27+
"python.linting.pylintEnabled": true,
28+
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
29+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
30+
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
31+
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
32+
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
33+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
34+
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
35+
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
36+
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
37+
},
3538

36-
// Add the IDs of extensions you want installed when the container is created.
37-
"extensions": [
38-
"ms-python.pylint",
39-
"ms-python.vscode-pylance",
40-
"ms-python.python",
41-
],
39+
// Add the IDs of extensions you want installed when the container is created.
40+
"extensions": [
41+
"ms-python.pylint",
42+
"ms-python.vscode-pylance",
43+
"ms-python.python",
44+
"Anthropic.claude-code"
45+
]
46+
}
47+
},
4248

4349
// Use 'forwardPorts' to make a list of ports inside the container available locally.
4450
// "forwardPorts": [],
@@ -49,6 +55,6 @@
4955
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
5056
"remoteUser": "vscode",
5157
"features": {
52-
"github-cli": "latest",
58+
"ghcr.io/devcontainers/features/github-cli:1": "latest"
5359
}
5460
}
Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,26 @@ on:
99
jobs:
1010
code-check-and-unit-test:
1111
runs-on: ubuntu-latest
12-
1312
steps:
14-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1514
- name: Setup Python
1615
uses: actions/setup-python@v3
1716
with:
18-
python-version: "3.10"
17+
python-version: "3.14"
18+
- name: Setup just
19+
uses: extractions/setup-just@v3
1920
- name: Install requirements
2021
run: |
21-
python -m pip install --upgrade pip
22+
python3 -m venv .venv
23+
source .venv/bin/activate
24+
25+
python3 -m pip install --upgrade pip
2226
pip install -r requirements.txt
2327
- name: Lint project
24-
run: pycodestyle * && pylint *
28+
run: |
29+
source .venv/bin/activate
30+
just lint
2531
- name: Run unit tests
26-
run: pytest
32+
run: |
33+
source .venv/bin/activate
34+
just test

0 commit comments

Comments
 (0)