toolchain: do not require (xyz)_domain extents on restarts - #1734
toolchain: do not require (xyz)_domain extents on restarts#1734sbryngelson wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Python toolchain case validator so (xyz)_domain%beg/end are only required during pre_process grid generation, and are explicitly not required for restarts (old_grid = T) or for simulation/post_process, aligning validation behavior with restart workflows and parameter staging.
Changes:
- Removed the
x_domain%beg/endrequirement fromcheck_parameter_types()(which runs for all stages). - Added a new pre-process-only
check_domain_extents()(skips whenold_grid = T) and expanded coverage toy/zwhenn/p > 0. - Added integration tests covering missing extents, restart behavior, and non-pre-process stages.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| toolchain/mfc/case_validator.py | Moves domain-extent requirements into a pre-process-only check, skips on restarts, and adds y/z coverage; updates physics-doc metadata. |
| toolchain/mfc/params_tests/test_integration.py | Adds integration tests to prevent regressions for restart and stage-specific domain-extent requirements. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "check_domain_extents": { | ||
| "title": "Domain Extents Specified", | ||
| "category": "Domain and Geometry", | ||
| "math": r"m > 0 \Rightarrow x_{\mathrm{beg}}, x_{\mathrm{end}} \ \mathrm{set}", |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1734 +/- ##
=======================================
Coverage 61.59% 61.59%
=======================================
Files 84 84
Lines 21493 21493
Branches 3176 3176
=======================================
Hits 13239 13239
Misses 6078 6078
Partials 2176 2176 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
(xyz)_domain%begand(xyz)_domain%endwere required wheneverm > 0, in every stage. That is wrong twice over:check_parameter_types(), whichvalidate_common()calls, so it fired forsimulationandpost_processtoo.x_domain/y_domain/z_domainare pre-process-only parameters (_PREinparams/definitions.py); the other two executables never read them.old_grid = T, pre-process reads the mesh from the existing grid files and setsx_domain%beg/enditself fromx_cb(src/pre_process/m_start_up.fpp). The case file must not supply them, which is exactly what the restart instructions indocs/documentation/running.mdtell users to do.The shipped
examples/1D_vacuum_restart/restart_case.pyfails validation for this reason as well. CI never caught it because the lint job globsexamples/*/case.pyonly, and./mfc.sh validatereports constraint violations as warnings rather than a nonzero exit.The requirement moves into a pre-process-only
check_domain_extents()that returns early onold_grid = T. It also now coversyandz: onlyxwas checked before, though the grid generator needs the extents of every dimension that has cells.Closes #1733.
Type of change
Testing
./mfc.sh validate examples/1D_vacuum_restart/restart_case.pypasses all three stages (it failed all three before).examples/*/*case*.pythrough all three stages before and after the change: the only difference is the restart case going from fail to pass. The newy/zrequirements break no existing example.params_tests/test_integration.pyfail before this change and pass after../mfc.sh formatand./mfc.sh precheckclean; toolchain pytest green.Checklist
The docs already described the intended behavior; this makes the validator agree with them.