Skip to content

Conversation

@chinandrew
Copy link
Contributor

@chinandrew chinandrew commented Jan 28, 2021

To be used by covidcast client (to speed up indicator combo) and also in nowcasting.

One thing to note is that running this on some machines and/or in jupyter can lead to this an issue that requires you run these two lines to solve. For that reason I'm not sure we'll want to make this the default method in covidcast, since we don't have much control over people's environments. Adding those lines at the top of the client file seems to resolves it for me, but not sure if that'll hold universally. If it does, then we might be fine. If not, we could set a protected flag in covidcast for async that only our internal users/superusers will change.

Summary of changes:

  • Added a method which takes in a list of raw params and sends an async request for each param. Does not do any formatting/cleaning/parsing of the params so it's compatible with any epidata source (at the expense of convenient) 2 helper methods are also added to make the requests.
  • 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.

Looks legit, but the documentation for delphi_epidata is so nonexistant that we definitely need people to be able to tell what get/fetch are for just by their names. No accidents from people doing dir(Epidata) and guessing

(do get/fetch even need to be static members or can they be local functions within async_call? will you be calling them directly from nowcast?)

chinandrew and others added 4 commits January 28, 2021 13:20
Co-authored-by: Katie Mazaitis <krivard@cs.cmu.edu>
Co-authored-by: Katie Mazaitis <krivard@cs.cmu.edu>
Co-authored-by: Katie Mazaitis <krivard@cs.cmu.edu>
Co-authored-by: Katie Mazaitis <krivard@cs.cmu.edu>
@chinandrew
Copy link
Contributor Author

Looks legit, but the documentation for delphi_epidata is so nonexistant that we definitely need people to be able to tell what get/fetch are for just by their names. No accidents from people doing dir(Epidata) and guessing

(do get/fetch even need to be static members or can they be local functions within async_call? will you be calling them directly from nowcast?)

Good point, only the async_call is the only one that will be used publicly (maybe i should switch the names of async_call and async_fetch_epidata), so the others don't need to be visible. Ill work on it

@chinandrew
Copy link
Contributor Author

Updated to make functions local and also renamed them.

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.

👩‍🍳 💋

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.

2 participants