phuse-org / valtools

Validation framework for R packages used in clinical research and drug development.
https://phuse-org.github.io/valtools/
Other
51 stars 10 forks source link

add documentation re: where to put {valtools} in DESCRIPTION #143

Closed mariev closed 2 years ago

mariev commented 3 years ago

Although we are using {valtools} primarily in the validation report the package needs to be added to the import field due to use of roxygen2 + dynamic labels, when part of package dev.

Routine use of packages for vignettes only are added to the suggests field which will cause devtools::check.

Makes sense if ppl are aware of the extensibility {roxygen2} --> {valtools}, but may be a new bit of knowledge for ppl not digging in so far.

thebioengineer commented 3 years ago

Probably makes sense to add to "suggests" ? I think then it is still captured and cran checks/etc load suggests AFAIK. could have that as part of vt_use_validation() is to add it to the "suggests" when in a package?

mariev commented 3 years ago

Routine use of packages for vignettes only are added to the suggests field which will cause devtools::check.

no, if you put in suggests when developing pkg e.g. {scharpbama} it will throw devtools::check warning b/c things like @editor and @editDate are not defined.

thebioengineer commented 3 years ago

Interesting, so it needs to be added to "Imports"?

mariev commented 3 years ago

There is probably an incredibly niche use case where the developer does not take advantage of the @editor/@editDate tags (dynamic referencing would fall under this umbrella), which would allow for {valtools} to be placed in Suggests, but def not our default usage.

With the use case illustrated in {valtools} vignette, developers will need to add to their package imports.

Note that if they choose Depends, there is a different message that comes up if {valtools} is not also referenced via the NAMESPACE imports list.

Also note that none of this applies to validation separate from package, of course

mariev commented 2 years ago

leave in imports