Skip to content

Commit

Permalink
FIX: define dev dependencies as dependency groups (#12)
Browse files Browse the repository at this point in the history
* FIX: remove `pre-commit-uv` from environment
* MAINT: update lock files
  • Loading branch information
redeboer authored Oct 28, 2024
1 parent 00730b0 commit 4c5a68b
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 231 deletions.
4 changes: 3 additions & 1 deletion .binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ set -ex
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.cargo/env
uv export \
--extra jupyter \
--group jupyter \
--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/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
if: inputs.specific-pip-packages == ''
secrets:
token: ${{ secrets.PAT }}
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v2
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v2.1
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.5.0
rev: 0.5.5
hooks:
- id: colab-toc-visible
- id: check-dev-files
Expand All @@ -23,7 +23,7 @@ repos:
- id: remove-empty-tags

- 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 @@ -74,11 +74,11 @@ repos:
)$
- repo: https://github.com/ComPWA/pyright-pre-commit
rev: v1.1.385
rev: v1.1.386
hooks:
- id: pyright

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.4.24
rev: 0.4.27
hooks:
- id: uv-lock
34 changes: 15 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,6 @@ maintainers = [
name = "jax-mini-benchmark"
requires-python = ">=3.12"

[project.optional-dependencies]
dev = [
"jax-mini-benchmark[jupyter]",
"jax-mini-benchmark[sty]",
]
jupyter = [
"jupyterlab",
"jupyterlab-code-formatter >=3.0.0",
"jupyterlab-git",
"jupyterlab-lsp",
"jupyterlab-myst",
"python-lsp-ruff",
"python-lsp-server[rope]",
]
sty = [
"pre-commit-uv",
"ruff",
]

[project.readme]
content-type = "text/markdown"
file = "README.md"
Expand All @@ -67,6 +48,21 @@ Documentation = "https://github.com/ComPWA/jax-mini-benchmark"
Source = "https://github.com/ComPWA/jax-mini-benchmark"
Tracker = "https://github.com/ComPWA/jax-mini-benchmark/issues"

[dependency-groups]
dev = [
"ruff",
{include-group = "jupyter"},
]
jupyter = [
"jupyterlab",
"jupyterlab-code-formatter",
"jupyterlab-git",
"jupyterlab-lsp",
"jupyterlab-myst",
"python-lsp-ruff",
"python-lsp-server[rope]",
]

[tool.setuptools.package-data]
jax_benchmark = ["py.typed"]

Expand Down
Loading

0 comments on commit 4c5a68b

Please sign in to comment.