diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 4803e733b..aa6f91531 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -40,3 +40,18 @@ jobs: else pytest -o addopts= -v smmap/smmap/test fi + uv-sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + with: + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0 + with: + enable-cache: false + version: "0.12.13" # Released on 2026-09-10 + + # Ensure that dependencies and dependency groups are consistent and resolvable. + - run: uv sync --all-extras --all-groups --dry-run diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 7dfa2e8f2..cb9a9f285 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -173,5 +173,5 @@ jobs: - name: Documentation if: matrix.build-docs run: | - pip install '.[doc]' + pip install --group doc make -C doc html diff --git a/.gitignore b/.gitignore index eab294a65..79e543121 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,6 @@ output.txt # Files created by OSS-Fuzz when running locally fuzz_*.pkg.spec + +# Lock files created by uv, pixi, pipenv and others +*.lock diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 9bce80fd2..206d3f492 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -13,6 +13,10 @@ build: # nodejs: "20" # rust: "1.70" # golang: "1.20" + jobs: + install: + - python -m pip install --upgrade --no-cache-dir pip setuptools + - python -m pip install --upgrade --upgrade-strategy only-if-needed --no-cache-dir --group doc . # Build documentation in the "doc/" directory with Sphinx. sphinx: @@ -24,13 +28,3 @@ sphinx: # Optionally build your docs in additional formats such as PDF and ePub. formats: all - -# Optional but recommended, declare the Python requirements required -# to build your documentation. -# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html -python: - install: - - method: pip - path: . - extra_requirements: - - doc diff --git a/AGENTS.md b/AGENTS.md index ee4ef9d95..6b2963cf4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,7 +1,42 @@ +# Contribution guidelines + +Before starting work, read and follow [CONTRIBUTING.md](CONTRIBUTING.md), +including the [Prevent agent impersonation](CONTRIBUTING.md#prevent-agent-impersonation) +section governing identification when communicating through a person's account. + # Commit messages -Every commit must have a descriptive title and a substantive body. Title-only -commit messages are not acceptable. +Follow Conventional Commits for every commit. Every commit must have a +descriptive title and a substantive body. Title-only commit messages are not +acceptable. + +## Formatting + +Write commit messages in Markdown and assume readers view them with syntax +highlighting. Enclose code identifiers, package and module names, file paths, +and shell commands in backticks. Use Markdown whenever it helps readers +understand or navigate the prose. + +## Titles + +- Every title must use the form `type: description` or + `type(scope): description`. +- Use `feat:` for user-visible features and `fix:` for user-visible fixes. +- Use appropriate prefixes for other changes, such as `docs:`, `test:`, `ci:`, + `build:`, `refactor:`, `perf:`, `style:`, or `chore:`. +- Breaking changes must use `!` immediately before the colon, for example + `feat!:`, `refactor!:`, or a scoped form such as `fix(repo)!:`. +- Optionally scope a commit to the affected component, for example `fix(repo):`. + +Example titles: + +- `feat: add support for a new Git option` +- `fix(repo): handle bare repositories correctly` +- `build!: drop support for an older Python version` +- `ci: add an independent documentation build` +- `refactor(repo): simplify repository initialization` + +## Body The body must explain the problem or motivation, what changed, and why the chosen approach addresses it. Include relevant behavior before and after the diff --git a/doc/requirements.txt b/doc/requirements.txt deleted file mode 100644 index 24472ba39..000000000 --- a/doc/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -sphinx >= 7.4.7, < 8 -sphinx_rtd_theme -sphinx-autodoc-typehints diff --git a/pyproject.toml b/pyproject.toml index 3e6dd21cb..767f491ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,13 @@ dynamic = ["license", "version", "dependencies", "optional-dependencies"] "Source code" = "https://github.com/gitpython-developers/GitPython" "Documentation" = "https://gitpython.readthedocs.io/en/stable/" +[dependency-groups] +doc = [ + 'sphinx >=7.4.7,<8 ; python_version >= "3.9"', + "sphinx-autodoc-typehints", + "sphinx-rtd-theme", +] + [tool.setuptools] include-package-data = true @@ -47,7 +54,6 @@ include-package-data = true version = {file = "VERSION"} dependencies = {file = "requirements.txt"} optional-dependencies."test" = {file = "test-requirements.txt"} -optional-dependencies."doc" = {file = "doc/requirements.txt"} [tool.setuptools.packages.find] include = ["git", "git.*"]