Skip to content

refactor(datafile): deprecate list_records() and other list_ methods#2232

Merged
wpbonelli merged 1 commit into
modflowpy:developfrom
mwtoews:dep-list_records
Jun 14, 2024
Merged

refactor(datafile): deprecate list_records() and other list_ methods#2232
wpbonelli merged 1 commit into
modflowpy:developfrom
mwtoews:dep-list_records

Conversation

@mwtoews
Copy link
Copy Markdown
Contributor

@mwtoews mwtoews commented Jun 14, 2024

Now that data files have a .headers data frame property (#2221), there is no need to have methods that print parts of this information to stdout (they return None). This PR deprecates the following:

  • list_records(): use headers instead
  • list_unique_records(): use headers[["text", "imeth"]].drop_duplicates() instead
  • list_unique_packages(to=True/False): use headers.paknam.drop_duplicates() or headers.paknam2.unique() (there are a few ways)

The last two only apply to CellBudgetFile. This PR does not apply to flopy.mf6.utils.mfobservation.list_records().

@mwtoews mwtoews force-pushed the dep-list_records branch from c450f77 to d331ae1 Compare June 14, 2024 11:17
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.8%. Comparing base (e2a85a3) to head (d331ae1).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #2232     +/-   ##
=========================================
- Coverage     70.8%   70.8%   -0.1%     
=========================================
  Files          294     294             
  Lines        59026   59025      -1     
=========================================
- Hits         41832   41806     -26     
- Misses       17194   17219     +25     
Files Coverage Δ
flopy/utils/binaryfile.py 82.0% <100.0%> (+0.5%) ⬆️
flopy/utils/datafile.py 74.7% <100.0%> (+1.4%) ⬆️
flopy/utils/formattedfile.py 88.9% <ø> (ø)

... and 9 files with indirect coverage changes

@wpbonelli wpbonelli merged commit cfdedbc into modflowpy:develop Jun 14, 2024
@mwtoews mwtoews deleted the dep-list_records branch June 14, 2024 19:21
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