-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix warnings and raise UserWarning
as error in CI
#458
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…GeoPandas new methods/arguments
adehecq
reviewed
Jan 31, 2024
adehecq
reviewed
Jan 31, 2024
adehecq
approved these changes
Jan 31, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all good ! I just have a few questions.
This was referenced Jan 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We had almost 100 warnings! Now all fixed except:
We stopped catching a lot of warnings when modifying warning message during the hackathon (for instance, changing
dst_nodata
innodata
)! A good way to keep track of them from now on would be to considerUserWarning
as an error inpytest
:pytest -W error::UserWarning
. I've added this as a pytest option inpyproject.toml
, and so it will run by default during CI and locally when just writingpytest
! 😄Several warnings allowed to fix some deeper issues, for instance the modification of a
Mask
'sdtype
without converting back in some functions! 😅Also, I added a
NeedToImplementWarning
class (subclass ofFutureWarning
, to avoid triggering errors) to raise warning for us to remember to update the interface to GeoPandas as they add new vector methods.And minor fixes to the API.
EDIT: Change made here instead of #462 by mistake, but doesn't change much (independent)
We mirror the script update in xDEM to parse package versions in CI to avoid failure in Windows and be more flexible in the future. See GlacioHack/xdem#439. See #462 for justification.
Resolves #460
Resolves #459
Resolves #461