Skip to content

test(core): add series.json regression comparison#706

Merged
lewisjared merged 2 commits into
mainfrom
test/series-regression-check
Jun 3, 2026
Merged

test(core): add series.json regression comparison#706
lewisjared merged 2 commits into
mainfrom
test/series-regression-check

Conversation

@lewisjared
Copy link
Copy Markdown
Contributor

@lewisjared lewisjared commented Jun 3, 2026

Description

Closes #703.

Diagnostic series outputs (series.json) were never compared against the committed regression data. build_execution_result re-extracts and overwrites series.json on every run, and validation only checked CMEC bundle structure an empty or stale series.json passed silently. A diagnostic could change which series it emits (or have wrong/empty committed data) without any regression test failing.

Checklist

Please confirm that this pull request has done the following:

  • Tests added
  • Documentation added (where applicable)
  • Changelog item added to changelog/

Diagnostic series outputs were never compared against the committed
regression data: build_execution_result regenerates series.json and
validation only checked CMEC bundle structure, so an empty/stale
series.json passed silently (issue #703).

Add validate_series_regression to assert regenerated series match the
committed expected series, wired into both RegressionValidator.validate
and the deprecated DiagnosticValidator.validate. Sanitise the regenerated
series via ExecutionRegression.output_replacements so committed
<OUTPUT_DIR>/<TEST_DATA_DIR> placeholders compare equal to expanded
paths. Add unit tests for the guard and a TODO for the equivalent CMEC
bundle content check.
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...s/climate-ref-core/src/climate_ref_core/testing.py 90.00% 1 Missing and 1 partial ⚠️
Flag Coverage Δ
core 93.10% <90.00%> (-0.01%) ⬇️
providers 91.85% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...s/climate-ref-core/src/climate_ref_core/testing.py 89.91% <90.00%> (+<0.01%) ⬆️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lewisjared lewisjared merged commit 5ea1d03 into main Jun 3, 2026
26 checks passed
@lewisjared lewisjared deleted the test/series-regression-check branch June 3, 2026 11:14
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.

Diagnostic series creation does not seem to be tested

1 participant