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

Reporting a few CLI glitches #850

Open
amotl opened this issue Jan 21, 2023 · 1 comment
Open

Reporting a few CLI glitches #850

amotl opened this issue Jan 21, 2023 · 1 comment

Comments

@amotl
Copy link
Member

amotl commented Jan 21, 2023

Dear Benjamin,

thanks for your ongoing efforts to improve the parameter flux compensator. Sometimes, there is a little fallout on the command-line interface, so I wanted to take the chance to report about some issues I have been able to discover while working on the CLI help text.

For now, all items are about data from DWD » OBSERVATION.

With kind regards,
Andreas.

1. No data when filtering by --station=1048,4411

wetterdienst values --provider=dwd --network=observation --parameter=kl --resolution=daily --period=recent --station=1048,4411
2023-01-21 15:54:42,110 [wetterdienst.core.scalar.request] INFO   : Processing request DwdObservationRequest(parameter=[(kl/kl)], resolution=daily, period=[recent], start_date=None, end_date=None, humanize=True, tidy=False, si_units=True)
2023-01-21 15:54:42,359 [wetterdienst.core.scalar.request] INFO   : Filtering for station_id=['1048,4411']
2023-01-21 15:54:42,367 [wetterdienst.core.scalar.values ] ERROR  : No data available for given constraints
2023-01-21 15:54:42,367 [wetterdienst.ui.core            ] ERROR  : No data available for given constraints

Remark: @gutzbenj already confirmed that CommaSeparator = StringListParamType(",") is apparently broken with Cloup, so Wetterdienst is unable to parse multiple items from a comma-separated list. Currently, it only works with single items.

2. Croaks on monthly and annual, when filtering by --station

When acquiring monthly or annual data, and filtering by --station, the program croaks. Example:

wetterdienst values --provider=dwd --network=observation --parameter=kl --resolution=monthly --station=1048
ValueError: DataFrame columns must be unique for orient='records'.

Opposed to that, using --resolution=daily works. When not filtering by station, and using --all instead, it also works.

3. Data for requested parameter missing

The response does not include any data from temperature_air_200/kl. Only data for precipitation_height is returned.

# Acquire data for specific parameter and dataset
wetterdienst values --provider=dwd --network=observation \
    --parameter=precipitation_height/precipitation_more,temperature_air_200/kl \
    --resolution=hourly --date=2020-06-15T12/2020-06-16T12 --station=1048
@amotl
Copy link
Member Author

amotl commented Jan 22, 2023

All of the above issues have been swiftly resolved by @gutzbenj. Thank you so much!

1. No data when filtering by --station=1048,4411

@gutzbenj has a fix for that at GH-853. Thanks a stack!

2. Croaks on monthly and annual, when filtering by --station

@gutzbenj told me the corresponding examples need to use the --tidy flag. Thanks, it will be fixed by 41c4d01. My suggestion to improve the usability would be to catch that DataFrame columns must be unique exception, and respond to the user with something like The result can not be represented in tabular format. Please use the "--tidy" option..

3. Data for requested parameter missing

@gutzbenj told me a correct incantation, which I also added to 41c4d01. Thanks again!

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

No branches or pull requests

1 participant