Skip to content

Commit a63e911

Browse files
authored
Merge pull request #65 from r-spatialecology/main
shar v1.2
2 parents 05b9b23 + 3490cd0 commit a63e911

File tree

145 files changed

+12020
-11705
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+12020
-11705
lines changed

.Rbuildignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
^cran-comments\.md$
66
^docs$
77
^CODE_OF_CONDUCT.*$
8-
^LICENSE.*$
98
^vignettes/articles$
109
vignettes/articles
1110
^data-raw$
@@ -14,3 +13,6 @@ vignettes/articles
1413
^\.travis\.yml$
1514
^codecov\.yml$
1615
^CONTRIBUTING.*$
16+
^pkgdown$
17+
^\.github$
18+
^LICENSE\.md$

.github/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/Deploy-pkgdown.yaml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- CRAN
6+
7+
name: Deploy-pkgdown
8+
9+
jobs:
10+
pkgdown:
11+
runs-on: macOS-latest
12+
env:
13+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- uses: r-lib/actions/setup-r@v1
18+
19+
- uses: r-lib/actions/setup-pandoc@v1
20+
21+
- name: Query dependencies
22+
run: |
23+
install.packages('remotes')
24+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
25+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
26+
shell: Rscript {0}
27+
28+
- name: Cache R packages
29+
uses: actions/cache@v2
30+
with:
31+
path: ${{ env.R_LIBS_USER }}
32+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
33+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
34+
35+
- name: Install dependencies
36+
run: |
37+
remotes::install_deps(dependencies = TRUE)
38+
install.packages("pkgdown", type = "binary")
39+
shell: Rscript {0}
40+
41+
- name: Install package
42+
run: R CMD INSTALL .
43+
44+
- name: Deploy package
45+
run: |
46+
git config --local user.email "[email protected]"
47+
git config --local user.name "GitHub Actions"
48+
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

.github/workflows/R-CMD-check.yaml

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
2+
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- CRAN
8+
pull_request:
9+
branches:
10+
- master
11+
- CRAN
12+
13+
name: R-CMD-check
14+
15+
jobs:
16+
R-CMD-check:
17+
runs-on: ${{ matrix.config.os }}
18+
19+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
config:
25+
- {os: windows-latest, r: 'release'}
26+
- {os: macOS-latest, r: 'release'}
27+
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
28+
29+
env:
30+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
31+
RSPM: ${{ matrix.config.rspm }}
32+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
33+
34+
steps:
35+
- uses: actions/checkout@v2
36+
37+
- uses: r-lib/actions/setup-r@v1
38+
with:
39+
r-version: ${{ matrix.config.r }}
40+
41+
- uses: r-lib/actions/setup-pandoc@v1
42+
43+
- name: Query dependencies
44+
run: |
45+
install.packages('remotes')
46+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
47+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
48+
shell: Rscript {0}
49+
50+
- name: Cache R packages
51+
if: runner.os != 'Windows'
52+
uses: actions/cache@v2
53+
with:
54+
path: ${{ env.R_LIBS_USER }}
55+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
56+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
57+
58+
- name: Install system dependencies
59+
if: runner.os == 'Linux'
60+
run: |
61+
while read -r cmd
62+
do
63+
eval sudo $cmd
64+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
65+
66+
- name: Install dependencies
67+
run: |
68+
remotes::install_deps(dependencies = TRUE)
69+
remotes::install_cran("rcmdcheck")
70+
shell: Rscript {0}
71+
72+
- name: Check
73+
env:
74+
_R_CHECK_CRAN_INCOMING_REMOTE_: false
75+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
76+
shell: Rscript {0}
77+
78+
- name: Upload check results
79+
if: failure()
80+
uses: actions/upload-artifact@main
81+
with:
82+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
83+
path: check

