Skip to content

Clarify API reference data error messages; authenticate API reference data requests #1874

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

Merged
merged 9 commits into from
Jul 25, 2023

Conversation

nmdefries
Copy link
Contributor

@nmdefries nmdefries commented Jul 20, 2023

Description

Address this comment. google-symptoms validation was failing with an ambiguous error message, Error fetching data from 2023-06-20 to 2023-07-17 for data source: google-symptoms....

To enable better debugging in the future, change the wording to be more specific and add a check for a None API result. Also authenticate COVIDcast requests in a more general way, adding the API key to the Parameters object.

Changelog

  • delphi_utils/validator/dynamic.py
  • delphi_utils/validator/datafetcher.py

This lets the `meta` and `signal` calls share the same authentication
init. We also don't need to do a second `read_params` in
`get_geo_signal_combos`; instead pass the API key as an arg.
@nmdefries nmdefries requested a review from minhkhul July 20, 2023 22:31
@nmdefries nmdefries changed the title Ndefries/validator ref data authentication Clarify API reference data error messages; authenticate API reference data requests Jul 20, 2023
@nmdefries
Copy link
Contributor Author

Need to fix tests!

Copy link
Contributor

@krivard krivard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional wording adjustment to thread count warning

Copy link
Contributor

@minhkhul minhkhul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making api_key an attribute of Parameters class.

@nmdefries nmdefries merged commit 2759fe4 into main Jul 25, 2023
@nmdefries nmdefries deleted the ndefries/validator-ref-data-authentication branch July 25, 2023 18:50
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

Successfully merging this pull request may close these issues.

3 participants