Repository navigation
Conversation
flopy4 is renaming stress_period_data to period_data on every package, and currently maps the name in its codegen and grammar builder. Name the lists period_data in the dev2 migration so that mapping can go. The name never appears in an input file, so MF6 input is unaffected and there is no schema version bump. _FK_BACKFILL keeps the v1 name, since _apply_fk_backfill runs before _name_period_lists. _retarget_fk_backfill runs after it, so it now looks period lists up by their final name. Without this it silently skips them, which the snapshots don't catch while the pinned DFNs use idcxs. List items keep their v1-derived names. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The gwf-oc and prt-prp descriptions and the gwf-mvr example still used older period list names. Also correct the comment on List.children, since an item's name doesn't generally match its list's. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
flopy4 renamed
stress_period_datatoperiod_dataon every package (modflowpy/pyphoenix-project#540), and maps the DFN name in its codegen and grammar builder. This names the listsperiod_datain the dev2 migration so that mapping can be removed.Most of the diff is regenerated snapshots: 354 files, 177 each in
v2.0.0.dev2andv2.0.0.dev3, all differing fromdeveloponly by the rename.dev0anddev1are unchanged.Migration
_PERIOD_LIST_NAMEis nowperiod_data, and STO's scalar in_collapse_sto_keywordsuses it too._FK_BACKFILL: it keepsstress_period_dataforchf-cdb,chf-zdgandolf-zdg. This is deliberate: it's the v1 name, which_apply_fk_backfillneeds because it runs before_name_period_lists._retarget_fk_backfill: it runs after_name_period_lists, so it now looks period lists up by their final name. Without this it silently skips them, and the fk stays onidcxseven whenchf-cxs's key isifno. The snapshots can't catch that while the pinned DFNs useidcxs, buttest_migrate_cross_section_keys[ifno]does.Worth checking in review
dev2is edited in place. The name never appears in an input file, and fix(dfns): name STO's period field stress_period_data #398 set the precedent. Code indexingfields["stress_period_data"], or holdingdev2/dev3files written earlier, will break. Only flopy4 was checked for this.item.nameis unchanged: list items keep their v1-derived names, so 31 stress packages still haveitem.name = "stress_period_data"underperiod_data. Other period lists already differ in the same way (perioddata,lakeperioddata,output_record, ...).Testing
pytest autotest/dfns: 692 passed, 2 skipped, 1752 snapshots passed. The 2 skips need GitHub network access or a release asset.An earlier trial of this change against flopy4's
period-databranch produced no generated-code diff. That trial used a literal for STO's name rather than_PERIOD_LIST_NAME, and it wasn't rerun on this commit.After merging
flopy4 needs a follow-up that bumps its lock, removes its name mapping, and fixes
test_legacy_period_kwargs_match_dfns, which fails with the new name.🤖 Generated with Claude Code