Skip to content

Conversation

@wpbonelli
Copy link
Member

Add an optional parameter replace=False to the .set_data() methods on the stress period data model. Setting this True resets the data before setting provided keys, i.e. clears all preexisting entries rather than leaving them in place.

Since stress period configuration is not stored solely in the underlying data model but also in package block headers, a trap is necessary in MFBlock.write() to sync block headers to the keys existing in the period data, to avoid writing empty/spurious period blocks.

Suggested in #2663 (comment)

@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

❌ Patch coverage is 97.67442% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.6%. Comparing base (556c088) to head (37dd348).
⚠️ Report is 91 commits behind head on develop.

Files with missing lines Patch % Lines
flopy/mf6/data/mfdataarray.py 90.0% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2664      +/-   ##
===========================================
+ Coverage     55.5%    72.6%   +17.1%     
===========================================
  Files          644      667      +23     
  Lines       124135   129426    +5291     
===========================================
+ Hits         68947    94065   +25118     
+ Misses       55188    35361   -19827     
Files with missing lines Coverage Δ
flopy/mf6/data/mfdatalist.py 66.3% <100.0%> (-3.0%) ⬇️
flopy/mf6/data/mfdataplist.py 74.1% <100.0%> (-4.8%) ⬇️
flopy/mf6/mfpackage.py 68.7% <100.0%> (-12.9%) ⬇️
flopy/mf6/data/mfdataarray.py 59.4% <90.0%> (-7.6%) ⬇️

... and 555 files with indirect coverage changes

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

@wpbonelli wpbonelli marked this pull request as ready for review December 11, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant