Skip to content

Conversation

@hagenw
Copy link
Member

@hagenw hagenw commented Jan 7, 2026

Alternative to #175

Here we use compute5 to run the benchmarks.

Summary by Sourcery

Switch benchmark scripts to use uv with Python 3.12 and update benchmark environment configuration.

Enhancements:

  • Run benchmark scripts via uv using Python 3.12 instead of directly invoking python and virtualenv-based environments.

Build:

  • Simplify benchmark dependency installation to system packages and add gstreamer-1.0.
  • Replace requirements files with a pyproject.toml for the benchmark project targeting Python 3.12.

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 7, 2026

Reviewer's Guide

Switches the benchmark environment to use uv with Python 3.12 and a pyproject-based dependency definition instead of manual virtualenv + requirements files, and adjusts system dependencies accordingly.

Flow diagram for new benchmark environment setup with uv

flowchart TD
    A[install_dependencies.sh] --> B[Install system packages: sox, ffmpeg, libav*]
    B --> C[Install system packages: libcairo2-dev, libmad0-dev, libgirepository1.0-dev]
    C --> D[Install system package: gstreamer-1.0]

    subgraph Previous_setup_removed
        X1[Deactivate existing venv]
        X2[Remove ENV_DIR]
        X3[Create virtualenv with python3.10]
        X4[Activate virtualenv]
        X5[Upgrade pip]
        X6[Purge pip cache]
        X7[Install requirements from requirements.txt.lock]
    end

    A -.no longer executed .-> Previous_setup_removed

    D --> E[Runtime uses uv and pyproject.toml for Python dependencies]
Loading

Flow diagram for running benchmarks with uv and Python 3.12

flowchart TD
    actor[Developer] --> R[run.sh]

    R --> I[Initialize results directory]
    I --> L[Loop over extensions exts]

    L --> BR[uv run --python 3.12 benchmark_read.py --ext ext]
    L --> BI[uv run --python 3.12 benchmark_info.py --ext ext]

    BR --> UV1[uv resolves and installs dependencies from pyproject.toml]
    BI --> UV2[uv reuses resolved environment]

    UV1 --> P312[Python 3.12 runtime]
    UV2 --> P312

    P312 --> BR_DONE[Run benchmark_read.py]
    P312 --> BI_DONE[Run benchmark_info.py]

    L --> DONE[All extensions processed]
    DONE --> PL[uv run --python 3.12 plot.py]
    PL --> UV3[uv uses same environment]
    UV3 --> P312
    P312 --> PLOT_DONE[Generate benchmark plots]
Loading

File-Level Changes

Change Details Files
Replace manual virtualenv and pip-based benchmark environment setup with system package install only and move Python dependency management to uv/pyproject.
  • Remove virtualenv creation, activation, pip upgrade, cache purge, and requirements installation from the benchmark dependency install script
  • Keep and streamline system-level audio-related package installations in the dependency script
docs/benchmark/install_dependencies.sh
Run benchmark scripts via uv using Python 3.12 instead of the system python interpreter.
  • Wrap benchmark_read.py and benchmark_info.py invocations with uv run targeting Python 3.12
  • Wrap plot.py invocation with uv run targeting Python 3.12
docs/benchmark/run.sh
Define benchmark Python dependencies through a pyproject.toml and remove legacy requirements files.
  • Introduce a dedicated pyproject.toml for the benchmark project specifying Python version and package dependencies
  • Remove requirements.txt and requirements.txt.lock in favor of pyproject-based dependency management
docs/benchmark/pyproject.toml
docs/benchmark/requirements.txt
docs/benchmark/requirements.txt.lock

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

@hagenw
Copy link
Member Author

hagenw commented Jan 7, 2026

Results are not different

@hagenw hagenw closed this Jan 7, 2026
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.

2 participants