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
Joseph Bennett. Author. +
Source: DESCRIPTION
Hanson JO, Schuster R, Morrell N, Strimas-Mackey M, Watts ME, Arcese P, Bennett J, Possingham HP (2023). +
Hanson JO, Schuster R, Morrell N, Strimas-Mackey M, Watts ME, Arcese P, Bennett JR, Possingham HP (2024). prioritizrdata: Conservation Planning Datasets. -https://prioritizr.github.io/prioritizrdata/, -https://github.com/prioritizr/prioritizrdata. +R package version 0.3.2.2, +https://github.com/prioritizr/prioritizrdata, https://prioritizr.github.io/prioritizrdata/.
@Manual{, title = {prioritizrdata: Conservation Planning Datasets}, - author = {Jeffrey O Hanson and Richard Schuster and Nina Morrell and Matthew Strimas-Mackey and Matthew E Watts and Peter Arcese and Joseph Bennett and Hugh P Possingham}, - year = {2023}, - note = {https://prioritizr.github.io/prioritizrdata/, + author = {Jeffrey O Hanson and Richard Schuster and Nina Morrell and Matthew Strimas-Mackey and Matthew E Watts and Peter Arcese and Joseph R Bennett and Hugh P Possingham}, + year = {2024}, + note = {R package version 0.3.2.2, https://github.com/prioritizr/prioritizrdata}, + url = {https://prioritizr.github.io/prioritizrdata/}, }