Skip to content

Commit 19756ce

Browse files
authored
Update project configurations (#188)
1 parent e271b0d commit 19756ce

7 files changed

Lines changed: 38 additions & 28 deletions

File tree

‎.devcontainer/Dockerfile‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/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.14-bullseye"
4+
ARG VARIANT="3.14.2-bullseye"
55
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
66

7-
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
8-
# COPY requirements.txt /tmp/pip-tmp/
9-
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
10-
# && rm -rf /tmp/pip-tmp
7+
# Just Installation
8+
COPY --from=ghcr.io/casey/just:latest /just /usr/local/bin/
9+
10+
# uv Installation
11+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
1112

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

‎.devcontainer/devcontainer.json‎

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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.
12-
"VARIANT": "3.10-bullseye",
12+
"VARIANT": "3.14-bullseye",
1313
// Options
1414
"NODE_VERSION": "none"
1515
}
@@ -21,24 +21,16 @@
2121
"vscode": {
2222
// Set *default* container specific settings.json values on container create.
2323
"settings": {
24-
"python.defaultInterpreterPath": "/usr/local/bin/python",
25-
"python.linting.enabled": true,
26-
"python.linting.pylintEnabled": true,
27-
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
28-
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
29-
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
30-
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
31-
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
32-
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
33-
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
34-
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
35-
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
24+
"python.autoComplete.extraPaths": ["/workspaces"],
25+
"python.defaultInterpreterPath": "/usr/local/bin/python"
3626
},
3727

3828
// Add the IDs of extensions you want installed when the container is created.
3929
"extensions": [
4030
"ms-python.python",
41-
"ms-python.vscode-pylance"
31+
"ms-python.vscode-pylance",
32+
"Anthropic.claude-code",
33+
"charliermarsh.ruff"
4234
]
4335
}
4436
},
@@ -47,7 +39,7 @@
4739
// "forwardPorts": [],
4840

4941
// Use 'postCreateCommand' to run commands after the container is created.
50-
"postCreateCommand": "python -m pip install --upgrade pip && pip3 install --user -r requirements.txt",
42+
"postCreateCommand": "uv sync --all-groups",
5143

5244
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
5345
"remoteUser": "vscode"

‎.vscode/extensions.json‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"DavidAnson.vscode-markdownlint",
4+
"ms-python.python",
5+
"ms-python.vscode-pylance",
6+
"ms-vscode-remote.remote-containers",
7+
"charliermarsh.ruff"
8+
]
9+
}

‎.vscode/settings.json‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{
2-
"python.linting.pylintEnabled": false,
3-
"python.linting.flake8Enabled": true,
4-
"python.linting.enabled": true,
5-
"python.linting.flake8Args": [
6-
"--max-line-length=120",
7-
]
2+
"editor.tabSize": 4,
3+
"files.autoSave": "afterDelay",
4+
"files.trimTrailingWhitespace": true,
5+
"terminal.integrated.localEchoStyle": "dim",
6+
"[python]": {
7+
"editor.defaultFormatter": "charliermarsh.ruff",
8+
"editor.formatOnSave": true,
9+
"editor.codeActionsOnSave": {
10+
"source.fixAll.ruff": "explicit",
11+
"source.organizeImports.ruff": "explicit"
12+
}
13+
}
814
}

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,4 @@ Note: Project uses `uv` and `just` to manage project configuration and commands
5555
* Lint project - `just lint`
5656
* Sync uv environment - `just sync`
5757
* Run Unit Tests - `just test`
58+
* Install dependency: `uv add {package}`

‎pyproject.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ dependencies = []
88
[dependency-groups]
99
dev = ["pytest", "ruff>=0.16.0"]
1010

11+
[tool.pytest.ini_options]
12+
pythonpath = ["."]
13+
1114
[tool.ruff]
1215
line-length = 100
1316
target-version = "py314"

‎pytest.ini‎

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)