From 372757d67ae10655338878d48df2960bbb16802a Mon Sep 17 00:00:00 2001 From: FBumann <117816358+FBumann@users.noreply.github.com> Date: Thu, 23 Jul 2026 22:27:03 +0200 Subject: [PATCH 1/2] fix: reset uv.lock before the base benchmark run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The head run leaves an untracked uv.lock behind, and uv keeps a satisfying lockfile as-is — so a head that changes dependencies leaked its resolution into the base run (both sides benchmarked the head's deps). Remove it before the base run and log each side's resolved tsam version for transparency. Co-Authored-By: Claude Fable 5 --- .github/workflows/benchmarks.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmarks.yaml b/.github/workflows/benchmarks.yaml index df3e10e..e83b35f 100644 --- a/.github/workflows/benchmarks.yaml +++ b/.github/workflows/benchmarks.yaml @@ -42,19 +42,25 @@ jobs: enable-cache: true - name: Benchmark head - run: > - uv run --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS - --benchmark-json "$RUNNER_TEMP/head.json" + run: | + uv run --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS \ + --benchmark-json "$RUNNER_TEMP/head.json" + uv run --no-sync python -c "import tsam; print('head tsam:', tsam.__version__)" - name: Benchmark base (${{ github.event.pull_request.base.ref }}) if: github.event_name == 'pull_request' # Base src with the head's benchmark suite overlaid, so test IDs match # and suite edits in the PR still compare against the same cases. + # Drop the head run's uv.lock (untracked — the repo commits none): + # uv keeps a satisfying lock as-is, so without this a head that + # changes dependencies leaks its resolution into the base run. run: | git checkout --detach ${{ github.event.pull_request.base.sha }} git checkout ${{ github.sha }} -- benchmarks/ + rm -f uv.lock uv run --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS \ --benchmark-json "$RUNNER_TEMP/base.json" + uv run --no-sync python -c "import tsam; print('base tsam:', tsam.__version__)" - name: Render report and plot run: | From c8d10a3e61efd4ec946bdf51217beca4fa6e50a8 Mon Sep 17 00:00:00 2001 From: FBumann <117816358+FBumann@users.noreply.github.com> Date: Thu, 23 Jul 2026 22:14:58 +0200 Subject: [PATCH 2/2] chore: pin tsam to develop-v4 for benchmark comparison MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DO NOT MERGE — experiment to measure tsam v4 against v3.4.x with the head-vs-base benchmark workflow. Head resolves tsam from the develop-v4 git branch; base (main) resolves the released v3 line. Co-Authored-By: Claude Fable 5 --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index b308d56..19472e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,3 +84,6 @@ exclude_lines = [ [tool.pytest.ini_options] testpaths = ["test"] addopts = ["-n", "auto", "--dist", "loadfile"] + +[tool.uv.sources] +tsam = { git = "https://github.com/FZJ-IEK3-VSA/tsam", branch = "develop-v4" }