Skip to content

Commit 2e58657

Browse files
authored
Merge pull request #74 from ropensci/rust
Update checklist and pkgdown infrastructure
2 parents f114968 + 0d0a7ad commit 2e58657

Some content is hidden

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

55 files changed

+1013
-368
lines changed

.Rbuildignore

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
# checklist
2-
^_pkgdown.yml$
32
^.*\.Rproj$
43
^.zenodo\.json$
4+
^CITATION\.cff$
5+
^LICENSE.md$
6+
^Meta$
7+
^README\.Rmd$
8+
^\.Rproj\.user$
59
^\.github$
610
^\.httr-oauth$
7-
^\.Rproj\.user$
811
^\.zenodo\.json$
12+
^_pkgdown.yml$
913
^checklist.yml$
10-
^CITATION\.cff$
1114
^codecov.yml$
1215
^codecov\.yml$
1316
^codemeta\.json$
1417
^cran-comments\.md$
1518
^data-raw$
1619
^doc$
1720
^docs$
18-
^LICENSE.md$
1921
^man-roxygen$
20-
^Meta$
22+
^organisation.yml$
2123
^pkgdown$
22-
^README\.Rmd$

.github/CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ We are committed to making participation in this project a harassment-free exper
88
everyone, regardless of level of experience, gender, gender identity and expression,
99
sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
1010

11-
Examples of unacceptable behavior by participants include the use of sexual language or
11+
Examples of unacceptable behaviour by participants include the use of sexual language or
1212
imagery, derogatory comments or personal attacks, trolling, public or private harassment,
1313
insults, or other unprofessional conduct.
1414

@@ -17,7 +17,7 @@ commits, code, wiki edits, issues, and other contributions that are not aligned
1717
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed
1818
from the project team.
1919

20-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
20+
Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported by
2121
opening an issue or contacting one or more of the project maintainers.
2222

2323
This Code of Conduct is adapted from the Contributor Covenant

.github/CONTRIBUTING.md

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,38 @@
22

33
### Fixing typos
44

5-
Small typos or grammatical errors in documentation may be edited directly using
6-
the GitHub web interface, so long as the changes are made in the _source_ file.
7-
8-
* YES: you edit a roxygen comment in a `.R` file below `R/`.
9-
* NO: you edit an `.Rd` file below `man/`.
5+
Small typos or grammatical errors in documentation may be edited directly using the GitHub web interface, so long as the changes are made in the _source_ file.
6+
E.g. edit a `roxygen2` comment in a `.R` file below `R/`, not in an `.Rd` file below `man/`.
107

118
### Prerequisites
129

