Skip to content

feat: test infrastructure + tutorial dataset system#253

Merged
pgierz merged 18 commits intoprep-releasefrom
future/feat/test-infrastructure
Mar 31, 2026
Merged

feat: test infrastructure + tutorial dataset system#253
pgierz merged 18 commits intoprep-releasefrom
future/feat/test-infrastructure

Conversation

@pgierz
Copy link
Copy Markdown
Member

@pgierz pgierz commented Mar 27, 2026

Summary

Combines test infrastructure modernization (#253) and tutorial dataset system (#254) -- they have circular dependencies and must ship together.

Test Infrastructure

  • Rewrite conftest.py with dynamic model fixture discovery via entry points
  • Add tests/contrib/models/awicm_recom/ as built-in model fixture
  • Add .github/scripts/discover_models.py for CI matrix generation
  • Refactor h5py threadsafe tests to use fixtures
  • Add data_fetcher.py and test_data_registry.yaml for centralized data management
  • Add generic model tests and integration test harness
  • Remove old hardcoded integration tests

Tutorial Dataset System

  • Add tutorial loader with entry-point model discovery (pycmor.tutorial.open_dataset())
  • Add stub data generator from YAML manifests
  • Add data fetcher with pooch-based caching
  • Add AWICM-RECOM as built-in tutorial dataset with registry and stub manifest
  • Add tutorial unit tests
  • Add documentation for model fixture development and plugin architecture

Test plan

  • CI passes
  • Entry-point model discovery works for built-in awicm_recom model
  • Tutorial loader discovers registered datasets
  • Stub data generation from YAML manifests works

🤖 Generated with Claude Code

@pgierz pgierz force-pushed the future/feat/test-infrastructure branch from d8fc40b to ff7450b Compare March 30, 2026 08:25
@pgierz pgierz changed the title feat: modernize test infrastructure with entry-point model discovery feat: test infrastructure + tutorial dataset system Mar 30, 2026
@pgierz pgierz force-pushed the future/feat/test-infrastructure branch from 820ac5f to 2b85427 Compare March 30, 2026 11:11
pgierz added 9 commits March 30, 2026 13:44
- Rewrite conftest.py with dynamic model fixture discovery via entry points
- Add tests/contrib/models/awicm_recom/ as built-in model fixture
- Add .github/scripts/discover_models.py for CI matrix generation
- Refactor h5py threadsafe tests to use fixtures
- Add data_fetcher.py and test_data_registry.yaml for centralized data management
- Add generic model tests and integration test harness
- Remove old hardcoded integration tests
- Add tutorial loader with entry-point model discovery
- Add stub data generator from YAML manifests
- Add data fetcher with pooch-based caching
- Add AWICM-RECOM as built-in tutorial dataset
- Add tutorial unit tests
- Add documentation for model fixture development
"FESOM" is not a registered source_id in the CMIP6 CV, causing
KeyError during global attribute generation. Changed to AWI-ESM-1-1-LR
in all test configs and sample rules.
…r test

- Remove @main pin from pycmor-test-data-fesom to pick up latest commits
- Use model_run_instance.configs dict instead of config_path_cmip6/cmip7
  properties (external packages override configs but not the base paths)
@pgierz pgierz force-pushed the future/feat/test-infrastructure branch from 2bff720 to 081502e Compare March 30, 2026 11:44
pgierz added 2 commits March 30, 2026 14:06
When tarball extraction logic changes (e.g., fixing double nesting),
the cached extracted directories become stale. Set PYCMOR_FORCE_REEXTRACT=1
to force re-extraction on the next run.

Also cleans up imports (moves sys, tarfile, shutil to top-level).
@pgierz pgierz merged commit 61c5b55 into prep-release Mar 31, 2026
50 of 51 checks passed
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.

1 participant