bascule
bascule.Rmd
Installation of the package
You can install bascule from GitHub using devtools
.
devtools::install_github("caravagnalab/bascule")
Load the package.
Python dependencies installation
When the package is loaded, you might execute the
configure_environment()
function to automatically check
whether:
a version of Anaconda or Miniconda is available, otherwise a Miniconda installation will be started,
if there is no
conda
environment loaded, the package will check if thebascule-env
is present, otherwise it will be created,to use an existing
conda
environment, it can be loaded before loading the package, either through thereticulate
functionreticulate::use_condaenv()
or by using thebascule
functionload_conda_env()
:
reticulate::use_condaenv("env-name", required=TRUE)
load_conda_env(envname="env-name")
- eventually, if the required
Python
dependencies are not installed in the loaded environment, they will be installed.
Functions to manually configure an environment
The function configure_environment()
can be used
interactively to manually configure an existing environment, or to
create one from scratch.
configure_environment(env_name="bascule-env", use_default=F)
The function will first check if a Anaconda or Miniconda installation
is available, otherwise it will prompt a Miniconda installation. The
input name of the environment is either the name of an existing
environment or the name of the environment to be created. The
environment will be loaded or created, and the required
Python
dependencies will be installed.
Check the loaded Python version and environment
The package provides also a set of helper functions to check if an environment is loaded.
-
have_loaded_env()
to check if an environment is already loaded, -
which_conda_env()
to check which environment is loaded. -
have_python_deps()
to check if aPython
packages list is installed in the specified environment. -
load_conda_env()
to load the specified environment.