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(modpathfile): step toward generic particle tracking api #2127

Merged
merged 8 commits into from Mar 28, 2024

Conversation

wpbonelli
Copy link
Contributor

@wpbonelli wpbonelli commented Mar 21, 2024

Refactoring in preparation to support PRT output files under a unified interface.

  • introduce particletracking module and ParticleTrackFile base class
  • rename _ModpathSeries -> ModpathFile
  • deduplicate shared logic in ModpathFile
  • add dtypes as public class attributes
  • clarify canonical (minimal) fields
  • misc cleanup in plotutil.py

The PR avoids breaking changes except one: since all ParticleTrackFile children will share the base implementation of write_shapefile() the first param becomes simply data. While this may break uses of pathline_data/etc named params, it seems like a small enough change to make in the next minor release edit: see comment below

* introduce particletracking module and ParticleTrackFile base class
* rename _ModpathSeries -> ModpathFile
* deduplicate shared logic in ModpathFile
* add dtypes as public class attributes
* clarify canonical (minimal) fields
* prep to support PRT output files
Copy link

codecov bot commented Mar 21, 2024

Codecov Report

Attention: Patch coverage is 94.82072% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 73.1%. Comparing base (b142b08) to head (a138a72).
Report is 4 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #2127     +/-   ##
=========================================
+ Coverage     71.3%   73.1%   +1.7%     
=========================================
  Files          259     260      +1     
  Lines        59511   59411    -100     
=========================================
+ Hits         42479   43444    +965     
+ Misses       17032   15967   -1065     
Files Coverage Δ
flopy/plot/plotutil.py 56.0% <100.0%> (+<0.1%) ⬆️
flopy/utils/flopy_io.py 75.3% <ø> (-0.1%) ⬇️
flopy/utils/particletrackfile.py 96.0% <96.0%> (ø)
flopy/utils/modpathfile.py 88.4% <93.8%> (+1.4%) ⬆️

... and 61 files with indirect coverage changes

@wpbonelli wpbonelli marked this pull request as ready for review March 22, 2024 01:23
@wpbonelli
Copy link
Contributor Author

on second thought I restored the write_shapefile functions/params and added a deprecation warning instead — probably best to follow semver and wait for the next major version to introduce a breaking change

@wpbonelli wpbonelli merged commit 77e5e1d into modflowpy:develop Mar 28, 2024
24 checks passed
@wpbonelli wpbonelli deleted the modpathfile branch March 28, 2024 14:07
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.

None yet

2 participants