-
Notifications
You must be signed in to change notification settings - Fork 10
Migrate to diagnostic-centric test data #475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* origin/main: ci: Update uv in CI chore: change to pin for fastprogress fix: Bump a yanked version of deprecated fix: Add IPython to depedencies temporarily
* origin/main: fix: use uv not pip docs: Changelog ci: Ignore dependabot PRs Bump version: 0.8.0 → 0.8.1 docs: Clean up missing changelogs chore(deps): bump the github-actions group with 5 updates chore: Add dependabot
…mplicit (fall through) returns' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* origin/main: chore: pin xarray for ilamb3 due to issue fix: handle a regression in xarray fix: Clean up some type hints from updating mypy docs: fix typo chore(deps-dev): bump the python-dependencies group with 31 updates
|
This is getting pretty big and have already had a few iterations of cleaning, but is still backwards compatible so I'll get this merged and then add it to the test suite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a diagnostic-centric test data management system to replace the monolithic test data approach. Each diagnostic now defines its own test data requirements via TestDataSpecification, enabling selective data fetching and independent testing.
Key Changes
- New ESGF data fetching infrastructure with support for CMIP6 and obs4MIPs datasets
- CLI commands (
ref test-cases fetch/list/run) for managing test cases TestCaseandTestDataSpecificationclasses for defining reproducible test scenarios- Test harness with
TestCaseRunnerand pytest fixtures for diagnostic testing
Reviewed changes
Copilot reviewed 29 out of 31 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
packages/climate-ref-core/src/climate_ref_core/testing.py |
Core testing infrastructure with TestCase and TestDataSpecification classes |
packages/climate-ref-core/src/climate_ref_core/esgf/ |
New ESGF module with CMIP6Request, Obs4MIPsRequest, and ESGFFetcher |
packages/climate-ref-core/src/climate_ref_core/exceptions.py |
New test case exceptions (NoTestDataSpecError, TestCaseNotFoundError, DatasetResolutionError) |
packages/climate-ref/src/climate_ref/testing.py |
TestCaseRunner implementation and catalog path utilities |
packages/climate-ref/src/climate_ref/cli/test_cases.py |
New CLI commands for fetching, listing, and running test cases |
packages/climate-ref/src/climate_ref/datasets/__init__.py |
Refactored imports to support new dataset adapters |
conftest.py |
New pytest fixtures (run_test_case, esgf_test_data_dir, esgf_solve_catalog) |
docs/how-to-guides/testing-diagnostics.md |
Comprehensive documentation for the new testing infrastructure |
packages/climate-ref-example/src/climate_ref_example/example.py |
Example diagnostic with test_data_spec |
packages/climate-ref-core/pyproject.toml |
Added intake-esgf and pyarrow dependencies |
uv.lock |
Updated lock file with new dependencies |
pyproject.toml |
Added pytest warning filters for test domain classes |
tests/test-data/.gitignore |
Added esgf-data directory to gitignore |
| Various test files | Comprehensive unit tests for new ESGF and testing infrastructure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
This is the first step in reworking how we do sample data.
Diagnostics are now responsible for defining the test datasets they need from ESGF.
These will be able to be selectively fetched/cached as needed so any diagnostic author doesn't require the full set of data (the CI still needs the full set).
This PR adds the data structures for defining test cases, and the CLI to run specific tests.
The next PR will migrate the sample data requests to this new format.
#472
Checklist
Please confirm that this pull request has done the following:
changelog/