Skip to content

Conversation

@reneangermeyer
Copy link
Contributor

When loading a model, DATA entries from the NAM file were being added to external_units even when they already existed in output_units (e.g., IUNITAFR from WEL package). This caused duplicate entries in the written NAM file.

Added check for output_units in _prepare_external_files() to prevent adding unit numbers that are already registered as output files.

When loading a model, DATA entries from the NAM file were being added
to external_units even when they already existed in output_units
(e.g., IUNITAFR from WEL package). This caused duplicate entries
in the written NAM file.

Added check for output_units in _prepare_external_files() to prevent
adding unit numbers that are already registered as output files.
@reneangermeyer reneangermeyer changed the title Fix duplicate unit numbers in NAM file for MFUSG external files fix(mfusg): fix duplicate unit numbers in NAM file for MFUSG external files Dec 2, 2025
@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.6%. Comparing base (556c088) to head (36fbbae).
⚠️ Report is 89 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2659      +/-   ##
===========================================
+ Coverage     55.5%    72.6%   +17.1%     
===========================================
  Files          644      667      +23     
  Lines       124135   129356    +5221     
===========================================
+ Hits         68947    93986   +25039     
+ Misses       55188    35370   -19818     
Files with missing lines Coverage Δ
flopy/mfusg/mfusg.py 78.2% <100.0%> (+0.7%) ⬆️

... and 558 files with indirect coverage changes

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

Copy link
Member

@wpbonelli wpbonelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be ideal to have a minimal test for this but presumably it is confirmed to work on your end @reneangermeyer

@wpbonelli wpbonelli merged commit 75b34a0 into modflowpy:develop Dec 2, 2025
20 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.

2 participants