Skip to content
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

errors in area definition should not be silently ignored #570

Closed
gerritholl opened this issue Dec 11, 2023 · 1 comment · Fixed by #577
Closed

errors in area definition should not be silently ignored #570

gerritholl opened this issue Dec 11, 2023 · 1 comment · Fixed by #577
Labels

Comments

@gerritholl
Copy link
Member

Code Sample, a minimal, complete, and verifiable piece of code

from pyresample.area_config import load_area_from_string

ardef = """dyn_2km:
  description: dyn_2km
  projection:
    EPSG: 4087
  revolution: 2000
"""

load_area_from_string(ardef_dyn)

Problem description

I would like this to fail, noting that revolution is not a valid property/keyword argument/attribute.

Expected Output

I expect a failure.

Actual Result, Traceback if applicable

The code succeeds.

Versions of Python, package at hand and relevant dependencies

pyresample main

@gerritholl gerritholl added the bug label Dec 11, 2023
@djhoese
Copy link
Member

djhoese commented Jan 3, 2024

Given that the file format is YAML and doesn't require a schema to be parsed/defined, I'd like to leave the flexibility of users defining their own attributes or properties that they can use as they want. It would also make it easier for pyresample to have forward and backward compatibility of we change things later on. What do you think about a warning for any unused parameters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants