Skip to content

Commit 9e54de4

Browse files
committed
Move [doc] extra to a PEP 735 dependency group; add uv-sync CI check
1 parent 7609492 commit 9e54de4

6 files changed

Lines changed: 30 additions & 15 deletions

File tree

.github/workflows/dependencies.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,18 @@ jobs:
4040
else
4141
pytest -o addopts= -v smmap/smmap/test
4242
fi
43+
uv-sync:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v7
47+
with:
48+
persist-credentials: false
49+
50+
- name: Install uv
51+
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
52+
with:
53+
enable-cache: false
54+
version: "0.12.13" # Released on 2026-09-10
55+
56+
# Ensure that dependencies and dependency groups are consistent and resolvable.
57+
- run: uv sync --all-extras --all-groups --dry-run

.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,5 @@ jobs:
173173
- name: Documentation
174174
if: matrix.build-docs
175175
run: |
176-
pip install '.[doc]'
176+
pip install --group doc
177177
make -C doc html

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,6 @@ output.txt
5252

5353
# Files created by OSS-Fuzz when running locally
5454
fuzz_*.pkg.spec
55+
56+
# Lock files created by uv, pixi, pipenv and others
57+
*.lock

.readthedocs.yaml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ build:
1313
# nodejs: "20"
1414
# rust: "1.70"
1515
# golang: "1.20"
16+
jobs:
17+
install:
18+
- python -m pip install --upgrade --no-cache-dir pip setuptools
19+
- python -m pip install --upgrade --upgrade-strategy only-if-needed --no-cache-dir --group doc .
1620

1721
# Build documentation in the "doc/" directory with Sphinx.
1822
sphinx:
@@ -24,13 +28,3 @@ sphinx:
2428

2529
# Optionally build your docs in additional formats such as PDF and ePub.
2630
formats: all
27-
28-
# Optional but recommended, declare the Python requirements required
29-
# to build your documentation.
30-
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
31-
python:
32-
install:
33-
- method: pip
34-
path: .
35-
extra_requirements:
36-
- doc

doc/requirements.txt

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

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,20 @@ dynamic = ["license", "version", "dependencies", "optional-dependencies"]
4040
"Source code" = "https://github.com/gitpython-developers/GitPython"
4141
"Documentation" = "https://gitpython.readthedocs.io/en/stable/"
4242

43+
[dependency-groups]
44+
doc = [
45+
'sphinx >=7.4.7,<8 ; python_version >= "3.9"',
46+
"sphinx-autodoc-typehints",
47+
"sphinx-rtd-theme",
48+
]
49+
4350
[tool.setuptools]
4451
include-package-data = true
4552

4653
[tool.setuptools.dynamic]
4754
version = {file = "VERSION"}
4855
dependencies = {file = "requirements.txt"}
4956
optional-dependencies."test" = {file = "test-requirements.txt"}
50-
optional-dependencies."doc" = {file = "doc/requirements.txt"}
5157

5258
[tool.setuptools.packages.find]
5359
include = ["git", "git.*"]

0 commit comments

Comments
 (0)