Skip to content

Use uv depend on audbcards>=0.4.3#31

Merged
hagenw merged 2 commits into
mainfrom
use-uv
Apr 13, 2026
Merged

Use uv depend on audbcards>=0.4.3#31
hagenw merged 2 commits into
mainfrom
use-uv

Conversation

@hagenw
Copy link
Copy Markdown
Member

@hagenw hagenw commented Apr 13, 2026

Use uv to handle CI and development, and depend on the latest version of audbcards to avoid example media file issue for datasets that contain audio and json files.

Summary by Sourcery

Adopt uv-based workflows for documentation and publishing while modernizing project metadata and CI configuration.

New Features:

  • Define project metadata and dynamic versioning in pyproject.toml using setuptools_scm.

Enhancements:

  • Add a development dependency group managed via pyproject.toml, including audbcards >= 0.4.3.
  • Standardize tooling on Python 3.12 across CI and pre-commit hooks.

Build:

  • Remove the standalone docs/requirements.txt in favor of pyproject.toml-based dependency management.

CI:

  • Update GitHub Actions workflows to use newer action versions and run Sphinx documentation builds via uv instead of direct pip/pytest-style invocations.
  • Remove docs-specific requirements installation in CI in favor of uv-managed execution.

Deployment:

  • Update GitHub Pages deployment workflows to newer action versions and to build docs via uv.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 13, 2026

Reviewer's Guide

Modernizes project metadata and tooling by defining pyproject.toml project metadata with setuptools_scm, moving dev dependencies (including audbcards>=0.4.3) into a uv-friendly dependency group, standardizing on Python 3.12, and updating CI/docs workflows and pre-commit hooks to use newer GitHub Actions, uv for running docs builds, and newer linting tools.

Sequence diagram for updated docs build using uv in CI

sequenceDiagram
  participant GitHubActions as GitHubActions
  participant Runner as Runner
  participant uv as uv
  participant Python as Python
  participant Sphinx as Sphinx

  GitHubActions->>Runner: Trigger doc workflow (push or PR)
  Runner->>Runner: actions/checkout_v4
  Runner->>Runner: actions/setup_python_v5 (python 3_12)
  Runner->>Runner: actions/cache_v4 (.cache/audbcards)
  Runner->>Runner: apt install libs (libsndfile1 ffmpeg mediainfo)

  Runner->>uv: uv run python pre-fill-cache_py
  uv->>Python: Execute pre-fill-cache script
  Python-->>uv: Cache warmed with audbcards
  uv-->>Runner: pre-fill-cache completed

  Runner->>uv: uv run python -m sphinx docs docs_build -b html
  uv->>Python: Start Sphinx module
  Python->>Sphinx: Build HTML documentation
  Sphinx-->>Python: Build success or failure
  Python-->>uv: Exit code
  uv-->>Runner: Propagate exit code
  Runner-->>GitHubActions: Report workflow status
Loading

Flow diagram for project metadata and tooling modernization

flowchart TD
  A[Start] --> B[Define project metadata in pyproject_toml
name authors license urls dynamic version]
  B --> C[Configure setuptools_scm in pyproject_toml]
  C --> D[Create dependency-groups section
with dev deps including audbcards >= 0_4_3]
  D --> E[Adopt Python 3_12
update CI workflows
and pre-commit default_language_version]
  E --> F[Update GitHub Actions
checkout v4
setup_python v5
cache v4
gh_pages v4]
  F --> G[Switch docs build in CI
to uv run pre-fill-cache_py and sphinx]
  G --> H[Remove docs/requirements_txt
pip install no longer used]
  H --> I[Update pre-commit hook versions
ruff and codespell]
  I --> J[End]
Loading

File-Level Changes

Change Details Files
Add PEP 621 project metadata and dev dependency group compatible with uv, including audbcards>=0.4.3, and configure setuptools_scm for dynamic versioning.
  • Introduce a [project] table with name, authors, description, readme, license, keywords, required Python version, dynamic version, and project URLs.
  • Define a [dependency-groups] dev group listing development/doc dependencies including audbcards>=0.4.3 and sphinx-related packages for use with uv.
  • Configure [tool.setuptools_scm] to derive the package version from git tags instead of hardcoding it.
pyproject.toml
Update documentation build and deployment workflows to Python 3.12, newer GitHub Actions, and use uv to run build commands instead of pip-installed environment.
  • Bump actions/checkout from v3 to v4 and actions/cache from v3 to v4 in doc, pages, and publish workflows.
  • Update actions/setup-python to v5 and change the Python version from 3.10 to 3.12 in all workflows.
  • Remove explicit pip install of docs/requirements.txt and instead invoke pre-fill-cache.py and sphinx builds via uv run in doc, pages, and publish workflows.
  • Upgrade peaceiris/actions-gh-pages from v3 to v4 for docs deployment.
.github/workflows/doc.yml
.github/workflows/pages.yml
.github/workflows/publish.yml
Align local tooling with Python 3.12 and refresh pre-commit hook versions.
  • Change default pre-commit Python version from python3.10 to python3.12.
  • Update ruff-pre-commit hook revision to v0.13.3 and codespell hook revision to v2.4.1.
.pre-commit-config.yaml
Simplify repository by removing obsolete docs requirements file that is superseded by pyproject/uv configuration.
  • Delete docs/requirements.txt as dependencies are now managed through pyproject.toml and uv.
docs/requirements.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

sourcery-ai[bot]

This comment was marked as resolved.

@hagenw hagenw merged commit 095c50d into main Apr 13, 2026
3 checks passed
@hagenw hagenw deleted the use-uv branch April 13, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant