Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: throw error on invalid crs type#2533

Merged
wpbonelli merged 1 commit into
modflowpy:developfrom
emmanuel-ferdman:develop
Jun 14, 2025
Merged

fix: throw error on invalid crs type#2533
wpbonelli merged 1 commit into
modflowpy:developfrom
emmanuel-ferdman:develop

Conversation

@emmanuel-ferdman

Copy link
Copy Markdown
Contributor

PR Summary

This really small PR simply adds the missing raise to the "invalid crs type" exception.

@codecov

codecov Bot commented Jun 14, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.6%. Comparing base (556c088) to head (8f75805).
Report is 6 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #2533      +/-   ##
==========================================
- Coverage     55.5%   36.6%   -18.9%     
==========================================
  Files          644     345     -299     
  Lines       124135   61808   -62327     
==========================================
- Hits         68947   22672   -46275     
+ Misses       55188   39136   -16052     

see 321 files with indirect coverage changes

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

@wpbonelli wpbonelli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@wpbonelli

Copy link
Copy Markdown
Member

This flushed out some issues in our tests and in the synthetic valley mf6 example model. It seems a CRS string is required in some cases but we are not providing one. I'll defer here to someone more familiar with CRS and expectations of the rasters module maybe @jlarsen-usgs or @aleaf?

@wpbonelli wpbonelli merged commit d4408e9 into modflowpy:develop Jun 14, 2025
7 of 12 checks passed
@wpbonelli

wpbonelli commented Jun 16, 2025

Copy link
Copy Markdown
Member

@emmanuel-ferdman did you find this reading through the code, or in the "real world"?

On second look, @mjreno and I are wondering if an error is really appropriate here. rasterio.from_user_input() will raise an error if it can't parse the CRS string. The fact that this has gone unnoticed for 6 years suggests we may not want to raise an error here?

I'm going to run with this and remove the error in the meantime to get our CI back up and running.

wpbonelli added a commit that referenced this pull request Jun 16, 2025
Reconsider the error which is the subject of #2533. Probably not the final word here, but rasterio.from_user_input() will raise an error if it can't parse the CRS string. Is this sufficient?
@aleaf

aleaf commented Jun 17, 2025

Copy link
Copy Markdown
Contributor

agreed that we should let rasterio raise this error.

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