You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we rely on automagic to do all the work behind detecting and implementing the process of scanning a directory for R package dependencies and outputting a deps.yaml file.
Note: Packages, as well as their versions/GitHub references, need to be captured
Some issues with this are:
Sometimes erroneous R packages are detected due to ::'s being in strings or a package that does not exist being prefixed with :: (i.e. "123::456" or "pkg.name::fname").
If there is an error the whole process fails with minimal feedback.
Some definite improvements to do:
Add support for wrapping the package detection functions with purrr::safely to not make the whole process fail but rather give feedback as to what failed and why while implementing what works.
Optional ideas for flexibility in the future:
support detection of requireNamespace and attachNamesapce calls in code.
support projects that use renv or pakrat
support projects/apps developed as R packages (i.e. golem) and simply use the DESCRIPTION files dependencies/imports
support local R package installations and private Github repository installations
Run Shiny App and derive dependencies from sessionInfo()
support package installation through an R script (i.e. deps.R) script instead of directly through RUN commands inside Dockerfile
Reference:
automagic::make_deps_file()
requirements::req_code() and req_namespace()
attachment::create_dependencies_file()
Consider using the versions package over remotes for better installations.
The text was updated successfully, but these errors were encountered:
jimbrig
changed the title
improve R package dependency detenctions
improve R package dependency detections
Jan 4, 2021
Currently, we rely on
automagic
to do all the work behind detecting and implementing the process of scanning a directory for R package dependencies and outputting adeps.yaml
file.Note: Packages, as well as their versions/GitHub references, need to be captured
Some issues with this are:
::
's being in strings or a package that does not exist being prefixed with::
(i.e. "123::456" or "pkg.name::fname").Some definite improvements to do:
purrr::safely
to not make the whole process fail but rather give feedback as to what failed and why while implementing what works.Optional ideas for flexibility in the future:
requireNamespace
andattachNamesapce
calls in code.renv
orpakrat
DESCRIPTION
files dependencies/importssessionInfo()
deps.R
) script instead of directly throughRUN
commands inside DockerfileReference:
automagic::make_deps_file()
requirements::req_code()
andreq_namespace()
attachment::create_dependencies_file()
Consider using the
versions
package overremotes
for better installations.The text was updated successfully, but these errors were encountered: