diff --git a/.github/workflows/R-CMD-check-ubuntu.yaml b/.github/workflows/R-CMD-check-ubuntu.yaml index 07b4469..e9b8a87 100644 --- a/.github/workflows/R-CMD-check-ubuntu.yaml +++ b/.github/workflows/R-CMD-check-ubuntu.yaml @@ -38,45 +38,42 @@ jobs: NOT_CRAN: true steps: + # configure git to prevent it from automatically converting line-endings + # this is important to avoid WARNINGS during CRAN checks + # that are false-positives, see: + # https://msmith.de/2020/03/12/r-cmd-check-github-actions.html + - name: Configure git + run: git config --global core.autocrlf false + - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} + use-public-rspm: true - - uses: r-lib/actions/setup-pandoc@v1 - - - name: Query dependencies + - name: Install system dependencies run: | - install.packages('remotes') - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") - shell: Rscript {0} + sudo apt-get install libnlopt-dev coinor-libsymphony-dev - - name: Cache R packages - if: runner.os != 'Windows' - uses: actions/cache@v2 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- - - - name: Install system dependencies - run: | - sudo apt-get -y install \ - libcurl4-openssl-dev coinor-libsymphony-dev coinor-libcbc-dev coinor-libclp-dev \ - libudunits2-dev libgdal-dev libgeos-dev libproj-dev libglpk-dev - while read -r cmd - do - eval sudo $cmd - done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') - - - name: Install dependencies + cache-version: 4 + extra-packages: | + any::rcmdcheck + any::remotes + any::XML + any::covr + needs: | + check + + - name: Install spatial R packages run: | - remotes::install_deps(dependencies = TRUE) - remotes::install_cran("rcmdcheck") - remotes::install_cran("covr") - remotes::install_cran("urlchecker", force = TRUE) + options(repos = "https://cloud.r-project.org/") + install.packages("sf") + install.packages("terra") shell: Rscript {0} - name: Session information @@ -91,17 +88,9 @@ jobs: run: | echo "_R_CHECK_DEPENDS_ONLY_=true" >> $GITHUB_ENV - - name: Check - run: | - rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--no-build-vignettes"), error_on = "warning", check_dir = "check") - shell: Rscript {0} - - - name: Upload check results - if: failure() - uses: actions/upload-artifact@main + - uses: r-lib/actions/check-r-package@v2 with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check + upload-snapshots: true - name: Show testthat output if: always() diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 142d0ce..f9e9b4e 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -36,46 +36,39 @@ jobs: NOT_CRAN: true steps: + # configure git to prevent it from automatically converting line-endings + # this is important to avoid WARNINGS during CRAN checks + # that are false-positives, see: + # https://msmith.de/2020/03/12/r-cmd-check-github-actions.html + - name: Configure git + run: git config --global core.autocrlf false + - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} + use-public-rspm: true - - uses: r-lib/actions/setup-pandoc@v1 - - - name: Query dependencies - run: | - install.packages('remotes') - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") - shell: Rscript {0} - - - name: Cache R packages - if: runner.os != 'Windows' - uses: actions/cache@v2 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- - - - name: Install system dependencies - run: | - sudo apt-get -y install \ - libcurl4-openssl-dev coinor-libsymphony-dev coinor-libcbc-dev coinor-libclp-dev \ - libudunits2-dev libgdal-dev libgeos-dev libproj-dev libglpk-dev - while read -r cmd - do - eval sudo $cmd - done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') + cache-version: 4 + extra-packages: | + any::rcmdcheck + any::remotes + any::XML + any::covr + any::urlchecker + needs: | + check - - name: Install dependencies + - name: Install spatial R packages run: | - remotes::install_deps(dependencies = TRUE) - remotes::install_cran("rcmdcheck") - remotes::install_cran("covr") - remotes::install_bioc("lpsymphony") - remotes::install_cran("urlchecker") + options(repos = "https://cloud.r-project.org/") + install.packages("sf") + install.packages("terra") shell: Rscript {0} - name: Session information @@ -85,19 +78,16 @@ jobs: sessioninfo::session_info(pkgs, include_base = TRUE) shell: Rscript {0} - - name: Set environmental variables for package checks - if: matrix.config.pkgs == 'depends only' - run: | - echo "_R_CHECK_DEPENDS_ONLY_=true" >> $GITHUB_ENV - - name: Check URLs if: runner.os == 'Linux' && matrix.config.r == 'release' run: | result <- urlchecker::url_check() + result <- result[result$Message != "OK", , drop = FALSE] result <- result[result$URL != "https://www.bcassessment.ca/", , drop = FALSE] result <- result[!startsWith(result$URL, "https://doi.org/"), , drop = FALSE] if (nrow(result) > 0) { print(result) + print(str(result)) stop("Invalid URLs detected") } shell: Rscript {0} diff --git a/DESCRIPTION b/DESCRIPTION index fb9c941..36de528 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: prioritizrdata Type: Package -Version: 0.3.2.1 +Version: 0.3.2.2 Title: Conservation Planning Datasets Description: Conservation planning datasets for learning how to use the 'prioritizr' package . @@ -21,7 +21,7 @@ Authors@R: person(c('Peter'), 'Arcese', email='peter.arcese@ubc.ca', role = c('aut'), comment = c(ORCID = '0000-0002-8097-482X')), - person(c('Joseph'), 'Bennett', + person(c('Joseph', 'R'), 'Bennett', email='joseph.bennett@carleton.ca', role = c('aut'), comment = c(ORCID = '0000-0002-3901-9513')), person(c('Hugh', 'P'), 'Possingham', @@ -44,7 +44,7 @@ Language: en-US URL: https://prioritizr.github.io/prioritizrdata/, https://github.com/prioritizr/prioritizrdata BugReports: https://github.com/prioritizr/prioritizrdata/issues -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Collate: 'package.R' 'salt_data.R' diff --git a/NEWS.md b/NEWS.md index ab68edf..273bc43 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# prioritizrdata 0.3.2.2 + +- Update package manual entry. + # prioritizrdata 0.3.2.1 - Fix aliasing for package manual entry (#14). diff --git a/R/package.R b/R/package.R index 68f42e8..8cc2c87 100644 --- a/R/package.R +++ b/R/package.R @@ -25,6 +25,7 @@ #' @name prioritizrdata #' @docType package #' @aliases prioritizrdata-package +"_PACKAGE" NULL # avoid false positive NOTES diff --git a/README.md b/README.md index 7fe5870..c028091 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,6 @@ publications. To cite the latest official version, please use: Alternatively, to cite the latest development version, please use: > Hanson JO, Schuster R, Morrell N, Strimas-Mackey M, Watts ME, Arcese -> P, Bennett J, Possingham HP (2023). prioritizrdata: Conservation -> Planning Datasets. R package version 0.3.2.1. Available at +> P, Bennett J, Possingham HP (2024). prioritizrdata: Conservation +> Planning Datasets. R package version 0.3.2.2. Available at > . diff --git a/docs/404.html b/docs/404.html index 5106f2d..6393673 100644 --- a/docs/404.html +++ b/docs/404.html @@ -7,8 +7,8 @@ Page not found (404) • prioritizrdata - - + + Authors and Citation • prioritizrdataAuthors and Citation • prioritizrdata @@ -10,7 +10,7 @@ prioritizrdata - 0.3.2.1 + 0.3.2.2