Skip to content

Commit

Permalink
Use modern dev dependency-groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel-Therrien-Beslogic committed Nov 19, 2024
1 parent f955613 commit f3f7978
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install --user -e canopeum_backend[dev]",
// https://github.com/astral-sh/uv/issues/5964
// "postCreateCommand": "cd canopeum_backend && uv sync --locked --extra dev",
// "postCreateCommand": "cd canopeum_backend && uv sync --locked",
"features": {
"ghcr.io/devcontainers/features/node:1": {}
},
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/canopeum_backend_pr_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
enable-cache: true
cache-dependency-glob: "canopeum_backend/uv.lock"
- run: uv sync --locked --extra dev
- run: uv sync --locked
- name: Run Django Tests
run: uv run manage.py test
mypy:
Expand All @@ -48,7 +48,7 @@ jobs:
with:
enable-cache: true
cache-dependency-glob: "canopeum_backend/uv.lock"
- run: uv sync --locked --extra dev
- run: uv sync --locked
- run: uv run mypy . --python-version=3.12

pyright:
Expand All @@ -63,7 +63,7 @@ jobs:
with:
enable-cache: true
cache-dependency-glob: "canopeum_backend/uv.lock"
- run: uv sync --locked --extra dev
- run: uv sync --locked
- run: echo "$PWD/.venv/bin" >> $GITHUB_PATH
- uses: jakebailey/pyright-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ For backend
```shell
cd canopeum_backend
docker compose up
uv sync --locked --extra dev
uv sync --locked
uv run manage.py initialize_database
uv run manage.py runserver
```
Expand Down
2 changes: 1 addition & 1 deletion canopeum_backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WORKDIR /app
COPY 'pyproject.toml' /app/
COPY 'uv.lock' /app/

RUN uv sync --locked
RUN uv sync --locked --no-dev

COPY . /app/

Expand Down
2 changes: 1 addition & 1 deletion canopeum_backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies = [
"requests-cache>=1.2.1",
"retry-requests>=2.0.0",
]
[project.optional-dependencies]
[dependency-groups]
dev = [
# Tools
"mypy", # version taken from [compatible-mypy],
Expand Down
18 changes: 11 additions & 7 deletions canopeum_backend/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion start-local-env.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function Start-MySQLContainer {
# Run Django server
$commandsBackend = @'
cd canopeum_backend
uv sync --locked --extra dev
uv sync --locked
uv run manage.py runserver
'@

Expand Down

0 comments on commit f3f7978

Please sign in to comment.