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

feat(utils): move utils from modflow-devtools #1621

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

wpbonelli
Copy link
Member

@wpbonelli wpbonelli commented Nov 6, 2022

Move utilities that seem in-scope for flopy from modflow-devtools (originally from pymake)

  • head & budget file writing
  • head and budget comparison
  • creating DISU model objects
  • creating a uniform flow field
  • reading entries from namefiles

Minimal tests are added for the last three items. The first two have either extremely minimal tests or (skipped) empty stubs. This PR will allow refactored modflow6 tests in MODFLOW-USGS/modflow6#1066 to import from FloPy instead of pymake. I'm planning to return to this and expand the tests after getting more comfortable with how they're used in modflow6 autotests.

Both items below were moved to #1665

@codecov
Copy link

codecov bot commented Nov 6, 2022

Codecov Report

Merging #1621 (fe42a91) into develop (96fc3ad) will decrease coverage by 1.2%.
The diff coverage is 13.1%.

❗ Current head fe42a91 differs from pull request most recent head 25d6697. Consider uploading reports for the commit 25d6697 to get more accurate results

@@            Coverage Diff            @@
##           develop   #1621     +/-   ##
=========================================
- Coverage     72.8%   71.6%   -1.3%     
=========================================
  Files          252     253      +1     
  Lines        54551   55729   +1178     
=========================================
+ Hits         39747   39902    +155     
- Misses       14804   15827   +1023     
Impacted Files Coverage Δ
flopy/utils/compare.py 0.0% <0.0%> (ø)
flopy/utils/mfreadnam.py 32.2% <10.5%> (-46.1%) ⬇️
flopy/utils/binaryfile.py 77.2% <36.3%> (-2.1%) ⬇️
flopy/utils/gridutil.py 97.7% <99.0%> (+6.8%) ⬆️
flopy/mf6/utils/generate_classes.py 15.8% <0.0%> (-0.5%) ⬇️

Copy link
Contributor

@jdhughes-usgs jdhughes-usgs left a comment

Choose a reason for hiding this comment

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

Seems like it would be useful to have many of the autotest comparison functions from pymake in flopy.

flopy/utils/compare.py Outdated Show resolved Hide resolved
flopy/utils/compare.py Outdated Show resolved Hide resolved
flopy/utils/compare.py Outdated Show resolved Hide resolved
* add head and budget file writing util fns
* add disu creation helper fn
* add uniform flow field fn
* add head/budget/concentration comparison utility fns
* add namefile-reading utility fn
* lint tests and notebook utils
* add test for HeadUFile.get_ts()
* add minimal tests for relocated utils
@wpbonelli wpbonelli force-pushed the relocate-from-devtools branch from fe42a91 to 25d6697 Compare December 20, 2022 19:59
@wpbonelli wpbonelli marked this pull request as ready for review December 20, 2022 20:12
@wpbonelli wpbonelli merged commit 94cd19d into modflowpy:develop Dec 20, 2022
@wpbonelli wpbonelli deleted the relocate-from-devtools branch December 20, 2022 21:13
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.

3 participants