diff --git a/.github/workflows/benchmark-linux.yml b/.github/workflows/benchmark-linux.yml index 56ba9d5..a8ed5f4 100644 --- a/.github/workflows/benchmark-linux.yml +++ b/.github/workflows/benchmark-linux.yml @@ -55,15 +55,23 @@ jobs: - name: Synchronize frozen Python environment run: nix develop --command uv sync --frozen + - name: Install isolated TsFile claim dependencies + if: inputs.profile == 'claims' + run: | + nix develop --command uv pip install --python .venv/bin/python \ + pytz==2026.2 tzdata==2026.3 + nix develop --command uv pip install --python .venv/bin/python --no-deps \ + pandas==2.2.3 tsfile==2.3.1 + - name: Run selected benchmark lane id: benchmark run: | - result=$(nix develop --command uv run --frozen format-bench run \ + result=$(nix develop --command .venv/bin/format-bench run \ --profile "${{ inputs.profile }}" \ --dataset github-stars-2026-07-03) run_dir=$(dirname "$result") - nix develop --command uv run --frozen format-bench report --run-dir "$run_dir" - archive=$(nix develop --command uv run --frozen format-bench package \ + nix develop --command .venv/bin/format-bench report --run-dir "$run_dir" + archive=$(nix develop --command .venv/bin/format-bench package \ --run-dir "$run_dir" \ --platform linux-x86_64) echo "archive=$archive" >> "$GITHUB_OUTPUT" diff --git a/src/format_bench/runner.py b/src/format_bench/runner.py index b5c8299..d50c449 100644 --- a/src/format_bench/runner.py +++ b/src/format_bench/runner.py @@ -145,7 +145,17 @@ def _sha256(path: Path) -> str: def environment_info(root: Path) -> dict: packages = {} - for name in ("pyarrow", "pylance", "tiktoken", "vortex-data", "zstandard"): + for name in ( + "pandas", + "pyarrow", + "pylance", + "pytz", + "tiktoken", + "tsfile", + "tzdata", + "vortex-data", + "zstandard", + ): try: packages[name] = version(name) except PackageNotFoundError: diff --git a/tests/test_runner.py b/tests/test_runner.py index aa1f12a..40653d2 100644 --- a/tests/test_runner.py +++ b/tests/test_runner.py @@ -7,6 +7,7 @@ from format_bench.runner import ( Job, MeasurementConfig, + environment_info, measure_callable, run_job, stats_ms, @@ -47,3 +48,8 @@ def test_run_job_aggregates_fresh_process_output(tmp_path: Path) -> None: assert result["fresh_process"]["samples"] == 2 assert result["warm"]["samples"] == 4 assert result["max_rss_bytes_p50"] == 100 + + +def test_environment_records_isolated_claim_dependencies() -> None: + packages = environment_info(Path(__file__).parents[1])["packages"] + assert {"pandas", "pytz", "tsfile", "tzdata"} <= packages.keys()