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

Consider using delphi-epidata python client lib #29

Open
melange396 opened this issue May 29, 2024 · 1 comment
Open

Consider using delphi-epidata python client lib #29

melange396 opened this issue May 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@melange396
Copy link
Contributor

The pip-installable delphi-epidata python client has matured in the recent past, and it continues to improve and add features. Consider using it as a foundation for this library, and build upon it here instead of duplicating its functionality.

With this approach, the delphi-epidata python client can be responsible for network/transport and syntactic concerns (which includes things like handling retries, caching, authentication, decoding responses, handling hostname or path changes, etc), and epidatpy can focus on statistical/analytical methods and data semantics.

There will be less work because there won't [always] be a need to update two separate client packages when API changes happen, and it will keep the server side changes in the same place as the low-level client side changes for compatibility with them.

@dshemetov
Copy link
Contributor

dshemetov commented Jun 3, 2024

I like this idea. Like you said, that library (I'm gonna call it delphi-epidata.py here) can stay focused on query param validation and network stuff, while this library (epidatpy) can handle converting the response to a type-correct Pandas DataFrame, data caching, and ergonomic things like signal name autocomplete. From my initial look at delphi-epidata.py, this seems feasible.

Before we commit to a full migration and rewrite of epidatpy, we should try prototyping this idea with a few endpoints. Some things to note in this experiment:

  • does query param validation in epidatpy and in delphi-epidata.py work well? (I'm thinking of things like date or int or string inputs for the date variable). It would be less than ideal to have some validation here, some validation there, some type coercion here and some there. We should pick one place and focus on handling that there. Since the delphi-epidata.py already does some of that (see here), it seems natural to just continue to keep it there
  • if in the process of doing the above you make changes to delphi-epidata.py, does those changes feel restricted by existing usage in acquisition/server?
  • do we really need async requests? Do we need to support async requests? #30
  • maybe more

@dshemetov dshemetov added the enhancement New feature or request label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants