Skip to content

feat(plot_bc): add subset argument#2694

Merged
jdhughes-dev merged 3 commits intomodflowpy:developfrom
jdhughes-dev:feat-plot_bc
Jan 28, 2026
Merged

feat(plot_bc): add subset argument#2694
jdhughes-dev merged 3 commits intomodflowpy:developfrom
jdhughes-dev:feat-plot_bc

Conversation

@jdhughes-dev
Copy link
Contributor

Add subset argument to map and cross-section plots that allows a selection of boundary conditions to be shown.

@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 76.92308% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.3%. Comparing base (556c088) to head (b717633).
⚠️ Report is 114 commits behind head on develop.

Files with missing lines Patch % Lines
flopy/plot/crosssection.py 72.7% 3 Missing ⚠️
flopy/plot/map.py 80.0% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2694      +/-   ##
===========================================
+ Coverage     55.5%    72.3%   +16.8%     
===========================================
  Files          644      667      +23     
  Lines       124135   130334    +6199     
===========================================
+ Hits         68947    94326   +25379     
+ Misses       55188    36008   -19180     
Files with missing lines Coverage Δ
flopy/plot/crosssection.py 64.6% <72.7%> (-2.5%) ⬇️
flopy/plot/map.py 82.3% <80.0%> (+0.2%) ⬆️

... and 561 files with indirect coverage changes

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

boundname : string
select boundary conditions with specific boundname
subset : int, tuple of ints, or list of such
Acceptable values depend on grid type:
Copy link
Member

Choose a reason for hiding this comment

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

suggest saying explicitly that this is a subset of cell IDs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me know if the change is acceptable.

Copy link
Member

Choose a reason for hiding this comment

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

looks good to me

layer or the head value. Used to create
patches that conform to water-level elevations.
subset : int, tuple of ints, or list of such
Acceptable values depend on grid type:
Copy link
Member

Choose a reason for hiding this comment

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

suggest saying explicitly that this is a subset of cell IDs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me know if the change is acceptable.

)
ax = mapview.ax

if len(ax.collections) == 0:
Copy link
Member

Choose a reason for hiding this comment

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

this could assert that with subset the number of geometries added to the plot is different than without but if this test is just for visual checking there is no need I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add check of specific number of non-masked values

@jdhughes-dev jdhughes-dev merged commit fea6fe6 into modflowpy:develop Jan 28, 2026
20 checks passed
@jdhughes-dev jdhughes-dev deleted the feat-plot_bc branch January 28, 2026 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.

2 participants