Skip to content

Commit

Permalink
Merge pull request #3164 from infotroph/roxygen-bump
Browse files Browse the repository at this point in the history
Bump Roxygen version
  • Loading branch information
mdietze authored May 3, 2023
2 parents 5a5ddf5 + 4bf8332 commit 0489271
Show file tree
Hide file tree
Showing 67 changed files with 125 additions and 203 deletions.
27 changes: 21 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ MODELS_D := $(MODELS:%=.doc/%)
MODULES_D := $(MODULES:%=.doc/%)
ALL_PKGS_D := $(BASE_D) $(MODULES_D) $(MODELS_D)

SETROPTIONS = "options(Ncpus = ${NCPUS})"
SETROPTIONS := "options(Ncpus = ${NCPUS})"

EXPECTED_ROXYGEN_VERSION := 7.2.3
INSTALLED_ROXYGEN_VERSION := $(shell Rscript \
-e "if (requireNamespace('roxygen2', quietly = TRUE)) {" \
-e "cat(as.character(packageVersion('roxygen2')))" \
-e "}")

### Macros

Expand Down Expand Up @@ -76,10 +81,15 @@ test_R_pkg = ./scripts/time.sh "test ${1}" Rscript \
-e "stop_on_failure = TRUE," \
-e "stop_on_warning = FALSE)" # TODO: Raise bar to stop_on_warning = TRUE when we can

doc_R_pkg = ./scripts/time.sh "document ${1}" Rscript \
-e "roxver <- packageVersion('roxygen2')" \
-e "if (roxver != '7.1.2') stop('Roxygen2 version is ', roxver, ', but PEcAn package documentation must be built with exactly version 7.1.2')" \
-e "devtools::document('"$(strip $(1))"')"
doc_R_pkg = \
$(if \
$(filter ${EXPECTED_ROXYGEN_VERSION},${INSTALLED_ROXYGEN_VERSION}), \
./scripts/time.sh "document ${1}" \
Rscript -e "devtools::document('"$(strip $(1))"')", \
$(error Roxygen2 version is ${INSTALLED_ROXYGEN_VERSION}, \
but PEcAn package documentation must be built with exactly \
version ${EXPECTED_ROXYGEN_VERSION}))


depends = .doc/$(1) .install/$(1) .check/$(1) .test/$(1)

Expand Down Expand Up @@ -131,7 +141,12 @@ clean:
echo `date` > $@

.install/roxygen2: | .install .install/devtools
+ ./scripts/time.sh "roxygen2 ${1}" Rscript -e ${SETROPTIONS} -e "if(!requireNamespace('roxygen2', quietly = TRUE)) devtools::install_version('roxygen2', '7.1.2')"
+ ./scripts/time.sh "roxygen2 ${1}" Rscript -e ${SETROPTIONS} \
-e "if (!requireNamespace('roxygen2', quietly = TRUE)" \
-e " || packageVersion('roxygen2') != '7.2.3') {" \
-e " devtools::install_github('r-lib/[email protected]')" \
-e "}"
$(eval INSTALLED_ROXYGEN_VERSION := 7.2.3)
echo `date` > $@

.install/testthat: | .install
Expand Down
2 changes: 1 addition & 1 deletion base/all/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ Copyright: Authors
LazyData: true
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion base/db/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
8 changes: 3 additions & 5 deletions base/db/man/dbfile.file.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion base/logger/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Imports:
Suggests: testthat
License: BSD_3_clause + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
2 changes: 1 addition & 1 deletion base/qaqc/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ LazyData: FALSE
Encoding: UTF-8
VignetteBuilder: knitr
Config/testthat/edition: 3
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion base/remote/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ License: BSD_3_clause + file LICENSE
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion base/settings/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Suggests:
testthat (>= 2.0.0),
withr
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
6 changes: 3 additions & 3 deletions base/settings/man/MultiSettings.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions base/settings/man/SafeList.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions base/settings/man/Settings.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion base/utils/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ License: BSD_3_clause + file LICENSE
Copyright: Authors
LazyData: true
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
2 changes: 0 additions & 2 deletions base/utils/man/datetime2doy.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions base/utils/man/status.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion base/visualization/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
2 changes: 1 addition & 1 deletion base/workflow/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ Suggests:
mockery
Copyright: Authors
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
4 changes: 2 additions & 2 deletions base/workflow/man/start_model_runs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docker/depends/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ COPY pecan.depends.R /
RUN --mount=type=secret,id=github_token \
export GITHUB_PAT=`cat /run/secrets/github_token` \
&& Rscript -e "install.packages(c('devtools'))" \
&& Rscript -e "devtools::install_version('roxygen2', '7.1.2', repos = 'cran.r-project.org')" \
&& Rscript -e "devtools::install_version('roxygen2', '7.2.3', repos = 'cran.r-project.org')" \
&& R_LIBS_USER='/usr/local/lib/R/site-library' Rscript /pecan.depends.R \
&& rm -rf /tmp/*

2 changes: 1 addition & 1 deletion models/basgra/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/biocro/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ Copyright: Energy Biosciences Institute, Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/clm45/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/dalec/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/dvmdostem/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/ed/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ Copyright: Authors
LazyLoad: yes
LazyData: true
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
Config/testthat/edition: 2
20 changes: 10 additions & 10 deletions models/ed/R/read_ed_metheader.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
#' - `flag` -- Variable flags.
#' - `flag_description` -- Description of variable flag
#'
#' The formatting of a meteorlogy header file is as follows (from the [ED
#' The formatting of a meteorology header file is as follows (from the [ED
#' GitHub Wiki][https://github.com/EDmodel/ED2/wiki/Drivers]):
#'
#'```
#'<number of file formats> # Repeat lines below this number of times
#'<path and prefix of files>
#'<nlon>, <nlat>, <dx>, <dy>, <xmin>, <ymin>
#'<number of variables>
#'<list of variable names>
#'<list of update frequencies (seconds) or scalar values if flag=4>
#'<list of variable flags>
#'```
#' ```
#' <number of file formats> # Repeat lines below this number of times
#' <path and prefix of files>
#' <nlon>, <nlat>, <dx>, <dy>, <xmin>, <ymin>
#' <number of variables>
#' <list of variable names>
#' <list of update frequencies (seconds) or scalar values if flag=4>
#' <list of variable flags>
#' ```
#'
#' The variables in the third row are defined as follows:
#' @param filename File name (including path) of met driver header file, as
Expand Down
6 changes: 4 additions & 2 deletions models/ed/man/read_ed_metheader.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions models/ed/man/run_ed_singularity.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion models/fates/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/gday/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: TRUE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/jules/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/ldndc/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/linkages/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/lpjguess/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/maat/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/maespa/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ LazyLoad: yes
LazyData: FALSE
Require:
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/preles/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/sibcasa/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ License: BSD_3_clause + file LICENSE
Copyright: Authors
LazyData: TRUE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/sipnet/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
Require:
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion models/stics/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Copyright: Authors
LazyLoad: yes
LazyData: FALSE
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
Loading

0 comments on commit 0489271

Please sign in to comment.