Skip to content

fix(mfdataplist): fix multiple issues#2775

Merged
wpbonelli merged 2 commits into
modflowpy:developfrom
wpbonelli:fix-mfdataplist
Jun 29, 2026
Merged

fix(mfdataplist): fix multiple issues#2775
wpbonelli merged 2 commits into
modflowpy:developfrom
wpbonelli:fix-mfdataplist

Conversation

@wpbonelli

Copy link
Copy Markdown
Member

Fix some cases where MFPandasList behaved inconsistently with MFList/MFTransientList

  1. support None period data, fixed in set_record (added record["data"] is not None)
  2. convert 0- to 1-based indexing for non-cell-ID fields marked with numeric_index
  3. support external file paths via open/close, fixed with new branch in set_data()

These were flushed out by MODFLOW-ORG/modflow6#2868, which added # package-type stress-package to a number of DFNs. Since the pandas alternative list impl was added in #1955, list blocks in stress packages use MFPandasList by default while other packages use the old MFList, due evidently to some gaps in the pandas approach.

Also some related refactoring/fixes/cleanup

  • support DIS2D/DISV1D/DISV2D cell IDs
  • add _get_cellid_columns() helper to centralize cellid column logic
  • delete _unique_column_name(), _untuple_manually()
  • fix a typo in mffileaccess.py (cellid_nodes → cellid_node)

@wpbonelli wpbonelli added this to the 3.10.1 milestone Jun 29, 2026
@wpbonelli wpbonelli added the bug label Jun 29, 2026
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.5%. Comparing base (556c088) to head (8d13e27).
⚠️ Report is 176 commits behind head on develop.

Files with missing lines Patch % Lines
flopy/mf6/data/mfdataplist.py 67.5% 25 Missing ⚠️
flopy/mf6/data/mffileaccess.py 0.0% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2775      +/-   ##
===========================================
+ Coverage     55.5%    72.5%   +17.0%     
===========================================
  Files          644      677      +33     
  Lines       124135   132637    +8502     
===========================================
+ Hits         68947    96277   +27330     
+ Misses       55188    36360   -18828     
Files with missing lines Coverage Δ
flopy/mf6/data/mffileaccess.py 72.6% <0.0%> (-3.4%) ⬇️
flopy/mf6/data/mfdataplist.py 71.5% <67.5%> (-7.3%) ⬇️

... and 578 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 June 29, 2026 14:27
@wpbonelli wpbonelli merged commit 018bd9c into modflowpy:develop Jun 29, 2026
20 checks passed
@wpbonelli wpbonelli deleted the fix-mfdataplist branch June 29, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant