Skip to content

Commit

Permalink
Merge pull request #266 from r-spatialecology/main
Browse files Browse the repository at this point in the history
Update lsm 1.5.5
  • Loading branch information
mhesselbarth authored Oct 31, 2022
2 parents ee2d9ca + c2b2390 commit b5f0cf2
Show file tree
Hide file tree
Showing 298 changed files with 1,025 additions and 1,016 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ vignettes/articles
^pkgdown
^\.github$
test_data/
^CODE_OF_CONDUCT\.md$
53 changes: 25 additions & 28 deletions .github/workflows/Deploy-pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,45 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- CRAN
- main
tags:
-'*'
branches: [CRAN, main]
tags: ['*']

name: Deploy-pkgdown

jobs:
deploy-pkgdown:
runs-on: macOS-latest
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- 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}
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Restore R package cache
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-
extra-packages: any::pkgdown, any::bench, any::dplyr, any::landscapetools, any::purrr, any::stars, local::.
needs: website

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
install.packages("pkgdown", type = "binary")
install.packages(c("remotes"))
remotes::install_version(package = "SDMTools", version = "1.1-221.2")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .
- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy package
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
78 changes: 27 additions & 51 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# 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
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help

on:
push:
branches:
- CRAN
- main
branches: [CRAN, main, development]
pull_request:
branches:
- CRAN
- main
branches: [CRAN, main]

name: R-CMD-check

Expand All @@ -23,61 +20,40 @@ jobs:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

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

- 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: Restore R package cache
uses: actions/cache@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 spatial dependencies
if: runner.os == 'macOS'
run: |
brew install gdal
brew install proj
- name: Install system dependencies
- name : Install libudunits2
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
run: sudo apt-get install libudunits2-dev

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- 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
40 changes: 19 additions & 21 deletions .github/workflows/Render-README.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,37 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- CRAN
- main
paths:
- README.Rmd
paths: ["README.Rmd"]

name: Render-README

jobs:
render-readme:
name: Render README
runs-on: macOS-latest
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-pandoc@v1
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install rmarkdown, remotes, and the local package
run: |
install.packages("remotes")
remotes::install_cran("rmarkdown")
remotes::install_cran("landscapetools")
remotes::install_local(".")
shell: Rscript {0}
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rmarkdown, any::landscapemetrics, any::landscapetools

- name: Render README
- name: Render README files
run: Rscript -e 'rmarkdown::render("README.Rmd")'

- name: Commit results
- name: Commit README
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add README.md man/figures/README-*
git commit -m "Re-build README.md" || echo "No changes to commit"
git push origin || echo "No changes to commit"
42 changes: 15 additions & 27 deletions .github/workflows/Test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,33 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help

on:
push:
branches:
- CRAN
- main
branches: [CRAN, main, development]
pull_request:
branches: [CRAN, main]

name: Test-coverage

jobs:
test-coverage:
if: "!contains(github.event.commits[0].message, '[skip-ci]')"
runs-on: macOS-latest
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1

- 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: Restore R package cache
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-
use-public-rspm: true

- name: Install dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::stars
needs: coverage

- name: Test coverage
run: covr::codecov()
run: covr::codecov(quiet = FALSE)
shell: Rscript {0}
35 changes: 35 additions & 0 deletions .github/workflows/Write-codemeta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help

on:
push:
paths: ['DESCRIPTION']

name: Write-codemeta

jobs:
render-readme:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::codemeta

- name: Write codemeta file
run: Rscript -e 'codemeta::write_codemeta()'

- name: Commit codemeta file
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add codemeta.json
git commit -m "Re-write codemeta.json" || echo "No changes to commit"
git push origin || echo "No changes to commit"
Loading

0 comments on commit b5f0cf2

Please sign in to comment.