metrumresearchgroup / mrgvalprep

Helpers for prepping inputs to mrgvalidate
https://metrumresearchgroup.github.io/mrgvalprep
Other
1 stars 0 forks source link

Update for mrgvalidate 2.0.0 #54

Closed seth127 closed 1 year ago

seth127 commented 1 year ago

Closes #51

seth127 commented 1 year ago

Apologies for some sloppy commits at the end. The meat of this is in the first commit, with some ancillary changes in the second and third.

kyleam commented 1 year ago

@seth127 Thanks for taking care of this update. I'll leave the main review to @barrettk, but I've run the checks in a setup close to MPN's and verified that they now pass with mrgvalidate 2.0.0.

check details ```yml Version: 1 Descriptions: - /data/home/kylem/src/github/metrumresearchgroup/mrgvalprep/DESCRIPTION Library: lib Repos: - CRAN: https://cran.rstudio.com - mrgvalidate: https://s3.amazonaws.com/mpn.metworx.dev/releases/mrgvalidate/2.0.0 - MPN: https://mpn.metworx.com/snapshots/stable/2022-10-20 ``` ```R .libPaths("lib") .libPaths() packageVersion("mrgvalidate") rcmdcheck::rcmdcheck("/data/home/kylem/src/github/metrumresearchgroup/mrgvalprep_0.0.5.7000.tar.gz") ``` ``` [1] "/tmp/mrgvalprep-check-IAHw26S/lib" "/opt/R/4.1.3/lib/R/library" [1] ‘2.0.0’ ── R CMD check ───────────────────────────────────────────────────────────────── * using log directory ‘/tmp/RtmpElsd1Q/file48853114e15c/mrgvalprep.Rcheck’ * using R version 4.1.3 (2022-03-10) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * checking for file ‘mrgvalprep/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘mrgvalprep’ version ‘0.0.5.7000’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘mrgvalprep’ can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... NOTE Namespaces in Imports field not imported from: ‘knitr’ ‘rmarkdown’ All declared Imports should be used. * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking running R code from vignettes ... ‘basic_usage.Rmd’ using ‘UTF-8’... OK ‘legacy_inputs.Rmd’ using ‘UTF-8’... OK NONE * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * DONE Status: 1 NOTE See ‘/tmp/RtmpElsd1Q/file48853114e15c/mrgvalprep.Rcheck/00check.log’ for details. ── R CMD check results ────────────────────────────── mrgvalprep 0.0.5.7000 ──── Duration: 51.7s ❯ checking dependencies in R code ... NOTE Namespaces in Imports field not imported from: ‘knitr’ ‘rmarkdown’ All declared Imports should be used. 0 errors ✔ | 0 warnings ✔ | 1 note ✖ ```

One drive-by comment on the changes themselves: shouldn't mrgvalidate's version constraint be bumped in the DESCRIPTION file?

barrettk commented 1 year ago

One drive-by comment on the changes themselves: shouldn't mrgvalidate's version constraint be bumped in the DESCRIPTION file?

There are notes in the README about using legacy inputs. If we do constrain the version I feel like that would defeat the purpose of those instructions (which suggest its backwards compatible). I think it might make sense to constrain the version, but then I think those notes should provide an example of how to download two corresponding previous tagged releases that support the legacy inputs.

kyleam commented 1 year ago

@barrettk

There are notes in the README about using legacy inputs. If we do constrain the version I feel like that would defeat the purpose of those instructions (which suggest its backwards compatible)

Hmm, I might be getting turned around. Aren't those legacy inputs what's documented in vignettes/legacy_inputs.Rmd? With this PR, that refers to the mrgvalidate 2.0 entry points. (That is, aren't the legacy inputs independent of the mrgvalidate entry point changes?)

Either way, my suggestion to bump the constraint probably isn't a good idea, given that as far as I understand mrgvalprep functionality (as opposed to the docs and a guarded test) is compatible with the current constraint (>= 1.0.0).

barrettk commented 1 year ago

Hmm, I might be getting turned around. Aren't those legacy inputs what's documented in vignettes/legacy_inputs.Rmd? With this PR, that refers to the mrgvalidate 2.0 entry points. (That is, aren't the legacy inputs independent of the mrgvalidate entry point changes?)

No I think you're right. I thought the google sheet stuff was only associated with the previous version as well, but that should be separate in terms of backwards compatibility. The docs all reference stuff in 2.0.0 or later (minus the google sheet function references), in that they refer to create_package_docs() instead of create_validation_docs(), and only mention the new 7 docs (previously 3). I dont have a strong opinion either way, but it seems we are definitely suggesting they use 2.0.0

seth127 commented 1 year ago

Per this discussion above

One drive-by comment on the changes themselves: shouldn't mrgvalidate's version constraint be bumped in the DESCRIPTION file?

I'm pretty sure we don't need this, unless I'm missing something. This package is all about parsing and formatting inputs to mrgvalidate. I don't think any of this parsing is incompatible with mrgvalidate < 2.0.0. It's just that mrgvalidate >= 2.0.0 now has a difference interface for passing in those objects that are coming from mrgvalprep.

To support this point: the only changes here to be "compatible" with mrgvalidate >= 2.0.0 are to the docs and tests. There is no change to the actual functions.