Skip to content

Commit

Permalink
updates (#14)
Browse files Browse the repository at this point in the history
* update deps
* fix badges
* modernize ga workflows
* fix urls
* update to fix checks on CRAN's Fedora system
* update to c++14
* update cran comments
* update news
* deprecate raster package
* use sf and terra packages
* update data
* update citation format
  • Loading branch information
jeffreyhanson authored Mar 13, 2023
1 parent 831ac14 commit c0179cd
Show file tree
Hide file tree
Showing 279 changed files with 5,803 additions and 3,975 deletions.
2 changes: 0 additions & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@ cran-comments.md
_pkgdown.yml
README.Rmd
spell.log
^extdata*
^inst/extdata*
Rplots.pdf
^\.github$
125 changes: 125 additions & 0 deletions .github/workflows/R-CMD-check-fedora.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on: workflow_dispatch

name: Fedora

env:
OMP_THREAD_LIMIT: 2
KMP_DEVICE_THREAD_LIMIT: 2
_R_CHECK_SUGGESTS_ONLY_: true
_R_CHECK_NO_RECOMMENDED_: true
_R_CHECK_DOC_SIZES2_: true
_R_CHECK_DEPRECATED_DEFUNCT_: true
_R_CHECK_SCREEN_DEVICE_: warn
_R_CHECK_REPLACING_IMPORTS_: true
_R_CHECK_TOPLEVEL_FILES_: true
_R_CHECK_DOT_FIRSTLIB_: true
_R_CHECK_RD_LINE_WIDTHS_: true
_R_CHECK_S3_METHODS_NOT_REGISTERED_: true
_R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_: true
_R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_: true
_R_CHECK_NATIVE_ROUTINE_REGISTRATION_: true
_R_CHECK_FF_CALLS_: registration
_R_CHECK_PRAGMAS_: true
_R_CHECK_COMPILATION_FLAGS_: true
_R_CHECK_R_DEPENDS_: true
_R_CHECK_PACKAGES_USED_IN_TESTS_USE_SUBDIRS_: true
_R_CHECK_SHLIB_OPENMP_FLAGS_: true
_R_CHECK_BROWSER_NONINTERACTIVE_: true
_R_CHECK_CODE_ASSIGN_TO_GLOBALENV_: true
_R_CHECK_CODE_DATA_INTO_GLOBALENV_: true
_R_CHECK_PKG_SIZES_: true
_R_CHECK_LIMIT_CORES_: true
_R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_: true
_R_CHECK_AUTOCONF_: true
_R_CHECK_THINGS_IN_CHECK_DIR_: true
_R_CHECK_THINGS_IN_TEMP_DIR_: true
_R_CHECK_THINGS_IN_TEMP_DIR_EXCLUDE_: "^ompi"
_R_CHECK_BASHISMS_: true
_R_CHECK_ORPHANED_: true
_R_CHECK_DEPENDS_ONLY_DATA_: true
_R_CHECK_XREFS_PKGS_ARE_DECLARED_: true
_R_CHECK_MATRIX_DATA_: true
_R_CHECK_RD_VALIDATE_RD2HTML_: true
_R_CHECK_RD_MATH_RENDERING_: true

jobs:
R-CMD-check:
name: Fedora (devel)

runs-on: ubuntu-latest

container:
image: docker://rhub/fedora-clang-devel:latest
options: --user root
env:
_R_REMOTES_NO_ERRORS_FROM_WARNINGS_: true
_R_CHECK_FORCE_SUGGESTS_: false
_R_CHECK_TIMINGS_: 10
_R_CHECK_CRAN_INCOMING_REMOTE_: false
_R_CHECK_LIMIT_CORES_: true
_R_CHECK_LICENSE_: true
OMP_THREAD_LIMIT: 2
KMP_DEVICE_THREAD_LIMIT: 2
KMP_TEAMS_THREAD_LIMIT: 2
KMP_ALL_THREADS: 2
NOT_CRAN: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CI: true

steps:
- uses: actions/checkout@v2

- name: Setup path
run: |
echo "/opt/R-devel/bin" >> $GITHUB_PATH
- name: Install system dependencies
run: |
echo $PATH
dnf install -y \
mpfr-devel \
automake \
fftw-devel \
gmp-devel \
openssl-devel \
zlib-devel \
pandoc \
geos-devel \
make \
gdal \
libxml2-devel \
cmake \
proj-devel \
sqlite-devel \
gdal-devel \
libicu-devel \
udunits2-devel \
coin-or-SYMPHONY-devel \
git-all
- name: Install dependencies
run: |
options(repos = "https://cloud.r-project.org/")
install.packages("remotes")
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Session information
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Check
run: |
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--no-build-vignettes"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
65 changes: 24 additions & 41 deletions .github/workflows/R-CMD-check-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- main
- master

name: Mac OSX
name: macOS

jobs:
R-CMD-check:
Expand All @@ -33,46 +33,37 @@ jobs:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CI: true
## rgl R package environmental variables
RGL_USE_NULL: true
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
DISPLAY: ":99"

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}
- uses: r-lib/actions/setup-pandoc@v2

- 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@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-
r-version: ${{ matrix.config.r }}
use-public-rspm: true

- name: Install system dependencies
if: runner.os == 'macOS'
run: |
brew install --cask xquartz
brew install automake
brew install gdal
- name: Install dependencies
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
extra-packages: |
any::rcmdcheck
gurobi=?ignore
needs: |
check
coverage
- name: Install spatial R packages
run: |
options("install.packages.compile.from.source" = "never")
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
remotes::install_cran("covr")
options(repos = "https://cloud.r-project.org/")
install.packages("sf")
install.packages("terra")
shell: Rscript {0}

- name: Session information
Expand All @@ -82,19 +73,11 @@ jobs:
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Check
run: |
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--no-build-vignettes"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
68 changes: 29 additions & 39 deletions .github/workflows/R-CMD-check-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,43 +38,40 @@ jobs:
CI: true

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@v1
- uses: actions/checkout@v2

- 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}
- uses: r-lib/actions/setup-pandoc@v2

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v2
- uses: r-lib/actions/setup-r@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-2-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-2-
r-version: ${{ matrix.config.r }}
use-public-rspm: true

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get -y install libcurl4-openssl-dev
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt-get install \
libgdal-dev libgeos-dev libproj-dev \
libudunits2-dev libharfbuzz-dev libfribidi-dev
- name: Install dependencies
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
extra-packages: |
any::covr
any::rcmdcheck
gurobi=?ignore
needs: |
check
coverage
- name: Install spatial R packages
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
remotes::install_cran("covr")
options(repos = "https://cloud.r-project.org/")
install.packages("sf")
install.packages("terra")
shell: Rscript {0}

- name: Session information
Expand All @@ -84,22 +81,15 @@ jobs:
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Set environmental variables for package checks
- name: Environmental variables
if: matrix.config.pkgs == 'depends only'
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
args: 'c("--no-manual", "--as-cran", "--no-build-vignettes")'
upload-snapshots: true

- name: Show testthat output
if: always()
Expand Down
Loading

0 comments on commit c0179cd

Please sign in to comment.