13-
Before you make a substantial pull request, you should always file an issue and
14-
make sure someone from the team agrees that it’s a problem. If you’ve found a
15-
bug, create an associated issue and illustrate the bug with a minimal
16-
[reprex](https://www.tidyverse.org/help/#reprex).
10+
Before you make a substantial pull request, you should always file an issue and make sure someone from the team agrees that it’s a problem.
11+
If you’ve found a bug, create an associated issue and illustrate the bug with a minimal [reproducible example](https://www.tidyverse.org/help/#reprex).
1712

1813
### Pull request process
1914

2015
* We recommend that you create a Git branch for each pull request (PR).
21-
* Look at the Travis and AppVeyor build status before and after making changes.
22-
The `README` should contain badges for any continuous integration services used
23-
by the package.
24-
* We recommend the tidyverse [style guide](http://style.tidyverse.org).
25-
You can use the [styler](https://CRAN.R-project.org/package=styler) package to
26-
apply these styles, but please don't restyle code that has nothing to do with
27-
your PR.
28-
* We use [roxygen2](https://cran.r-project.org/package=roxygen2).
29-
* We use [testthat](https://cran.r-project.org/package=testthat). Contributions
30-
with test cases included are easier to accept.
31-
* For user-facing changes, add a bullet to the top of `NEWS.md` below the
32-
current development version header describing the changes made followed by your
33-
GitHub username, and links to relevant issue(s)/PR(s).
16+
* Look at the GitHub Actions build status before and after making changes.
17+
The `README` should contain badges for any continuous integration services used by the package.
18+
* We require the `tidyverse` [style guide](http://style.tidyverse.org).
19+
You can use the [`styler`](https://CRAN.R-project.org/package=styler) package to apply these styles, but please don't restyle code that has nothing to do with your PR.
20+
* We use [`roxygen2`](https://cran.r-project.org/package=roxygen2).
21+
* We use [`testthat`](https://cran.r-project.org/package=testthat).
22+
Contributions with test cases included are easier to accept.
23+
* For user-facing changes, add a bullet to the top of `NEWS.md` below the current development version header describing the changes made followed by your GitHub username, and links to relevant issue(s)/PR(s).
3424

3525
### Code of Conduct
3626

37-
Please note that the git2rdata project is released with a
38-
[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this
39-
project you agree to abide by its terms.
40-
41-
### See rOpenSci [contributing guide](https://ropensci.github.io/dev_guide/contributingguide.html)
42-
for further details.
43-
44-
### Discussion forum
45-
46-
Check out our [discussion forum](https://discuss.ropensci.org) if you think your issue requires a longer form discussion.
27+
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md).
28+
By contributing to this project you agree to abide by its terms.
4729

4830
### Prefer to Email?
4931

5032
Email the person listed as maintainer in the `DESCRIPTION` file of this repo.
5133

52-
Though note that private discussions over email don't help others - of course email is totally warranted if it's a sensitive problem of any kind.
34+
Though note that private discussions over email don't help others - of course
35+
email is totally warranted if it's a sensitive problem of any kind.
5336

5437
### Thanks for contributing!
5538

56-
This contributing guide is adapted from the tidyverse contributing guide available at https://raw.githubusercontent.com/r-lib/usethis/master/inst/templates/tidy-contributing.md
39+
This contributing guide is adapted from the `tidyverse` contributing guide available at https://raw.githubusercontent.com/r-lib/usethis/master/inst/templates/tidy-contributing.md

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ or similar - or if just relates to an issue make sure to mention
1313
it like "#4" -->
1414

1515
## Example
16-
<!--- if introducing a new feature or changing behavior of existing
16+
<!--- if introducing a new feature or changing behaviour of existing
1717
methods/functions, include an example if possible to do in brief form -->
1818

1919
<!--- Did you remember to include tests? Unless you're just changing

.github/workflows/check_on_branch.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ on:
55
- master
66
- ghpages
77

8-
name: "check package"
8+
name: "check package with checklist"
99

1010
jobs:
1111
check-package:
1212
runs-on: ubuntu-latest
1313
name: "check package"
1414
env:
1515
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
16-
ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
permissions:
18+
contents: read
1719
steps:
18-
- uses: inbo/actions/check_pkg@master
19-
with:
20-
token: ${{ secrets.PAT }}
20+
- uses: inbo/actions/[email protected]

.github/workflows/check_on_different_r_os.yml

Lines changed: 11 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -22,78 +22,30 @@ jobs:
2222
config:
2323
- {os: macOS-latest, r: 'release'}
2424
- {os: windows-latest, r: 'release'}
25-
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
26-
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
25+
- {os: ubuntu-22.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
26+
- {os: ubuntu-22.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
2727

2828
env:
2929
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
3030
_R_CHECK_SYSTEM_CLOCK_: false
3131
RSPM: ${{ matrix.config.rspm }}
3232
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
33-
ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
3433

3534
steps:
36-
- uses: actions/checkout@v2
35+
- uses: actions/checkout@v3
3736

38-
- uses: r-lib/actions/setup-r@master
37+
- uses: r-lib/actions/setup-r@v2
3938
with:
4039
r-version: ${{ matrix.config.r }}
40+
extra-repositories: https://inbo.r-universe.dev
4141

42-
- uses: r-lib/actions/setup-pandoc@master
42+
- uses: r-lib/actions/setup-pandoc@v2
4343

44-
- name: Query dependencies
45-
run: |
46-
install.packages('remotes')
47-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
48-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
49-
shell: Rscript {0}
50-
51-
- name: Cache R packages
52-
if: runner.os != 'Windows'
53-
uses: actions/cache@v1
44+
- uses: r-lib/actions/setup-r-dependencies@v2
5445
with:
55-
path: ${{ env.R_LIBS_USER }}
56-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
57-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
58-
59-
- name: Install system dependencies
60-
if: runner.os == 'Linux'
61-
env:
62-
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
63-
run: |
64-
Rscript -e "remotes::install_github('r-hub/sysreqs')"
65-
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
66-
sudo -s eval "$sysreqs"
67-
sudo apt-get install -y libcurl4-openssl-dev
68-
69-
- name: Install dependencies
70-
run: |
71-
remotes::install_deps(dependencies = TRUE)
72-
remotes::install_cran("rcmdcheck")
73-
shell: Rscript {0}
74-
75-
- name: Session info
76-
run: |
77-
options(width = 100)
78-
pkgs <- installed.packages()[, "Package"]
79-
sessioninfo::session_info(pkgs, include_base = TRUE)
80-
shell: Rscript {0}
81-
82-
- name: Check
83-
env:
84-
_R_CHECK_CRAN_INCOMING_: false
85-
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "error", check_dir = "check")
86-
shell: Rscript {0}
87-
88-
- name: Show testthat output
89-
if: always()
90-
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
91-
shell: bash
46+
extra-packages: any::rcmdcheck
47+
needs: check
9248

93-
- name: Upload check results
94-
if: failure()
95-
uses: actions/upload-artifact@master
49+
- uses: r-lib/actions/check-r-package@v2
9650
with:
97-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
98-
path: check
99-
retention-days: 5
51+
error-on: '"error"'

.github/workflows/check_on_main.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ on:
33
branches:
44
- main
55
- master
6-
schedule:
7-
- cron: '6 0 15 * *'
6+
permissions:
7+
contents: write
88

9-
name: "check package on main"
9+
name: "check package on main with checklist"
1010

1111
jobs:
1212
check-package:
1313
runs-on: ubuntu-latest
1414
name: "check package"
1515
env:
1616
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
17-
ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
steps:
19-
- uses: inbo/actions/check_pkg@master
20-
with:
21-
token: ${{ secrets.PAT }}
19+
- uses: inbo/actions/[email protected]

.github/workflows/release.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1+
name: Releases
2+
13
on:
24
push:
35
tags:
4-
- 'v*'
5-
6-
name: Create Release
6+
- v*
7+
workflow_run:
8+
workflows: ["check package on main with checklist"]
9+
types:
10+
- completed
711

812
jobs:
9-
build:
10-
name: Create Release
13+
publish:
1114
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
1217
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v2
15-
- name: Get tag message
18+
- uses: actions/checkout@v3
19+
- name: Get tag
1620
run: |
17-
TAG_BODY=$(git tag --contains ${{ github.sha }} -n100 | awk '(NR>1)')
18-
echo "::set-output name=TAG_BODY::$TAG_BODY"
19-
id: tag-body
20-
- name: Create Release
21-
id: create_release
22-
uses: actions/create-release@v1
23-
env:
24-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
git fetch --tags --force
22+
TAG=$(git tag --contains $(git rev-parse HEAD))
23+
TAG_BODY=$(git tag --contains $(git rev-parse HEAD) --format='%(contents)')
24+
echo "tag=$TAG" >> $GITHUB_ENV
25+
echo "$TAG_BODY" > body.md
26+
- uses: ncipollo/release-action@v1
2527
with:
26-
tag_name: ${{ github.ref }}
27-
release_name: Release ${{ github.ref }}
28-
body: ${{ steps.tag-body.outputs.TAG_BODY }}
29-
draft: false
30-
prerelease: false
28+
name: Release ${{ env.tag }}
29+
tag: ${{ env.tag }}
30+
bodyFile: body.md

0 commit comments

Comments
 (0)