-
Notifications
You must be signed in to change notification settings - Fork 68
Add CovidcastRow
testing util and a few other changes
#1044
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
Conversation
08b4589
to
8da9b0f
Compare
ec5c6c6
to
163185f
Compare
Oh no, #1043 was squash-merged, so now git won't be able to automatically identify any commits from this PR that were also in that one. You'll need to rebase -i and drop the following: Squash merging is great if you want to quickly tidy away details of the development process that are no longer relevant, but if you're still working on the branch (like this, with several PRs open that chain off one another), they make a mess. Squash with caution! |
True, fortunately I'm ok with rebasing and force pushing into my branches, since no one else develops on these. |
163185f
to
9fc5535
Compare
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.
Partial review pass up through ~half of covidcast_row.py
We should probably talk in a synchronous format about how to architect CovidcastRow for use in production vs tests; this complete overlap approach makes me hella nervous
8a75d92
to
aa25eee
Compare
3bcc0cb
to
703d57c
Compare
looking at this now... do you wanna base it against |
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.
this is fantastic! it needed to happen and thank you for taking care of it. CovidcastRow
came out nice and OO, i really like it.
but im sorry :( there are a whopping 35 comments on this.... a lot are real easy: 3 are just notes you can dismiss, and 17 are nits (almost all w/ pre-populated suggestions). i jumped around a lot while reviewing (not in file-order), but hopefully it should all make sense. the meatier things are: the schema of columns in CovidcastRow, things that may or may not belong in/with the testing base class, semantics around handling of some values, and some readability stuff. i also went a little crazy with the underscores in the date ints.
i am also very happy to get on a zoom to pair up to discuss any or all of my comments.
i must say for the record that i dont love the type annotations everywhere, especially because we are not doing any real rigorous checking or enforcement of them, but i will assume your IDE is telling you that they all check out... i feel a bit like its a plague of locusts coming to descend upon me and maybe i cant get away from it
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.
Most of these are tagging places where we could drop in as_api_compatibility_dict
for as_dict
, but I also have a concern about signing future-us up for more test revision hell the next time we do a major schema change
"source": "src", | ||
"signal": "sig", | ||
"time_type": "day", | ||
"geo_type": "county", | ||
"time_value": 20200202, | ||
"geo_value": "01234", | ||
"value": 5.0, | ||
"stderr": 10.0, | ||
"sample_size": 10.0, | ||
"missing_value": Nans.NOT_MISSING, | ||
"missing_stderr": Nans.NOT_MISSING, | ||
"missing_sample_size": Nans.NOT_MISSING, | ||
"issue": 20200202, | ||
"lag": 0, | ||
"direction": None |
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.
concern: tedious consequences
see "tedious consequences" above -- if any of our defaults ever change, we'll need to update them in 2 places.
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.
So I've addressed this by writing a single expected_df
variable at the top of the class and having all the test cases draw from this example.
Co-authored-by: Katie Mazaitis <[email protected]> Co-authored-by: melange396 <[email protected]>
ab7607f
to
4b54dd6
Compare
* no default values * helper functions for creating rows
Co-authored-by: Katie Mazaitis <[email protected]> Co-authored-by: melange396 <[email protected]>
183187a
to
b3cba4c
Compare
Thanks for all the review comments! I believe I have addressed all of them and synced with @melange396 on it yesterday. I rebased and force pushed to clean up the review commit log. Should be good to merge. |
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.
Glorious triumph 💯
I made a number of QoL changes to the tests and the server in the process of working on JIT (see also #949). I decided to separate them out, so we can release them separately from JIT and help debug if anything goes wrong.
Built on #1072.
Prerequisites:
dev
branchdev
Summary
database.py
in acquisitionmore_itertools
dependency, as it's needed in a few tests and needed later in JIT