.github/workflows/Render-README.yaml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
paths:
4+
- README.Rmd
5+
6+
name: Render-README
7+
8+
jobs:
9+
render:
10+
name: Render README
11+
runs-on: macOS-latest
12+
env:
13+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: r-lib/actions/setup-r@v1
17+
- uses: r-lib/actions/setup-pandoc@v1
18+
- name: Install rmarkdown, remotes, and the local package
19+
run: |
20+
install.packages("remotes")
21+
remotes::install_local(".")
22+
remotes::install_cran("rmarkdown")
23+
shell: Rscript {0}
24+
- name: Render README
25+
run: Rscript -e 'rmarkdown::render("README.Rmd")'
26+
- name: Commit results
27+
run: |
28+
git config --local user.email "[email protected]"
29+
git config --local user.name "GitHub Actions"
30+
git add README.md man/figures/README-*
31+
git commit -m 'Re-build README.Rmd' || echo "No changes to commit"
32+
git push origin || echo "No changes to commit"

.github/workflows/Test-coverage.yaml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- CRAN
6+
pull_request:
7+
branches:
8+
- master
9+
- CRAN
10+
11+
name: Test-coverage
12+
13+
jobs:
14+
test-coverage:
15+
runs-on: macOS-latest
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- uses: r-lib/actions/setup-r@v1
22+
23+
- uses: r-lib/actions/setup-pandoc@v1
24+
25+
- name: Query dependencies
26+
run: |
27+
install.packages('remotes')
28+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
29+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
30+
shell: Rscript {0}
31+
32+
- name: Cache R packages
33+
uses: actions/cache@v2
34+
with:
35+
path: ${{ env.R_LIBS_USER }}
36+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
37+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
38+
39+
- name: Install dependencies
40+
run: |
41+
install.packages(c("remotes"))
42+
remotes::install_deps(dependencies = TRUE)
43+
remotes::install_cran("covr")
44+
shell: Rscript {0}
45+
46+
- name: Test coverage
47+
run: covr::codecov()
48+
shell: Rscript {0}

.gitignore

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.Rproj.user
2-
.Rhistory
3-
.RData
4-
.Ruserdata
5-
.DS_Store
6-
inst/doc
7-
Rplots.pdf
1+
.Rproj.user
2+
.Rhistory
3+
.RData
4+
.Ruserdata
5+
.DS_Store
6+
inst/doc
7+
Rplots.pdf

.travis.yml

-18
This file was deleted.

DESCRIPTION

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
Type: Package
22
Package: shar
33
Title: Species-Habitat Associations
4-
Version: 1.1
5-
Authors@R: c(person("Maximillian H.K.", "Hesselbarth", email = "maximilian.hesselbarth@uni-goettingen.de",
4+
Version: 1.2
5+
Authors@R: c(person("Maximillian H.K.", "Hesselbarth", email = "mhk.hesselbarth@gmail.com",
66
role = c("aut", "cre"), comment = c(ORCID = "0000-0003-1125-9918")),
77
person("Marco", "Sciaini", email = "[email protected]",
88
role = "aut", comment = c(ORCID = '0000-0002-3042-5435')))
9-
Maintainer: Maximillian H.K. Hesselbarth <maximilian.hesselbarth@uni-goettingen.de>
9+
Maintainer: Maximillian H.K. Hesselbarth <mhk.hesselbarth@gmail.com>
1010
Description:
1111
Analyse species-habitat associations in R. Therefore, information about the
1212
location of the species is needed and about the environmental conditions. To test
1313
for significance habitat associations, one of the two components is randomized.
1414
Methods are mainly based on Plotkin et al. (2000) <doi:10.1006/jtbi.2000.2158> and
1515
Harms et al. (2001) <doi:10.1111/j.1365-2745.2001.00615.x>.
16-
License: GPL-3
16+
License: GPL (>= 3)
1717
URL: https://r-spatialecology.github.io/shar
1818
BugReports: https://github.com/r-spatialecology/shar/issues
1919
Depends: R (>= 3.1)
@@ -23,17 +23,19 @@ Imports:
2323
grDevices,
2424
methods,
2525
raster,
26-
spatstat,
26+
spatstat.core,
27+
spatstat.geom,
2728
stats,
2829
utils,
2930
Rcpp
30-
RoxygenNote: 6.1.1
31+
RoxygenNote: 7.1.1
3132
Suggests:
3233
covr,
3334
dplyr,
3435
testthat (>= 2.1.0),
3536
knitr,
36-
rmarkdown
37+
rmarkdown,
38+
spatstat
3739
VignetteBuilder: knitr
3840
Encoding: UTF-8
3941
LazyData: true

0 commit comments

Comments
 (0)