Skip to content

Commit

Permalink
FIX: define dev dependencies as dependency groups (#40)
Browse files Browse the repository at this point in the history
* DX: recommend pull request VS Code extension
* MAINT: update lock files
  • Loading branch information
redeboer authored Oct 28, 2024
1 parent b27581e commit ea645de
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 456 deletions.
4 changes: 4 additions & 0 deletions .binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ set -ex
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.cargo/env
uv export \
--group jupyter \
--group notebooks \
--no-dev \
> requirements.txt
uv pip install \
--requirement requirements.txt \
--system
rm requirements.txt
uv cache clean
2 changes: 1 addition & 1 deletion .github/workflows/notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
enable-cache: true
- name: Install graphviz
run: sudo apt-get -y install graphviz
- run: uv run --extra dev pytest
- run: uv run --group test --no-dev pytest
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.5.1
rev: 0.5.5
hooks:
- id: check-dev-files
args:
Expand Down Expand Up @@ -52,7 +52,7 @@ repos:
metadata.vscode
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
rev: v0.7.1
hooks:
- id: ruff
args: [--fix]
Expand Down Expand Up @@ -107,6 +107,6 @@ repos:
alias: ec

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.4.25
rev: 0.4.27
hooks:
- id: uv-lock
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"mhutchie.git-graph",
"ms-python.python",
"ms-vsliveshare.vsliveshare",
Expand Down
202 changes: 1 addition & 201 deletions 2021.11.29/uv.lock

Large diffs are not rendered by default.

202 changes: 1 addition & 201 deletions 2021.12.13/uv.lock

Large diffs are not rendered by default.

21 changes: 14 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,26 @@ name = "compwa-demo"
requires-python = ">=3.12"
version = "0.0.0"

[project.optional-dependencies]
[dependency-groups]
dev = [
"compwa-demo[binder]",
"ruff",
{include-group = "jupyter"},
{include-group = "test"},
]
jupyter = [
"jupyterlab",
"jupyterlab-code-formatter >=3.0.0",
"jupyterlab-code-formatter",
"jupyterlab-git",
"jupyterlab-lsp",
"nbmake",
"pyproject-local-kernel",
"pytest",
"jupyterlab-myst",
"python-lsp-ruff",
"python-lsp-server[rope]",
"ruff",
{include-group = "notebooks"},
]
notebooks = ["pyproject-local-kernel"]
test = [
"nbmake",
{include-group = "notebooks"},
]

[tool.pytest.ini_options]
Expand Down
131 changes: 88 additions & 43 deletions uv.lock

Large diffs are not rendered by default.

0 comments on commit ea645de

Please sign in to comment.