Closed grabear closed 5 years ago
The create_configuration() function now uses a YAML file for configuring the environment. The ability for using a user generated file relies on the environment directory already existing with this file in it. Currently the following variables are used:
R_ABS_HOME: "/home/ums/r2294/test-R/installs/R-3.4.3/lib64/R"
R_ENV_HOME: "/home/ums/r2294/test-R/renvs/R-3.4.3"
R_LIBS_USER: "/home/ums/r2294/test-R/renvs/R-3.4.3/lib64/R/library"
R_INCLUDE_DIR: "/home/ums/r2294/test-R/renvs/R-3.4.3/lib64/R/include"
R_VERSION: "3.4.3"
# LIST OF DEFAULT variables for .Rprofile
CRAN_MIRROR: "https://cran.rstudio.com/"
CRANEXTRA_MIRROR: "https://mirrors.nics.utk.edu/cran/"
# Determine how to format this for .Rprofile
STANDARD_PKG_LIST:
BiocInstaller: "Bioconductor"
devtools: "Devtools"
tidyverse: "Tidyverse"
REPRODUCIBLE_WORKFLOW_PKG_LIST:
packrat: "Packrat"
miniCRAN: "MiniCRAN"
In conjunction with:
config_dict["R_LIBS_USER"] = context.env_R_libs
config_dict["R_ENV_HOME"] = context.env_R_home
config_dict["R_ABS_HOME"] = context.abs_R_home
config_dict["R_INCLUDE_DIR"] = context.env_R_include
config_dict["R_VERSION"] = context.R_version
config_dict.update(__DEFAULT_CONFIG__)
pkg_lists = self.format_pkg_list(config_dict)
config_dict.update(pkg_lists)
config_dict.update(user_config)
yaml.dump(config_dict, f, default_flow_style=False)
When using system_site_packages = TRUE
, config_dict["R_LIBS_USER"]
will add the main R library as a secondary search path.
To do list:
This method creates a pyvenv.cfg file in the environment, which indicates where the environment's Python was copied from, and whether the system site-packages should be made available in the environment. Below is the python implementation: