-
Notifications
You must be signed in to change notification settings - Fork 149
Separate Hazard xarray reader into its own module #1063
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
Conversation
* Make `Hazard.from_raster_xarray` handle files. * Update tests * Fix linter issues
|
Tests fail only in Petals, but unrelated to this PR, see CLIMADA-project/climada_petals#177 |
emanuel-schmid
left a comment
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.
Great work! Much cleaner now. Many thanks.
I've pushed minor cosmetic changes to io.py and marked xarray functions that could also be private. I'm not sure whether they have a use outside of that module. But it doesn't matter much.
|
@emanuel-schmid I marked all free functions of the module as private. Thanks for the review and cosmetic updates! Merging now... |
Changes proposed in this PR:
Hazard.from_raster_xarrayinto a separate module. This avoids an excessively long and complicated single function.Hazard.from_raster_xarray_file. The module separation lets us handle files and datasets elegantly without a separate method.PR Author Checklist
develop)PR Reviewer Checklist