Closed amotl closed 3 years ago
Probably we should just omit --period for the cli as most services are expected to have no differentiation of periods. Only for the DWD we can expect an overhead in the case that the request is overlapping a new years change.
All right, let's do it like that. I believe it is great that Wetterdienst already sorts this out under the hood so it frees the user from the obligation to think about this parameter. Great work from your side, I appreciate it!
Hi Benjamin,
I am currently giving
cli.py
a refresh and wanted to report about it.This command line invocation listed in the examples section of
wetterdienst --help
croaked:ValueError: 'recent,historical' is not a valid DwdObservationPeriod
```python Traceback (most recent call last): File "/Users/amo/dev/earthobservations/wetterdienst/wetterdienst/util/enumeration.py", line 40, in parse_enumeration_from_template enum_parsed = intermediate[enum_name] File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/enum.py", line 387, in __getitem__ return cls._member_map_[name] KeyError: 'RECENT,HISTORICAL' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/amo/dev/earthobservations/wetterdienst/wetterdienst/util/enumeration.py", line 43, in parse_enumeration_from_template enum_parsed = intermediate(enum_) File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/enum.py", line 339, in __call__ return cls.__new__(cls, value) File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/enum.py", line 662, in __new__ raise ve_exc ValueError: 'recent,historical' is not a valid DwdObservationPeriod During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/amo/dev/earthobservations/wetterdienst/.venv/bin/wetterdienst", line 5, inHowever, everything works perfectly well when just omitting the
--period
parameter, likeCurrently, I am very happy about this and only wanted to ask how we should proceed on this regarding rephrasing the example section.
With kind regards, Andreas.