Skip to content

Commit

Permalink
chore: use dependency-groups
Browse files Browse the repository at this point in the history
  • Loading branch information
mkniewallner committed Oct 29, 2024
1 parent b8e1882 commit 80c97e2
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 34 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Python dependencies
run: uv sync --frozen --no-install-project
run: uv sync --frozen

- name: Setup Rust toolchain
run: rustup component add clippy rustfmt
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
run: uv sync --frozen
run: uv sync --frozen --group test --group typing

- name: Check typing
run: uv run mypy
Expand Down Expand Up @@ -111,11 +111,5 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Python dependencies
run: uv sync --frozen --no-install-project

- name: Check if documentation can be built
# `--no-project` is a workaround to avoid the installation of deptry
# itself (https://github.com/astral-sh/uv/issues/6578)
run: uv run --no-project mkdocs build --strict
run: uv run --only-group docs mkdocs build --strict
7 changes: 1 addition & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,5 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Python dependencies
run: uv sync --frozen --no-install-project

- name: Deploy documentation
# `--no-project` is a workaround to avoid the installation of deptry
# itself (https://github.com/astral-sh/uv/issues/6578)
run: uv run --no-project mkdocs gh-deploy --force
run: uv run --only-group docs mkdocs gh-deploy --force
14 changes: 9 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,20 @@ dependencies = [
"tomli>=2.0.1; python_version < '3.11'"
]

[tool.uv]
dev-dependencies = [
[dependency-groups]
docs = [
"mkdocs==1.6.1",
"mkdocs-material==9.5.42",
"mypy[faster-cache]==1.13.0; implementation_name == 'cpython'",
# orjson does not compile on PyPy.
"mypy==1.13.0; implementation_name != 'cpython'",
]
test = [
"pytest==8.3.3",
"pytest-cov==5.0.0",
"pytest-xdist[psutil]==3.6.1",
]
typing = [
"mypy[faster-cache]==1.13.0; implementation_name == 'cpython'",
# orjson does not compile on PyPy.
"mypy==1.13.0; implementation_name != 'cpython'",
"types-colorama==0.4.15.20240311; sys_platform == 'win32'",
]

Expand Down
36 changes: 22 additions & 14 deletions uv.lock

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

0 comments on commit 80c97e2

Please sign in to comment.