Title: | Conan the Librarian |
---|---|
Description: | Create libraries. For us, there is no spring. Just the wind that smells fresh before the storm. |
Authors: | Rich FitzJohn [aut, cre], Imperial College of Science, Technology and Medicine [cph] |
Maintainer: | Rich FitzJohn <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.9.101 |
Built: | 2024-10-23 03:59:13 UTC |
Source: | https://github.com/mrc-ide/conan2 |
Compare conan installations.
conan_compare(path_lib, curr = 0, prev = -1)
conan_compare(path_lib, curr = 0, prev = -1)
path_lib |
Path to the library to compare |
curr |
The previous installation to compare against. Can be a
name (see conan_list to get names), a negative
number where |
prev |
The previous installation to compare against. Can be a
name (see conan_list to get names), a negative
number where |
An object of class conan_compare
, which can be printed
nicely.
Configuration for running conan. Some common options and some specific to different provisioning methods.
conan_configure( method, ..., path_lib, path_bootstrap, cran = NULL, delete_first = FALSE, path = ".", envvars = NULL )
conan_configure( method, ..., path_lib, path_bootstrap, cran = NULL, delete_first = FALSE, path = ".", envvars = NULL )
method |
The method to use; currently |
... |
Additional arguments, method specific. See Details. |
path_lib |
The library to install into. Could be an absolute or a relative path. |
path_bootstrap |
The path to a bootstrap library to use. This
needs to contain all the packages required for the method you
are using. For |
cran |
URL for use as the CRAN repo. If not given we will use
the RStudio CRAN mirror. This option has no effect when using
renv, as the URLs in your lock file determine the locations that
packages are fetched from. The intended use of this option is
for where a CRAN repo is misbehaving (e.g., returning 500
errors, or has an invalid/incomplete/out of date index). The
most likely alternative version to use is |
delete_first |
Should we delete the library before installing into it? |
path |
Path to the root where you would run conan from; typically this is the same path is the root of the project, often as the working directory. |
envvars |
Environment variables to set before running the installation. See Details for format. |
Different methods support different additional arguments:
method script
supports the argument script
, which is the
name of the script to run, defaults to "provision.R"
method pkgdepends
supports the arguments refs
, which can be
a character vector of references (rather than reading from the
file pkgdepends.txt
) and policy
which is passed through to
pkgdepends::new_pkg_installation_proposal()
.
method auto
takes an argument environment
which contains a
list of packages to install and source files to scan for
dependencies.
method renv
takes no arguments.
Setting environment variables while running the installation comes
uses the envvars
argument; this system is designed to play well
with hipercow
, though it does not require it. We expect a
data.frame
with columns name
, value
and (optionally)
secret
. If secret
is given, it must be a logical value
indicating that value
has been encrypted with an rsa
public
key. If any secret
is TRUE
, then envvvars
must also have an
attribute key
that contains the path to private rsa key to
decrypt the secrets (i.e., attr(envvars, "key")
). If you use
secret environment variables, then the openssl
package must be
present in conan's bootstrap.
A list with class conan_config
. Do not modify
this object.
Describe a library. This creates a summary of version information from a library. This may be slightly slow on network filesystems with large libraries.
conan_describe(path_lib)
conan_describe(path_lib)
path_lib |
Path to the library |
A list with class conan_describe
. We'll write some
tooling to work with these soon!
List conan installations, and optionally test if they are current.
conan_list(path_lib, hash = NULL)
conan_list(path_lib, hash = NULL)
path_lib |
Path to the library to compare |
hash |
A hash to compare; if given (not |
A data.frame with columns:
name
: the name of the installation. This might be useful with
conan_compare
time
: the time the installation was started
hash
: the installation hash
method
: the method used for the installation
args
: the arguments to the installation (as a list column)
current
: Matches the hash passed in the argument hash
This object also has class conan_list
so that it prints nicely,
but you can drop this with as.data.frame
.
Run a conan installation, in another process, blocking from this process.
conan_run(config, show_log = TRUE)
conan_run(config, show_log = TRUE)
config |
Conan config, from |
show_log |
Show output from running the script (passed
through to callr::rscript as |
Nothing
Write a conan installation script
conan_write(config, path)
conan_write(config, path)
config |
Conan config, from |
path |
The path to write to |
Nothing