-
Notifications
You must be signed in to change notification settings - Fork 8
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(epi_slide, epix_slide): time types refactor #472
Conversation
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.
See comments; very minor stuff + a couple potential tasks that could be spun off into separate issues. If you tackle the latter in this PR, might be worth a re-review from me or Nat.
2d6c937
to
272b320
Compare
time_step
, remove time_type
, unify time handling, require difftimes in before
and after
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.
Overall approach seems good. Design-wise I had some thoughts on what column we base before validation on in epix_slide(). Plus maybe found a bug.
issue: local tests fail, with various complaints like
as well as
... and it looks like we're not running checks in CI somehow?? |
@nmdefries I would also appreciate if you could take a pass. I feel like I must have glossed over something given the check results, and was pausing until tomorrow but accidentally hit approve instead of comment. |
Sorry, I believe I said I'd take a look at the failing checks while @nmdefries finishes looking over the rest.
In particular, along the loosening-restrictions route, I think we discussed the following but maybe only verbally; sorry if these are repeats:
|
20fe4ff
to
0d61a98
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.
epi_slide_opt
and related look good aside from the factor
issue Logan brought up. I did not look at other changes.
praise: This is quite the complex PR! Thanks for robustifying this, and all the associated research into time-handling.
@lcbrooks the >10% equal to 1 thing seems too fuzzy to turn into an error. I think checking if |
Sounds good, but check parens here ( (In "normal" data I'd expect this to be similar to a |
df4fd05
to
c095c1f
Compare
* guess time_type of "day", "week", "yearmonth", "integer" from time column and warn if not compatible * restrict `before` and `after` to types compatible with time column * deprecate geo_type and time_type constructor arguments, infer only * improve documentation on geo and time types * enforce time_value and version being same type in epi_archive * update vignettes * move arg validation from new_epi_df to as_epi_df.tbl_df to match epi_archive a
c095c1f
to
7a50d9d
Compare
time_step
, remove time_type
, unify time handling, require difftimes in before
and after
Checklist
Please:
PR).
brookslogan, nmdefries.
DESCRIPTION
. Always incrementthe patch version number (the third number), unless you are making a
release PR from dev to main, in which case increment the minor version
number (the second number).
(backwards-incompatible changes to the documented interface) are noted.
Collect the changes under the next release number (e.g. if you are on
1.7.2, then write your changes under the 1.8 heading).
process.
Change explanations for reviewer
before
andafter
to types compatible with time columngeo_type
andtime_type
in epi_df and epi_archive constructor arguments, infer onlytime_value
andversion
being same type in epi_archivebefore = Inf
in epi_slide and epix_slide and make it default in epix_slidetime_step
argument in slidesNew time type behaviors
previously allowed types that are now labeled custom: POSIXct, yearquarter, yearweek
Magic GitHub syntax to mark associated Issue(s) as resolved when this is merged into the default branch
before=Inf
inepi[x]_slide
#219new_epi_df
#281epix_slide
allowstime_value
andversion
to be different types & do unintended things #448