Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install versioned dependencies from a fresher CRAN mirror instead of from Github #3244

Merged
merged 7 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 27 additions & 30 deletions Makefile.depends
Original file line number Diff line number Diff line change
@@ -1,44 +1,41 @@
# autogenerated
$(call depends,base/all): | .install/base/db .install/base/settings .install/modules/meta.analysis .install/base/logger .install/base/utils .install/modules/uncertainty .install/modules/data.atmosphere .install/modules/data.land .install/modules/data.remote .install/modules/assim.batch .install/modules/emulator .install/modules/priors .install/modules/benchmark .install/base/remote .install/base/workflow .install/models/ed .install/models/sipnet .install/models/biocro .install/models/dalec .install/models/linkages .install/modules/allometry .install/modules/photosynthesis
$(call depends,base/all): | .install/base/db .install/base/logger .install/base/remote .install/base/settings .install/base/utils .install/base/workflow .install/models/biocro .install/models/dalec .install/models/ed .install/models/linkages .install/models/sipnet .install/modules/allometry .install/modules/assim.batch .install/modules/benchmark .install/modules/data.atmosphere .install/modules/data.land .install/modules/data.remote .install/modules/emulator .install/modules/meta.analysis .install/modules/photosynthesis .install/modules/priors .install/modules/uncertainty
$(call depends,base/db): | .install/base/logger .install/base/remote .install/base/utils
$(call depends,base/logger): |
$(call depends,base/qaqc): | .install/base/db .install/base/logger .install/models/biocro .install/models/ed .install/models/sipnet .install/base/utils
$(call depends,base/qaqc): | .install/base/db .install/base/logger .install/base/utils .install/models/biocro .install/models/ed .install/models/sipnet
$(call depends,base/remote): | .install/base/logger
$(call depends,base/settings): | .install/base/db .install/base/logger .install/base/remote .install/base/utils
$(call depends,base/utils): | .install/base/logger
$(call depends,base/visualization): | .install/base/db .install/base/logger .install/base/utils
$(call depends,base/workflow): | .install/modules/data.atmosphere .install/modules/data.land .install/base/db .install/base/logger .install/base/remote .install/base/settings .install/modules/uncertainty .install/base/utils
$(call depends,modules/allometry): | .install/base/db
$(call depends,modules/assim.batch): | .install/modules/benchmark .install/base/db .install/modules/emulator .install/base/logger .install/modules/meta.analysis .install/base/remote .install/base/settings .install/modules/uncertainty .install/base/utils .install/base/workflow
$(call depends,modules/assim.sequential): | .install/base/db .install/base/logger .install/base/remote .install/base/settings .install/modules/uncertainty .install/base/workflow .install/modules/benchmark .install/modules/data.remote
$(call depends,modules/benchmark): | .install/base/db .install/base/logger .install/base/remote .install/base/settings .install/base/utils .install/modules/data.land
$(call depends,modules/data.atmosphere): | .install/base/db .install/base/logger .install/base/remote .install/base/utils
$(call depends,modules/data.hydrology): | .install/base/logger .install/base/utils
$(call depends,modules/data.land): | .install/modules/benchmark .install/modules/data.atmosphere .install/base/db .install/base/logger .install/base/remote .install/base/utils .install/base/visualization .install/base/settings
$(call depends,modules/data.remote): | .install/base/db .install/base/utils .install/base/logger .install/base/remote
$(call depends,modules/emulator): |
$(call depends,modules/meta.analysis): | .install/base/utils .install/base/db .install/base/logger .install/base/settings
$(call depends,modules/photosynthesis): |
$(call depends,modules/priors): | .install/base/logger .install/modules/meta.analysis .install/base/utils .install/base/visualization
$(call depends,modules/rtm): | .install/base/logger .install/modules/assim.batch .install/base/utils .install/models/ed
$(call depends,modules/uncertainty): | .install/base/db .install/modules/emulator .install/base/logger .install/modules/priors .install/base/settings .install/base/utils
$(call depends,models/basgra): | .install/base/logger .install/modules/data.atmosphere .install/base/utils
$(call depends,models/biocro): | .install/base/logger .install/base/remote .install/base/utils .install/base/settings .install/modules/data.atmosphere .install/modules/data.land .install/base/db
$(call depends,base/workflow): | .install/base/db .install/base/logger .install/base/remote .install/base/settings .install/base/utils .install/modules/data.atmosphere .install/modules/data.land .install/modules/uncertainty
$(call depends,models/basgra): | .install/base/logger .install/base/utils .install/modules/data.atmosphere
$(call depends,models/biocro): | .install/base/db .install/base/logger .install/base/remote .install/base/settings .install/base/utils .install/modules/data.atmosphere .install/modules/data.land
$(call depends,models/cable): | .install/base/logger .install/base/utils
$(call depends,models/clm45): | .install/base/logger .install/base/utils
$(call depends,models/dalec): | .install/base/logger .install/base/remote .install/base/utils
$(call depends,models/dvmdostem): | .install/base/logger .install/base/utils
$(call depends,models/ed): | .install/modules/data.atmosphere .install/modules/data.land .install/base/logger .install/base/remote .install/base/settings .install/base/utils
$(call depends,models/ed): | .install/base/logger .install/base/remote .install/base/settings .install/base/utils .install/modules/data.atmosphere .install/modules/data.land
$(call depends,models/fates): | .install/base/logger .install/base/remote .install/base/utils
$(call depends,models/gday): | .install/base/utils .install/base/logger .install/base/remote
$(call depends,models/jules): | .install/modules/data.atmosphere .install/base/logger .install/base/remote .install/base/utils
$(call depends,models/ldndc): | .install/base/db .install/base/logger .install/base/utils .install/base/remote .install/modules/data.atmosphere
$(call depends,models/linkages): | .install/base/utils .install/modules/data.atmosphere .install/base/logger .install/base/remote
$(call depends,models/gday): | .install/base/logger .install/base/remote .install/base/utils
$(call depends,models/jules): | .install/base/logger .install/base/remote .install/base/utils .install/modules/data.atmosphere
$(call depends,models/ldndc): | .install/base/db .install/base/logger .install/base/remote .install/base/utils .install/modules/data.atmosphere
$(call depends,models/linkages): | .install/base/logger .install/base/remote .install/base/utils .install/modules/data.atmosphere
$(call depends,models/lpjguess): | .install/base/logger .install/base/remote .install/base/utils
$(call depends,models/maat): | .install/modules/data.atmosphere .install/base/logger .install/base/remote .install/base/settings .install/base/utils
$(call depends,models/maespa): | .install/modules/data.atmosphere .install/base/logger .install/base/remote .install/base/utils
$(call depends,models/preles): | .install/base/utils .install/base/logger .install/modules/data.atmosphere .install/base/utils
$(call depends,models/maat): | .install/base/logger .install/base/remote .install/base/settings .install/base/utils .install/modules/data.atmosphere
$(call depends,models/maespa): | .install/base/logger .install/base/remote .install/base/utils .install/modules/data.atmosphere
$(call depends,models/preles): | .install/base/logger .install/base/utils .install/modules/data.atmosphere
$(call depends,models/sibcasa): | .install/base/logger .install/base/utils
$(call depends,models/sipnet): | .install/modules/data.atmosphere .install/base/logger .install/base/remote .install/base/utils
$(call depends,models/stics): | .install/base/settings .install/base/db .install/base/logger .install/base/utils .install/base/remote
$(call depends,models/sipnet): | .install/base/logger .install/base/remote .install/base/utils .install/modules/data.atmosphere
$(call depends,models/stics): | .install/base/db .install/base/logger .install/base/remote .install/base/settings .install/base/utils
$(call depends,models/template): | .install/base/db .install/base/logger .install/base/utils
$(call depends,modules/allometry): | .install/base/db
$(call depends,modules/assim.batch): | .install/base/db .install/base/logger .install/base/remote .install/base/settings .install/base/utils .install/base/workflow .install/modules/benchmark .install/modules/emulator .install/modules/meta.analysis .install/modules/uncertainty
$(call depends,modules/assim.sequential): | .install/base/db .install/base/logger .install/base/remote .install/base/settings .install/base/workflow .install/modules/benchmark .install/modules/data.remote .install/modules/uncertainty
$(call depends,modules/benchmark): | .install/base/db .install/base/logger .install/base/remote .install/base/settings .install/base/utils .install/modules/data.land
$(call depends,modules/data.atmosphere): | .install/base/db .install/base/logger .install/base/remote .install/base/utils
$(call depends,modules/data.hydrology): | .install/base/logger .install/base/utils
$(call depends,modules/data.land): | .install/base/db .install/base/logger .install/base/remote .install/base/settings .install/base/utils .install/base/visualization .install/modules/benchmark .install/modules/data.atmosphere
$(call depends,modules/data.remote): | .install/base/db .install/base/logger .install/base/remote .install/base/utils
$(call depends,modules/meta.analysis): | .install/base/db .install/base/logger .install/base/settings .install/base/utils
$(call depends,modules/priors): | .install/base/logger .install/base/utils .install/base/visualization .install/modules/meta.analysis
$(call depends,modules/rtm): | .install/base/logger .install/base/utils .install/models/ed .install/modules/assim.batch
$(call depends,modules/uncertainty): | .install/base/db .install/base/logger .install/base/settings .install/base/utils .install/modules/emulator .install/modules/priors
11 changes: 1 addition & 10 deletions base/db/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Suggests:
data.table,
here,
knitr,
mockery,
mockery (>= 0.4.3),
RPostgreSQL,
RPostgres,
RSQLite,
Expand All @@ -75,15 +75,6 @@ Suggests:
testthat (>= 2.0.0),
tidyverse,
withr
X-Comment-Remotes:
Installing markdown from GitHub because as of 2023-02-05, this is the
easiest way to get version >= 2.19 onto Docker images that use older
Rstudio Package Manager snapshots.
When building on a system that finds a new enough version on CRAN,
OK to remove the Remotes line and this comment.
Remotes:
github::rstudio/[email protected],
github::r-lib/[email protected]
License: BSD_3_clause + file LICENSE
VignetteBuilder: knitr
Copyright: Authors
Expand Down
10 changes: 0 additions & 10 deletions base/qaqc/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ Suggests:
testthat (>= 3.0.4),
vdiffr (>= 1.0.2),
withr
X-Comment-Remotes:
Installing vdiffr from GitHub because as of 2021-09-23, this is the
easiest way to get version >= 1.0.2 onto Docker images that use older
Rstudio Package Manager snapshots.
Ditto for testthat, because we need >= 3.0.4 for vdiffr compatibility.
When building on a system that finds these versions on CRAN,
OK to remove these Remotes lines and this comment.
Remotes:
github::r-lib/[email protected],
github::r-lib/[email protected]
License: BSD_3_clause + file LICENSE
Copyright: Authors
LazyLoad: yes
Expand Down
64 changes: 40 additions & 24 deletions docker/depends/pecan.depends.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,20 @@ remotes::install_github(c(
'chuhousen/amerifluxr',
'ebimodeling/[email protected]',
'MikkoPeltoniemi/Rpreles',
'r-lib/[email protected]',
'r-lib/[email protected]',
'r-lib/[email protected]',
'ropensci/geonames',
'ropensci/nneo',
'rstudio/[email protected]'
'ropensci/nneo'
), lib = rlib)

