pkgreviewr
pkgreviewr copied to clipboard
properly import non-exported functions.
Checks note (and SO discussion shows) that ::: function calling within packages is not permitted on CRAN.
To import correctly, Include details in roxygen function documentation, following
#' @importFrom utils getFromNamespace
convention and remove ::: notation in functions.
Above method will not work.
Associated -> include copies of functions. ensure proper acknowledgement and license inclusion.
MIght be relevant: https://discuss.ropensci.org/t/licensing-a-new-package-that-uses-code-from-another-source/1046
Still need to address:
checking dependencies in R code ... WARNING
'::' or ':::' import not declared from: ‘github’
Unexported objects imported by ':::' calls:
‘devtools:::github_remote’ ‘usethis:::can_overwrite’
‘usethis:::check_installed’ ‘usethis:::project_data’
‘usethis:::render_template’ ‘usethis:::uses_git’
See the note in ?`:::` about the use of this operator.
in codemetar I used usethis code e.g https://github.com/ropensci/codemetar/blob/7ce13ba50a439b7b9accd8b694bd486c23685384/R/utils.R#L42
-
I added a permalink to the source
-
I used the same licence as
usethisfor the whole package
In the future such functions might be exported by another package (if I followed correctly 👼 ) cf e.g comment by @jennybc in this closed issue https://github.com/r-lib/usethis/issues/126#issuecomment-354953026
Definitely get in touch about usethis functions that you wish were exported. We just exported a few more, for example, based on feedback: https://github.com/r-lib/usethis/commit/979a8654b002a6fd5ad84fb73f77f77674d30dbc
Oh yeyy! write_over() is being exported!
pkgreviewer makes use of a number of currently unxeported usethis functions as it's so much about templating, but is also meant to be interactive.
Here's the checks output:
checking dependencies in R code ... NOTE
Unexported objects imported by ':::' calls:
‘usethis:::can_overwrite’ ‘usethis:::check_installed’
‘usethis:::package_data’ ‘usethis:::render_template’
‘usethis:::uses_git’ ‘usethis:::write_over’
I did the same as @maelle for the whole style.R script but need to change the license! 😬
This is a lot I know. Perhaps I could take a stab at some roxygen documentation if you'd consider exporting any of the above?
I also wonder if in future, some might make sense as standalone lightweight packages of their own. eg I could see the styling functions as a useful and sensible collection. Also some functions for checking or working with project/package metadata might also make sense together.
no ::: anymore in this package