-
Notifications
You must be signed in to change notification settings - Fork 2
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 nm_input #150
Refactor nm_input #150
Conversation
…for long format; don't include decodes by default
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.
Stepping through the code, this all looks good to me.
This is a breaking change. [...] if this were in use, I think the most likely result would be an error in selecting columns called
cat
orwidth
.
Right, I'll of course defer to your judgment on that one. If that were a concern, one option would just be to expose this new interface as a new function, leaving nm_input
(perhaps deprecated) with its same signature and behavior (with both the old and new sharing the same internal code).
$ git diff-tree -r origin/main origin/nm-input -- '*.RDS'
:100644 100644 79af6733e5e9762c373f84b35603a61bf18ccf11 9945d8b68a543460c409e60644cff212fecad22a M inst/test_data/test1.RDS
:100644 100644 d0ac08b499b8c7a32cd80103119ee903b6af3ed4 1e42ba7594b99af72ae68be8632ad3e3acdee286 M inst/test_data/test2.RDS
The underlying data set for these RDS files is staying the same (verified with script below). This is regenerated by make data
being invoked (likely by make all
or make check
), and the file is changing due to metadata changes (e.g., $writer_version
). Okay.
script
#!/bin/sh
set -eu
tdir=$(mktemp -d "${TMPDIR:-/tmp}"/yspec-XXXX)
git cat-file blob 79af6733e5e9762c373f84b35603a61bf18ccf11 >"$tdir/test1-pre.rds"
git cat-file blob 9945d8b68a543460c409e60644cff212fecad22a >"$tdir/test1-post.rds"
git cat-file blob d0ac08b499b8c7a32cd80103119ee903b6af3ed4 >"$tdir/test2-pre.rds"
git cat-file blob 1e42ba7594b99af72ae68be8632ad3e3acdee286 >"$tdir/test2-post.rds"
cd "$tdir"
rerds () {
Rscript -e 'saveRDS(readRDS("'"$1"'"), file = "re-'"$1"'")'
}
rerds test1-pre.rds
rerds test1-post.rds
rerds test2-pre.rds
rerds test2-post.rds
cmp re-test1-pre.rds re-test1-post.rds
cmp re-test2-pre.rds re-test2-post.rds
#' @details | ||
#' Columns with character type are automatically dropped; there is no need | ||
#' to list these under the `.drop` argument. |
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 repeats what is said under .drop
. I'm noting in case that was unintentional, but of course it's fine as is if the repetition is on purpose.
Thanks @kyleam. I'm going to stick with the breaking change on this one just because I like the name and |
Examples
Default, wide
Drop
Rename
Long
Long, with decodes
Created on 2024-05-11 with reprex v2.0.2
Summary
This is a breaking change.
cat
orwidth
.