Skip to content

refactor: generalize exchange detection#100

Merged
wpbonelli merged 6 commits into
MODFLOW-ORG:developfrom
wpbonelli:feat/generalize-exchange-detection
Jul 4, 2026
Merged

refactor: generalize exchange detection#100
wpbonelli merged 6 commits into
MODFLOW-ORG:developfrom
wpbonelli:feat/generalize-exchange-detection

Conversation

@wpbonelli

@wpbonelli wpbonelli commented Jul 4, 2026

Copy link
Copy Markdown
Member

check for "X-X" pattern to find like-model exchanges without hardcoding exchange names

wpbonelli and others added 2 commits July 4, 2026 05:15
Model/exchange name detection in ApiMbase._set_package_names,
ApiMbase._create_package_list, and ApiSimulation.load hardcoded
GWF-GWF/GWT-GWT prefix checks for identifying exchange packages.
Replace with a general "X-X" pattern check (matching name minus its
_<n> instance suffix) so GWE-GWE and any future same-domain exchange
type is recognized without more hardcoded prefixes.

Uses the existing get_package_type/package_factory machinery
unchanged -- newly-detected exchange types still fall through to
AdvancedPackage by default, same as GWF-GWF/GWT-GWT did before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@wpbonelli wpbonelli added this to the 0.2.1 milestone Jul 4, 2026
@wpbonelli wpbonelli added the refactor Non-functional changes label Jul 4, 2026
@wpbonelli wpbonelli marked this pull request as ready for review July 4, 2026 17:03
@wpbonelli wpbonelli merged commit 6f5ff76 into MODFLOW-ORG:develop Jul 4, 2026
30 of 34 checks passed
@wpbonelli wpbonelli deleted the feat/generalize-exchange-detection branch July 4, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Non-functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant