Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

mwtoews
Copy link
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().

Copy link

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
24 checks passed
@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