-
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
Tweak archive construction and compactification tolerance interfaces #601
base: dev
Are you sure you want to change the base?
Conversation
- Make `new_epi_archive()` perform only basic checks and construction, and output an "unvalidated" `epi_archive`. - Make `validate_epi_archive()` operate on (unvalidated or already-validated) `epi_archive`s (rather than `as_epi_archive` arguments) and perform the more expensive checks omitted by `new_epi_archive`. (But not necessarily all required checks; it may be assumed that basic checks have already passed.) - Move compactification tolerance option to `as_epi_archive()`.
- Standardize to names & defaults of `compactify = TRUE, compactify_abs_tol = 0` in most places; `abs_tol` for compactify-specific functions. Add missing tolerance setting in `epix_merge()`. Keep `should_compactify` as-is in `revision_summary()` for now. - Change `compactify = NULL` possibility to `compactify = "message"`, and message instead of warn. - Make `compactify_abs_tol = 0` still compactify when exactly equal by using `<= compactify_abs_tol` rather than `<` via `dplyr::near()`. - Update examples and vignettes to not have unnecessary `compactify = TRUE`.
- Use compactification-with-tolerance also on "bare"/"unclassed" integer columns. - Don't use locf-with-tolerance on key columns, to avoid dropping epikeytimes entirely in some situations.
6b24dc5
to
889dbee
Compare
The extra validation
|
clobberable_versions_start, | ||
versions_end, | ||
compactify_tol = .Machine$double.eps^0.5) { | ||
versions_end) { |
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.
question: I might've started in on this review too soon, but we should have the compactify_abs_tol
and compactify
args here, right?
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.
Oh, I was confused by the shared arg documentation. So because new_epi_archive
is low level, it never does compactifiction?
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
new
only doing very basic checks,validate
taking its output and doing heavier checks, and other functions handling other heavy operations.compactify_abs_tol = 0
works as the default. It's also been made available inepix_merge()
.This serves to help set up for and maintain compatibility with some more performant archive construction & sliding utilities in the works.
Magic GitHub syntax to mark associated Issue(s) as resolved when this is merged into the default branch
compactify_tol
interface & usage #570