Skip to content

Conversation

@aymanalz
Copy link
Contributor

This PR is related to a previous one where several changes were made to mfusg. The PR changes were not merged due to test errors. I worked on resolving these errors and merged with the most up-to-date "develop" branch. Tests were run locally without issues.

@codecov
Copy link

codecov bot commented Aug 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.5%. Comparing base (556c088) to head (e88923e).
⚠️ Report is 34 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2575      +/-   ##
===========================================
+ Coverage     55.5%    72.5%   +16.9%     
===========================================
  Files          644      667      +23     
  Lines       124135   128601    +4466     
===========================================
+ Hits         68947    93239   +24292     
+ Misses       55188    35362   -19826     
Files with missing lines Coverage Δ
flopy/mbase.py 69.9% <ø> (-2.9%) ⬇️
flopy/mfusg/__init__.py 100.0% <ø> (ø)
flopy/mfusg/mfusg.py 78.1% <ø> (+0.6%) ⬆️
flopy/mfusg/mfusgbas.py 88.3% <ø> (ø)
flopy/mfusg/mfusgbcf.py 85.0% <ø> (+4.5%) ⬆️
flopy/mfusg/mfusgbct.py 85.9% <ø> (ø)
flopy/mfusg/mfusgcln.py 68.8% <ø> (+1.8%) ⬆️
flopy/mfusg/mfusgddf.py 88.3% <ø> (ø)
flopy/mfusg/mfusgdis.py 56.5% <ø> (ø)
flopy/mfusg/mfusgdisu.py 82.1% <ø> (-1.6%) ⬇️
... and 14 more

... and 394 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@christianlangevin christianlangevin left a comment

Choose a reason for hiding this comment

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

Looks like you put some work into this, @aymanalz. Would be great to get this in. I see there are still some lint and test errors that could use some tending. And I guess there is the general question about the approach for this PR. It seems like some of the classes (BCF, for example), are duplicates of the MF2005 versions with the additional changes for MODFLOW-USG. While this is not ideal, the changes between MFUSG BCF and MF2005 BCF are substantial and I wonder about the best path forward. I think @cnicol-gwlogic has done a nice job trying to minimize code duplication in support of MFUSG so far. With MFUSG having a full-featured life of its own, perhaps it's best to accept the duplicated code and let the MFUSG versions move forward? @cnicol-gwlogic, any thoughts on this?

@aymanalz
Copy link
Contributor Author

Thanks, Chris, for your comments. I addressed the linting issues. All tests passed now. I agree with you that there is redundancy in the code. I plan resolve these gradually over the following weeks.

@aymanalz aymanalz closed this Aug 12, 2025
@aymanalz aymanalz reopened this Aug 12, 2025
@cnicol-gwlogic
Copy link
Contributor

It is a lot of work, thank you. I've only had a quick look, but one thought that comes to mind on @christianlangevin 's BCF point is that we could try to make a bunch of the load routines common to lpf and BCF (move them to an external class or we could even have a base package that deals with common BCF and lpf stuff, and then we override that for lpf and bcf). Whilst there are differences between the two packages they are not as large as those between mf2005 BCF and usg's BCF.

Although it would be ideal, I think abstracting down usg-transport flopy stuff would be hard because each package can be so different in structure, and there are so many evolving options.

Lots of tests here so I think we should be pretty well covered as it stands.

Copy link

@christianlangevin christianlangevin left a comment

Choose a reason for hiding this comment

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

@aymanalz, I think this is looking really good. For the future, we might consider whether or not we should include all of USG transport examples in the flopy repository, but since they seem to be relatively small, I think this is okay for now, and seems critical for the current testing approach. You might take one last look through the examples and make sure there are no extraneous files. I see there is also a docx file in there, which we probably don't want to version. When you are satisfied, let us know and we will merge.

Choose a reason for hiding this comment

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

Should probably remove from version control

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed!

Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be removed? data.py is an empty python file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, Josh! The file has been removed.

@christianlangevin christianlangevin changed the title Aa usg Add more comprehensive support for MODFLOW-USG transport capabilities and recent updates Aug 15, 2025
@christianlangevin christianlangevin changed the title Add more comprehensive support for MODFLOW-USG transport capabilities and recent updates Comprehensive support for MODFLOW-USG transport capabilities and recent updates Aug 15, 2025
@christianlangevin christianlangevin changed the title Comprehensive support for MODFLOW-USG transport capabilities and recent updates Comprehensive support for MODFLOW-USG ("USG Transport" version) Aug 15, 2025
@christianlangevin christianlangevin merged commit 88300ce into modflowpy:develop Aug 15, 2025
20 checks passed
@christianlangevin
Copy link

Thanks for this @aymanalz!

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.

4 participants