# install all packages (depends, imports, suggests)
# install package listed as Depends, Imports, Suggests of any PEcAn package
# that do not have a stated version limit
wanted <- c(
'abind',
'amerifluxr',
'arrow',
'assertthat',
'BayesianTools',
'BioCro',
'bit64',
'BrownDog',
'coda',
'corrplot',
'curl',
'data.table',
Expand All @@ -51,7 +46,6 @@ wanted <- c(
'fs',
'furrr',
'future',
'geonames',
'getPass',
'ggmap',
'ggmcmc',
Expand All @@ -72,9 +66,7 @@ wanted <- c(
'lattice',
'linkages',
'lqmm',
'lubridate',
'Maeswrap',
'magic',
'magrittr',
'maps',
'markdown',
Expand All @@ -86,23 +78,18 @@ wanted <- c(
'mgcv',
'minpack.lm',
'mlegp',
'mockery',
'MODISTools',
'mvbutils',
'mvtnorm',
'ncdf4',
'neonstore',
'neonUtilities',
'nimble',
'nneo',
'optparse',
'parallel',
'plotrix',
'plyr',
'png',
'prodlim',
'progress',
'purrr',
'pwr',
'R.utils',
'randtoolbox',
Expand All @@ -111,13 +98,10 @@ wanted <- c(
'REddyProc',
'redland',
'reshape',
'reshape2',
'reticulate',
'rjags',
'rjson',
'rlang',
'rlist',
'rmarkdown',
'RPostgres',
'RPostgreSQL',
'Rpreles',
Expand All @@ -128,29 +112,61 @@ wanted <- c(
'sp',
'stats',
'stringi',
'stringr',
'suntools',
'swfscMisc',
'terra',
'testthat',
'tibble',
'tictoc',
'tidyr',
'tidyselect',
'tidyverse',
'tools',
'traits',
'TruncatedNormal',
'truncnorm',
'units',
'urltools',
'utils',
'vdiffr',
'withr',
'XML',
'xtable',
'xts',
'zoo'
)
missing <- wanted[!(wanted %in% installed.packages()[,'Package'])]
install.packages(missing, lib = rlib)

# Install packages listed as Depends, Imports, Suggests
# that list a minimum version.
# When the minimum is not satisfied in the fixed-date CRAN snapshot
# used by our Docker images, we pull it in from an up-to-date mirror.
# (Assumes our CRAN uses the same URL scheme as Posit package manager)
options(repos = c(
getOption('repos'),
sub(r'(\d{4}-\d{2}-\d{2})', 'latest', getOption('repos'))
))
ensure_version <- function(pkg, version) {
vers <- gsub('[^[:digit:].-]+', '', version)
cmp <- get(gsub('[^<>=]+', '', version))
ok <- requireNamespace(pkg, quietly = TRUE) &&
cmp(packageVersion(pkg), vers)
if (!ok) {
remotes::install_version(pkg, version, dependencies = TRUE, upgrade = FALSE)
}
}
ensure_version('abind', '>= 1.4.5')
ensure_version('coda', '>= 0.18')
ensure_version('geonames', '> 0.998')
ensure_version('lubridate', '>= 1.7.0')
ensure_version('magic', '>= 1.5.0')
ensure_version('mockery', '>= 0.4.3')
ensure_version('MODISTools', '>= 1.1.0')
ensure_version('ncdf4', '>= 1.15')
ensure_version('plyr', '>= 1.8.4')
ensure_version('purrr', '>= 0.2.3')
ensure_version('reshape2', '>= 1.4.2')
ensure_version('rlang', '>= 0.2.0')
ensure_version('rmarkdown', '>= 2.19')
ensure_version('stringr', '>= 1.1.0')
ensure_version('testthat', '>= 3.0.4')
ensure_version('TruncatedNormal', '>= 2.2')
ensure_version('vdiffr', '>= 1.0.2')
ensure_version('XML', '>= 3.98-1.4')
Loading
Loading