Closed djhoese closed 5 months ago
Attention: 1 lines
in your changes are missing coverage. Please review.
Comparison is base (
eaf8367
) 94.05% compared to head (26d8dc9
) 94.06%.
Files | Patch % | Lines |
---|---|---|
pyresample/area_config.py | 92.85% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
If a user has a typo or some other unused parameter in an area YAML definition then pyresample silently ignores it and the user is left confused as to why things aren't working as expected. This PR fixes this by producing a UserWarning in these cases.
I could make this an error but I feel that limits the future flexibility and maintainability of the YAML reading. I could also make a configuration (
pyresample.config
) parameter that controls whether this is a warnings or error...or maybe just another keyword argument, but I'm not sure we need any more kwargs for these functions.TODO: I'd like to rework some of the metadata handling in the future area definitions. I might not do that in this PR as it is decently separate. I noticed while working on this that any unused kwarg is put into the future AreaDefinition's
.attrs
dictionary property. This is error prone as it means that any unrecognized property will go in as "metadata". I'd like to add an explicitattrs:
section to the YAML for defining these metadata values.git diff origin/main **/*py | flake8 --diff