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

Refactor idea: the fetch call chain is too complex #200

Open
dshemetov opened this issue Oct 31, 2023 · 0 comments
Open

Refactor idea: the fetch call chain is too complex #200

dshemetov opened this issue Oct 31, 2023 · 0 comments

Comments

@dshemetov
Copy link
Contributor

Reading through fetch, the callflow is:

  • fetch
  • cache_epidata_call
  • either fetch_tbl or fetch_classic
    • fetch_tbl checks if the method only supports classic and errors out, but then confusingly proceeds to call fetch_classic anyway
    • fetch_classic makes a request

My preference would be:

  • absorb the fetch_tbl and fetch_classic logic into a unified imperative fetch
  • pull the actual fetching part out of cache_epidata_call and only do the is_cacheable checking and storing there after the fetch has gone through
@dsweber2 dsweber2 added this to the Z: epidatr & epidatpy milestone Oct 31, 2023
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

2 participants