Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
1972 replace covidcast #2056
base: main
Are you sure you want to change the base?
1972 replace covidcast #2056
Changes from 38 commits
4afe0f0
67a312c
e4f2679
c941982
a5628ac
6e22db8
a2a149f
9269621
8e67b6c
bf21d33
d76cd40
fd50d9d
76f1519
157c6c6
23384e7
e5c3b46
33936a4
01a7f66
6eeef4e
1f59e06
7f60275
55150bc
329d340
9d91be7
5ac98ab
b92695a
15ce75f
6ee3e9e
f25605d
2654946
c63f095
79bf550
4c44d3a
8a308c4
b4039c5
4916465
670bf04
2f94d15
57fc591
913c72f
a9cebed
e30aaca
733c85e
f61462a
06fafd0
d3bc895
68e2850
9ff0979
f7fcefc
957af29
9585196
cf4f06d
b5929af
ee64984
fa9143a
2de9d3b
a1aad7a
38f25bb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love that you broke the sample data out into their own .json files!
However, for accuracy's sake, the format doesnt match actual usage now; youre handing back "HTTP Responses" where the "
epidata
" payload is transposed/rotated from what it is in practice. The API server would be returning a list of dicts, but this is giving a dict of lists.AFAICT, the differences come from the old usage of these tests where it was mocking calls to the
covidcast
library's methods instead of the underlying HTTP Request as it is now -- the old library seems to get these transpositions from its uses ofpd.DataFrame.from_dict()
.TL;DR: If youre going to mock HTTP requests (which i think is the right thing to do), make them return something that looks like the real HTTP responses. Otherwise, mock a different layer in the call stack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I compared the output that epidata.covidcast returned and that's how it returns: sample_epidata_covidcast_result.json
sample code