Skip to content
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

Transparently expose different methods for finding dependencies #118

Open
nuest opened this issue Mar 23, 2018 · 1 comment
Open

Transparently expose different methods for finding dependencies #118

nuest opened this issue Mar 23, 2018 · 1 comment
Assignees

Comments

@nuest
Copy link
Member

nuest commented Mar 23, 2018

The user should be able to select which methods are applied to find the dependencies which are put in the Dockerfile. These might be combined or follow each other, and even depend on each other

These different steps should have a common API and be chainable, i.e. be able to rely on the previous results.

df <- dockerfile(from = "sessionInfo.Rdata", methods = c(cntnrt_parse, cntnrt_execute, cntnrt_sysdeps), ...)

Internally this might result in

df <- cntnrt_parse(from)
df <- cntnrt_execute(df, from, preinstallAlreadyDetectedPackages = TRUE)
df <- cntnrt_parse(df, from, goOnline = TRUE)

See also ideas in #101


Can also have one option cntnrt_all that creates a union of all options, and cntnrit_parse should be a union of cntnrt_automagic and cntnrt_requirements:

> library("requirements")
> require
require           requireMethods    requireNamespace  requirements::    
> requirements::req_
requirements::req_file       requirements::req_code       requirements::req_namespace  
> requirements::req_file("main.Rmd")
 [1] "rmarkdown"       "sdmpredictors"   "randomForest"    "summarytools"   
 [5] "Boruta"          "caret"           "raster"          "ggplot2"        
 [9] "GGally"          "rgdal"           "corrplot"        "splitstackshape"
[13] "e1071"          
> library("automagic")
> automagic::
automagic::automagic               automagic::install_package_guess   automagic::get_package_details     automagic::install_deps_file       
automagic::%>%                     automagic::make_deps_file          automagic::parse_packages          automagic::get_dependent_packages  
> automagic::parse_packages("main.Rmd")
 [1] "sdmpredictors"   "randomForest"    "summarytools"    "Boruta"         
 [5] "caret"           "raster"          "ggplot2"         "GGally"         
 [9] "rgdal"           "corrplot"        "splitstackshape" "e1071"          
> 
@nuest
Copy link
Member Author

nuest commented Dec 17, 2021

sysreqs is still not on CRAN, see r-hub/sysreqs#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant