dependency_table.Rd
Create dependency structure of your package collection
dependency_table(
project = ".",
project_type = c("local", "repo@host")[1],
ref = NULL,
local_repos = if ((project_type) == "local") get_local_pkgs_from_config() else NULL,
direction = "all",
fallback_branch = "main",
renv_profile = NULL,
verbose = 1
)
(character
) If project_type
is local
then
directory of project (for which to calculate the dependency structure);
must be a git repository. If project_type
is repo@host
then should
be character of the form openpharma/stageddeps.food@https://github.com
If host is not included in the string then the default https://github.com
is assumed.
(character
) See project
argument.
(character
) git branch (or tag) inferred from the
branch of the project if not provided; warning if not consistent with
current branch of project. If project_type
is not local
then this argument
must be provided.
(data.frame
) repositories that should be taken from
local file system rather than cloned; columns are repo, host, directory
.
(character
) direction in which to discover packages
either "upstream","downstream" or "all".
(character
) the default branch to try to use if
no other matches found. It defaults to "main"
.
(character
) the name of the renv profile of the renv.lock
files
to be included from the repos. The standard renv.lock
file uses the default NULL
argument here.
(numeric
)
verbosity level, incremental;
(0: None, 1: packages that get installed + high-level git operations,
2: includes git checkout infos)
dependency_structure
An S3 object with the following items:
project
argument used to create
the object (absolute path if project_type
is local
project_type
used to create object
The R package name of code in the project
directory
data.frame
contain one row per r package discovered, with the
following rows package_name
, type
(current
, upstream
, downstream
or other
),
distance
(minimum number of steps from current_pkg
), ref
, repo
, host
, sha
cache_dir
, accessible
, installable
and install_index
(the order to install the packages).
Note some items are are suppressed when printing the object
list
with three elements, upstream_deps
is the graph where edges point from a package
to its upstream dependencies. They are ordered in installation order. The
downstream_deps
list is the graph with the edge direction flipped,
and is ordered in reverse installation order. external
contains the external
R packages found in the description files of the internal packages. It is a dataframe
of the form returned by desc::desc_get_deps
direction
argument used to create object
named list
containing the json of the renv.lock files for the chosen profile for
each repo. An entry to the list is NULL
if a repos does not have the required lock file