Title: | Check Package using Various Versions of Dependencies |
---|---|
Description: | Derive package dependencies from DESCRIPTION file using various strategies and run "R CMD CHECK" to validate package compatibility. |
Authors: | Pawel Rucki [aut, cre], Andre Verissimo [aut], F. Hoffmann-La Roche AG [cph, fnd] |
Maintainer: | Pawel Rucki <[email protected]> |
License: | Apache License 2.0 | file LICENSE |
Version: | 0.0.0.9001 |
Built: | 2024-11-15 05:52:55 UTC |
Source: | https://github.com/insightsengineering/verdepcheck |
rcmdcheck::rcmdcheck()
on a local package using libpath
from the installation plan.Executes rcmdcheck::rcmdcheck()
on a local package using libpath
from the installation plan.
check_ip(ip, path, build_args = character(), check_args = character(), ...)
check_ip(ip, path, build_args = character(), check_args = character(), ...)
ip |
( |
path |
( |
build_args |
( |
check_args |
( |
... |
other arguments passed to |
An S3 object (list) with fields errors
,
warnings
and notes
. These are all character
vectors containing the output for the failed check.
rcmdcheck::rcmdcheck()
for other configuration possibilities
Solve installation plan ignoring entries with "@*release" remote refs for detected conflicts.
download_ip(ip)
download_ip(ip)
ip |
( |
pkg_installation_plan
object invisibly
rcmdcheck::rcmdcheck()
in "try mode" to always return.Executes installation plan and rcmdcheck::rcmdcheck()
in "try mode" to always return.
execute_ip(ip, path, build_args, check_args, ...)
execute_ip(ip, path, build_args, check_args, ...)
ip |
( |
path |
( |
build_args |
( |
check_args |
( |
... |
other arguments passed to |
a named list
with two elements:
"ip"
- installation plan object
"check"
- returned value from rcmdcheck::rcmdcheck()
Oftentimes, the release date of the package does not correspond to the date when the package is available in the PPM. Usually it takes one day for the PPM to sync with the CRAN. This function will return the date when the package is available in the PPM.
get_avail_date(remote_ref, start = get_release_date(remote_ref)) ## S3 method for class 'remote_ref_cran' get_avail_date(remote_ref, start = get_release_date(remote_ref)) ## S3 method for class 'remote_ref_standard' get_avail_date(remote_ref, start = get_release_date(remote_ref)) ## S3 method for class 'remote_ref' get_avail_date(remote_ref, start = get_release_date(remote_ref))
get_avail_date(remote_ref, start = get_release_date(remote_ref)) ## S3 method for class 'remote_ref_cran' get_avail_date(remote_ref, start = get_release_date(remote_ref)) ## S3 method for class 'remote_ref_standard' get_avail_date(remote_ref, start = get_release_date(remote_ref)) ## S3 method for class 'remote_ref' get_avail_date(remote_ref, start = get_release_date(remote_ref))
remote_ref |
( |
start |
( |
Date. This can be safely used as a snapshot date for the PPM.
get_avail_date(pkgdepends::parse_pkg_ref("cran::dplyr")) get_avail_date(pkgdepends::parse_pkg_ref("cran::[email protected]")) get_avail_date(pkgdepends::parse_pkg_ref("dplyr")) get_avail_date(pkgdepends::parse_pkg_ref("[email protected]")) get_avail_date(pkgdepends::parse_pkg_ref("bioc::MultiAssayExperiment")) get_avail_date(pkgdepends::parse_pkg_ref("tidyverse/[email protected]"))
get_avail_date(pkgdepends::parse_pkg_ref("cran::dplyr")) get_avail_date(pkgdepends::parse_pkg_ref("cran::[email protected]")) get_avail_date(pkgdepends::parse_pkg_ref("dplyr")) get_avail_date(pkgdepends::parse_pkg_ref("[email protected]")) get_avail_date(pkgdepends::parse_pkg_ref("bioc::MultiAssayExperiment")) get_avail_date(pkgdepends::parse_pkg_ref("tidyverse/[email protected]"))
Get reference to the maximal version of the package.
get_ref_max(remote_ref)
get_ref_max(remote_ref)
remote_ref |
( |
(remote_ref
) object with the package reference
get_ref_max(pkgdepends::parse_pkg_ref("dplyr")) get_ref_max(pkgdepends::parse_pkg_ref("cran::dplyr")) get_ref_max(pkgdepends::parse_pkg_ref("tidyverse/dplyr")) get_ref_max(pkgdepends::parse_pkg_ref("bioc::MultiAssayExperiment"))
get_ref_max(pkgdepends::parse_pkg_ref("dplyr")) get_ref_max(pkgdepends::parse_pkg_ref("cran::dplyr")) get_ref_max(pkgdepends::parse_pkg_ref("tidyverse/dplyr")) get_ref_max(pkgdepends::parse_pkg_ref("bioc::MultiAssayExperiment"))
Get reference to the minimal version of the package.
for standard and CRAN-type of remote - this would use pkgcache::cran_archive_list()
to obtain historical data.
for GitHub type of remote - this would use gh::gh_gql()
to get list of all releases or tags
and then gh::gh()
to download DESCRIPTION
file and then read package version.
get_ref_min(remote_ref, op = "", op_ver = "") ## S3 method for class 'remote_ref' get_ref_min(remote_ref, op = "", op_ver = "") ## S3 method for class 'remote_ref_cran' get_ref_min(remote_ref, op = "", op_ver = "") ## S3 method for class 'remote_ref_standard' get_ref_min(remote_ref, op = "", op_ver = "") ## S3 method for class 'remote_ref_github' get_ref_min(remote_ref, op = "", op_ver = "")
get_ref_min(remote_ref, op = "", op_ver = "") ## S3 method for class 'remote_ref' get_ref_min(remote_ref, op = "", op_ver = "") ## S3 method for class 'remote_ref_cran' get_ref_min(remote_ref, op = "", op_ver = "") ## S3 method for class 'remote_ref_standard' get_ref_min(remote_ref, op = "", op_ver = "") ## S3 method for class 'remote_ref_github' get_ref_min(remote_ref, op = "", op_ver = "")
remote_ref |
( |
op |
( |
op_ver |
( |
(remote_ref
) object with the package reference
get_ref_min(pkgdepends::parse_pkg_ref("bioc::MultiAssayExperiment")) get_ref_min(pkgdepends::parse_pkg_ref("cran::dplyr")) get_ref_min(pkgdepends::parse_pkg_ref("dplyr")) get_ref_min(pkgdepends::parse_pkg_ref("tidyverse/dplyr"))
get_ref_min(pkgdepends::parse_pkg_ref("bioc::MultiAssayExperiment")) get_ref_min(pkgdepends::parse_pkg_ref("cran::dplyr")) get_ref_min(pkgdepends::parse_pkg_ref("dplyr")) get_ref_min(pkgdepends::parse_pkg_ref("tidyverse/dplyr"))
Get reference to the minimal version of the package including also check in CRAN repository.
get_ref_min_incl_cran(remote_ref, op = "", op_ver = "") ## S3 method for class 'remote_ref' get_ref_min_incl_cran(remote_ref, op = "", op_ver = "") ## S3 method for class 'remote_ref_github' get_ref_min_incl_cran(remote_ref, op = "", op_ver = "")
get_ref_min_incl_cran(remote_ref, op = "", op_ver = "") ## S3 method for class 'remote_ref' get_ref_min_incl_cran(remote_ref, op = "", op_ver = "") ## S3 method for class 'remote_ref_github' get_ref_min_incl_cran(remote_ref, op = "", op_ver = "")
remote_ref |
( |
op |
( |
op_ver |
( |
(remote_ref
) object with the package reference
verdepcheck:::get_ref_min_incl_cran(pkgdepends::parse_pkg_ref("dplyr")) verdepcheck:::get_ref_min_incl_cran(pkgdepends::parse_pkg_ref("bioc::MultiAssayExperiment")) verdepcheck:::get_ref_min_incl_cran(pkgdepends::parse_pkg_ref("tidyverse/dplyr"))
verdepcheck:::get_ref_min_incl_cran(pkgdepends::parse_pkg_ref("dplyr")) verdepcheck:::get_ref_min_incl_cran(pkgdepends::parse_pkg_ref("bioc::MultiAssayExperiment")) verdepcheck:::get_ref_min_incl_cran(pkgdepends::parse_pkg_ref("tidyverse/dplyr"))
Get reference to the release version of the package.
get_ref_release(remote_ref)
get_ref_release(remote_ref)
remote_ref |
( |
(remote_ref
) object with the package reference
get_ref_release(pkgdepends::parse_pkg_ref("dplyr")) get_ref_release(pkgdepends::parse_pkg_ref("cran::dplyr")) get_ref_release(pkgdepends::parse_pkg_ref("tidyverse/dplyr")) get_ref_release(pkgdepends::parse_pkg_ref("bioc::MultiAssayExperiment"))
get_ref_release(pkgdepends::parse_pkg_ref("dplyr")) get_ref_release(pkgdepends::parse_pkg_ref("cran::dplyr")) get_ref_release(pkgdepends::parse_pkg_ref("tidyverse/dplyr")) get_ref_release(pkgdepends::parse_pkg_ref("bioc::MultiAssayExperiment"))
Get release date.
get_release_date(remote_ref) ## S3 method for class 'remote_ref_github' get_release_date(remote_ref) ## S3 method for class 'remote_ref_cran' get_release_date(remote_ref) ## S3 method for class 'remote_ref_standard' get_release_date(remote_ref) ## S3 method for class 'remote_ref_bioc' get_release_date(remote_ref) ## S3 method for class 'remote_ref' get_release_date(remote_ref)
get_release_date(remote_ref) ## S3 method for class 'remote_ref_github' get_release_date(remote_ref) ## S3 method for class 'remote_ref_cran' get_release_date(remote_ref) ## S3 method for class 'remote_ref_standard' get_release_date(remote_ref) ## S3 method for class 'remote_ref_bioc' get_release_date(remote_ref) ## S3 method for class 'remote_ref' get_release_date(remote_ref)
remote_ref |
( |
Date
get_release_date(pkgdepends::parse_pkg_ref("tidyverse/[email protected]")) get_release_date(pkgdepends::parse_pkg_ref("cran::dplyr")) get_release_date(pkgdepends::parse_pkg_ref("cran::[email protected]")) get_release_date(pkgdepends::parse_pkg_ref("dplyr")) get_release_date(pkgdepends::parse_pkg_ref("MultiAssayExperiment"))
get_release_date(pkgdepends::parse_pkg_ref("tidyverse/[email protected]")) get_release_date(pkgdepends::parse_pkg_ref("cran::dplyr")) get_release_date(pkgdepends::parse_pkg_ref("cran::[email protected]")) get_release_date(pkgdepends::parse_pkg_ref("dplyr")) get_release_date(pkgdepends::parse_pkg_ref("MultiAssayExperiment"))
Get package version.
get_version(remote_ref) ## S3 method for class 'remote_ref' get_version(remote_ref)
get_version(remote_ref) ## S3 method for class 'remote_ref' get_version(remote_ref)
remote_ref |
( |
Package version created with package_version
.
get_version(pkgdepends::parse_pkg_ref("dplyr")) get_version(pkgdepends::parse_pkg_ref("tidyverse/dplyr")) get_version(pkgdepends::parse_pkg_ref("tidyverse/[email protected]")) get_version(pkgdepends::parse_pkg_ref("bioc::MultiAssayExperiment"))
get_version(pkgdepends::parse_pkg_ref("dplyr")) get_version(pkgdepends::parse_pkg_ref("tidyverse/dplyr")) get_version(pkgdepends::parse_pkg_ref("tidyverse/[email protected]")) get_version(pkgdepends::parse_pkg_ref("bioc::MultiAssayExperiment"))
This function would executes the following:
solves package dependencies
downloads all package dependencies
installs system requirements
installs all package dependencies
install_ip(ip)
install_ip(ip)
ip |
( |
pkg_installation_plan
object invisibly
R CMD CHECK
on a local package with all dependencies pre-installed using various strategies.Execute R CMD CHECK
on a local package with all dependencies pre-installed using various strategies.
max_deps_check( path, extra_deps = character(), config = list(), build_args = character(), check_args = character(), ... ) release_deps_check( path, extra_deps = character(), config = list(), build_args = character(), check_args = character(), ... ) min_cohort_deps_check( path, extra_deps = character(), config = list(), build_args = character(), check_args = character(), ... ) min_isolated_deps_check( path, extra_deps = character(), config = list(), build_args = character(), check_args = character(), ... )
max_deps_check( path, extra_deps = character(), config = list(), build_args = character(), check_args = character(), ... ) release_deps_check( path, extra_deps = character(), config = list(), build_args = character(), check_args = character(), ... ) min_cohort_deps_check( path, extra_deps = character(), config = list(), build_args = character(), check_args = character(), ... ) min_isolated_deps_check( path, extra_deps = character(), config = list(), build_args = character(), check_args = character(), ... )
path |
( |
extra_deps |
( |
config |
( |
build_args |
( |
check_args |
( |
... |
other arguments passed to |
a named list
with two elements:
"ip"
- installation plan object
"check"
- returned value from rcmdcheck::rcmdcheck()
Currently implemented strategies:
max
- use the greatest version of dependent packages. Please note that using development version is not
guaranteed to be stable.
See get_ref_max for details.
release
- use the released version of dependent packages. It will try use CRAN if possible else if
GitHub release is available then use it else fail.
See get_ref_release for details.
min_cohort
- find maximum date of directly dependent packages release dates and use that as PPM snapshot date
for dependency resolve.
min_isolated
- for each direct dependency: find its release date and use it as PPM snapshot for resolving itself.
Next, combine all the individual resolutions and resolve it altogether again.
Both "min" strategies relies on PPM snapshot in order to limit the versions of indirect dependencies so that
dependency resolution ends with a package released no earlier than any of its dependency.
However, that's not always true for min_isolated
strategy - done on purpose.
Please note that only min_cohort
and min_isolated
strategies are "stable". The rest are basing on dynamic
references therefore it results might be different without changes in tested package.
The most straightforward example is max
strategy in which the environment will be different after any push of
any of the dependencies.
x <- max_deps_check(".") x$ip x$check x <- release_deps_check(".") x$ip x$check x <- min_cohort_deps_check(".") x$ip x$check x <- min_isolated_deps_check(".") x$ip x$check
x <- max_deps_check(".") x$ip x$check x <- release_deps_check(".") x$ip x$check x <- min_cohort_deps_check(".") x$ip x$check x <- min_isolated_deps_check(".") x$ip x$check
These functionalities would read local package DESCRIPTION
file, derive dependencies from
"Config/Needs/verdepcheck"
and create an installation proposal using various strategies for package versions
as described below.
new_max_deps_installation_proposal( path, extra_deps = character(0L), config = list() ) new_release_deps_installation_proposal( path, extra_deps = character(0L), config = list() ) new_min_cohort_deps_installation_proposal( path, extra_deps = character(0L), config = list() ) new_min_isolated_deps_installation_proposal( path, extra_deps = character(0L), config = list() )
new_max_deps_installation_proposal( path, extra_deps = character(0L), config = list() ) new_release_deps_installation_proposal( path, extra_deps = character(0L), config = list() ) new_min_cohort_deps_installation_proposal( path, extra_deps = character(0L), config = list() ) new_min_isolated_deps_installation_proposal( path, extra_deps = character(0L), config = list() )
path |
( |
extra_deps |
( |
config |
( |
pkg_installation_plan
object
Currently implemented strategies:
max
- use the greatest version of dependent packages. Please note that using development version is not
guaranteed to be stable.
See get_ref_max for details.
release
- use the released version of dependent packages. It will try use CRAN if possible else if
GitHub release is available then use it else fail.
See get_ref_release for details.
min_cohort
- find maximum date of directly dependent packages release dates and use that as PPM snapshot date
for dependency resolve.
min_isolated
- for each direct dependency: find its release date and use it as PPM snapshot for resolving itself.
Next, combine all the individual resolutions and resolve it altogether again.
Both "min" strategies relies on PPM snapshot in order to limit the versions of indirect dependencies so that
dependency resolution ends with a package released no earlier than any of its dependency.
However, that's not always true for min_isolated
strategy - done on purpose.
Please note that only min_cohort
and min_isolated
strategies are "stable". The rest are basing on dynamic
references therefore it results might be different without changes in tested package.
The most straightforward example is max
strategy in which the environment will be different after any push of
any of the dependencies.
verdepcheck
will look into "Config/Needs/verdepcheck"
field of the DESCRIPTION
file for dependent packages
references. See pkgdepends::pkg_refs
for details and this package DESCRIPTION
file for an example.
Please note that some features are enabled only for package references from GitHub.
If you specify additional details (i.e. tag, commit, PR or @*release
) in the reference then it wouldn't be changed.
Therefore, in order to make full use of various strategies, it is recommended to specify general reference in form of
[<package>=][github::]<username>/<repository>[/<subdir>]
- i.e. without [<detail>]
part.
Please see also pkgdepends::pkg_config
and pak::pak-config
for other configuration possibilities.
pkgdepends::pkg_installation_proposal
x <- new_max_deps_installation_proposal(".") x$solve() x$get_solution() x <- new_release_deps_installation_proposal(".") x$solve() x$get_solution() x <- new_min_cohort_deps_installation_proposal(".") solve_ip(x) x$get_solution() x <- new_min_isolated_deps_installation_proposal(".") solve_ip(x) x$get_solution()
x <- new_max_deps_installation_proposal(".") x$solve() x$get_solution() x <- new_release_deps_installation_proposal(".") x$solve() x$get_solution() x <- new_min_cohort_deps_installation_proposal(".") solve_ip(x) x$get_solution() x <- new_min_isolated_deps_installation_proposal(".") solve_ip(x) x$get_solution()
Try to solve using standard method. If error - use resolve_ignoring_release_remote.
solve_ip(ip)
solve_ip(ip)
ip |
( |
pkg_installation_plan
object invisibly