Skip to content

fre.cmor: create CMIP7 flavored tests of cmor_run_subtool_further_examples#838

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/create-cmip7-flavored-tests
Draft

fre.cmor: create CMIP7 flavored tests of cmor_run_subtool_further_examples#838
Copilot wants to merge 4 commits intomainfrom
copilot/create-cmip7-flavored-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 3, 2026

Describe your changes

Adds CMIP7-flavored parametrized tests to test_cmor_run_subtool_further_examples.py, mirroring the existing CMIP6 tests but exercising CMIP7 code paths (brand extraction, CMIP7 table configs, CMIP7 output path/file templates).

  • CMIP7 constants: CMIP7_TABLE_REPO_PATH, EXP_CONFIG_CMIP7, CMOR_CREATES_DIR_BASE_CMIP7 following the CMIP7 DRS output path template
  • test_cmip7_case_function: 3 parametrized cases (ocean/so/g99, ocean/sos/g99, land/lai/g99) using CMIP7_ocean.json and CMIP7_land.json table configs with CMOR_CMIP7_input_example.json exp config. All cases use g99 grid_label, the only value accepted by the CMIP7 Controlled Vocabulary.
  • CMIP7 output validation: Uses glob patterns to match brand-suffixed output directories/files since brands are determined at runtime by the CMIP7 table content
  • test_git_cleanup_cmip7: Restores the CMIP7 exp config after tests modify it
  • Monkeypatch: Unconditionally patches find_gold_ocean_statics_file for all CMIP7 tests since there is no /archive path available in CI

Issue ticket number and link (if applicable)

Checklist before requesting a review

  • I ran my code
  • I tried to make my code readable
  • I tried to comment my code
  • I wrote a new test, if applicable
  • I wrote new instructions/documentation, if applicable
  • I ran pytest and inspected it's output
  • I ran pylint and attempted to implement some of it's feedback
  • No print statements; all user-facing info uses logging module

Copilot AI changed the title [WIP] Add CMIP7 flavored tests for cmor_run_subtool_further_examples fre.cmor: create CMIP7 flavored tests of cmor_run_subtool_further_examples Apr 3, 2026
Copilot AI requested a review from ilaflott April 3, 2026 07:29
@ilaflott ilaflott changed the title fre.cmor: create CMIP7 flavored tests of cmor_run_subtool_further_examples fre.cmor: create CMIP7 flavored tests of cmor_run_subtool_further_examples Apr 3, 2026
@ilaflott
Copy link
Copy Markdown
Member

ilaflott commented Apr 3, 2026

@copilot iterate

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 3, 2026

@copilot iterate

Fixed in 5d7b69d and 5bb93f3. The CMIP7 tests were failing because the CMIP7 CV only accepts g99 as a valid grid_label — the CMIP6-era labels (gr, gn, gr1) are rejected. Updated all 3 CMIP7 parametrized tests to use g99, matching the pattern in the existing working CMIP7 CLI tests in test_fre_cmor_cli.py. Also restored the exp config JSON files that were accidentally committed in a test-modified state. All 13 tests pass now (8 CMIP6 + 3 CMIP7 + 2 cleanup).

@ilaflott
Copy link
Copy Markdown
Member

still being poked at in ilaflott/fremorizer, keep for now

@ilaflott ilaflott force-pushed the copilot/create-cmip7-flavored-tests branch from 5bb93f3 to 7dcdc38 Compare April 14, 2026 20:22
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.12%. Comparing base (836559e) to head (7dcdc38).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #838   +/-   ##
=======================================
  Coverage   84.12%   84.12%           
=======================================
  Files          71       71           
  Lines        4944     4944           
=======================================
  Hits         4159     4159           
  Misses        785      785           
Flag Coverage Δ
unittests 84.12% <ø> (ø)

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


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 836559e...7dcdc38. Read the comment docs.

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

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.

fre.cmor: create CMIP7 flavored tests of cmor_run_subtool_further_examples

2 participants