Skip to content

Commit

Permalink
Merge pull request #74 from ropensci/rust
Browse files Browse the repository at this point in the history
Update checklist and pkgdown infrastructure
  • Loading branch information
ThierryO authored Sep 6, 2024
2 parents f114968 + 0d0a7ad commit 2e58657
Show file tree
Hide file tree
Showing 55 changed files with 1,013 additions and 368 deletions.
13 changes: 7 additions & 6 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# checklist
^_pkgdown.yml$
^.*\.Rproj$
^.zenodo\.json$
^CITATION\.cff$
^LICENSE.md$
^Meta$
^README\.Rmd$
^\.Rproj\.user$
^\.github$
^\.httr-oauth$
^\.Rproj\.user$
^\.zenodo\.json$
^_pkgdown.yml$
^checklist.yml$
^CITATION\.cff$
^codecov.yml$
^codecov\.yml$
^codemeta\.json$
^cran-comments\.md$
^data-raw$
^doc$
^docs$
^LICENSE.md$
^man-roxygen$
^Meta$
^organisation.yml$
^pkgdown$
^README\.Rmd$
4 changes: 2 additions & 2 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ We are committed to making participation in this project a harassment-free exper
everyone, regardless of level of experience, gender, gender identity and expression,
sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.

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

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

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

This Code of Conduct is adapted from the Contributor Covenant
Expand Down
51 changes: 17 additions & 34 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,38 @@

### Fixing typos

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.

* YES: you edit a roxygen comment in a `.R` file below `R/`.
* NO: you edit an `.Rd` file below `man/`.
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.
E.g. edit a `roxygen2` comment in a `.R` file below `R/`, not in an `.Rd` file below `man/`.

### Prerequisites

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. If you’ve found a
bug, create an associated issue and illustrate the bug with a minimal
[reprex](https://www.tidyverse.org/help/#reprex).
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.
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).

### Pull request process

* We recommend that you create a Git branch for each pull request (PR).
* Look at the Travis and AppVeyor build status before and after making changes.
The `README` should contain badges for any continuous integration services used
by the package.
* We recommend the tidyverse [style guide](http://style.tidyverse.org).
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.
* We use [roxygen2](https://cran.r-project.org/package=roxygen2).
* We use [testthat](https://cran.r-project.org/package=testthat). Contributions
with test cases included are easier to accept.
* 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).
* Look at the GitHub Actions build status before and after making changes.
The `README` should contain badges for any continuous integration services used by the package.
* We require the `tidyverse` [style guide](http://style.tidyverse.org).
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.
* We use [`roxygen2`](https://cran.r-project.org/package=roxygen2).
* We use [`testthat`](https://cran.r-project.org/package=testthat).
Contributions with test cases included are easier to accept.
* 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).

### Code of Conduct

Please note that the git2rdata project is released with a
[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this
project you agree to abide by its terms.

### See rOpenSci [contributing guide](https://ropensci.github.io/dev_guide/contributingguide.html)
for further details.

### Discussion forum

Check out our [discussion forum](https://discuss.ropensci.org) if you think your issue requires a longer form discussion.
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md).
By contributing to this project you agree to abide by its terms.

### Prefer to Email?

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

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.
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.

### Thanks for contributing!

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
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
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ or similar - or if just relates to an issue make sure to mention
it like "#4" -->

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

<!--- Did you remember to include tests? Unless you're just changing
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/check_on_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ on:
- master
- ghpages

name: "check package"
name: "check package with checklist"

jobs:
check-package:
runs-on: ubuntu-latest
name: "check package"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: read
steps:
- uses: inbo/actions/check_pkg@master
with:
token: ${{ secrets.PAT }}
- uses: inbo/actions/[email protected]
70 changes: 11 additions & 59 deletions .github/workflows/check_on_different_r_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,78 +22,30 @@ jobs:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-22.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
- {os: ubuntu-22.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
_R_CHECK_SYSTEM_CLOCK_: false
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
extra-repositories: https://inbo.r-universe.dev

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

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
- 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
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
sudo apt-get install -y libcurl4-openssl-dev
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

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

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "error", check_dir = "check")
shell: Rscript {0}

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

- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
- uses: r-lib/actions/check-r-package@v2
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
retention-days: 5
error-on: '"error"'
12 changes: 5 additions & 7 deletions .github/workflows/check_on_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@ on:
branches:
- main
- master
schedule:
- cron: '6 0 15 * *'
permissions:
contents: write

name: "check package on main"
name: "check package on main with checklist"

jobs:
check-package:
runs-on: ubuntu-latest
name: "check package"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: inbo/actions/check_pkg@master
with:
token: ${{ secrets.PAT }}
- uses: inbo/actions/[email protected]
42 changes: 21 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
name: Releases

on:
push:
tags:
- 'v*'

name: Create Release
- v*
workflow_run:
workflows: ["check package on main with checklist"]
types:
- completed

jobs:
build:
name: Create Release
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get tag message
- uses: actions/checkout@v3
- name: Get tag
run: |
TAG_BODY=$(git tag --contains ${{ github.sha }} -n100 | awk '(NR>1)')
echo "::set-output name=TAG_BODY::$TAG_BODY"
id: tag-body
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
git fetch --tags --force
TAG=$(git tag --contains $(git rev-parse HEAD))
TAG_BODY=$(git tag --contains $(git rev-parse HEAD) --format='%(contents)')
echo "tag=$TAG" >> $GITHUB_ENV
echo "$TAG_BODY" > body.md
- uses: ncipollo/release-action@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.tag-body.outputs.TAG_BODY }}
draft: false
prerelease: false
name: Release ${{ env.tag }}
tag: ${{ env.tag }}
bodyFile: body.md
Loading

0 comments on commit 2e58657

Please sign in to comment.