Contributing guidelines
Source:.github/CONTRIBUTING.md
This document contains guidelines specific to Rhino. Appsilon’s general contributing guidelines still apply.
Development tools
R CMD check
devtools::check()
orrcmdcheck::rcmdcheck()
Run linter
devtools::lint()
orlintr::lint_package()
Run unit tests
devtools::test()
ortestthat::test_local()
Check spelling
devtools::spell_check()
orspelling::spell_check_package()
Build documentation
devtools::build_site()
orpkgdown::build_site()
Build package
devtools::build()
orpkgbuild::build()
App Push Test
Rhino comes with a CI setup out of the box. On rhino::init()
it creates a rhino-test.yml
file, a GitHub Actions workflow which automatically runs all linters and tests once the project is pushed to GitHub.
To test rhino-test.yml
itself, we have the app-push-test.yml
workflow. It initializes a fresh Rhino application and pushes it to the bot/app-push-test
branch. Then rhino-test.yml
of this application runs and its results can be viewed in the list of workflow runs.
The App Push Test is triggered automatically on pushes to main
and can also be triggered manually for any branch via the Actions tab.
The workflow requires a fine-grained personal access token with write access to code and workflows. It should be saved as the APP_PUSH_TEST_PAT
repository secret.
Website
The documentation site is built and deployed automatically by our pkgdown.yml
workflow. It is triggered on each push to the main
branch. It runs the pkgdown/build.R
script which builds the documentation for all Rhino versions listed in pkgdown/versions.yml
.
Release process
Preparation
- Announce the planned release on
#proj-rhino
(approximate date and scope). - Plan promotion (social media, blog post, …). Coordinate efforts with the marketing team.
- Ensure that the App Push Test passes (the latest run for the
main
branch should be green). - Upgrade Rhino Showcase.
- Create a task to track progress.
- Test upgrade by installing Rhino from the current
main
branch. - Continue the release process. The upgrade can be completed and the task closed once the package is accepted to CRAN.
- Prepare the package for release.
- Create a
release-X.Y.Z
branch frommain
. - Update
DESCRIPTION
.- Bump the package version according to SemVer. Drop the development version (last component, e.g.
.9001
).
- Bump the package version according to SemVer. Drop the development version (last component, e.g.
- Create a migration guide.
- Refer to
NEWS.md
for hints on what to include in the guide.
- Refer to
- Update
NEWS.md
.- Replace the
(development version)
withX.Y.Z
in the header. Do not add a link to GitHub releases yet - the link won’t work and will fail CRAN checks. - Edit the list of changes to make it useful and understandable for our users. See keep a changelog for some guidelines.
- Replace the
- Submit the changes in a pull request titled “Release X.Y.Z”. Get it approved and merged.
- Create a
Submitting to CRAN
- Build and test the package.
- Checkout the
main
branch and ensure it is up to date. - Build the package with
devtools::build()
. - Test the package with
R CMD check --as-cran rhino_X.Y.Z.tar.gz
. There should be no errors, warnings nor notes.
- Checkout the
-
Publish a new pre-release on GitHub.
- Create a new
vX.Y.Z-rc.1
tag on themain
branch (rc
stands for release candidate). - Use the tag name for title.
- Leave description blank.
- Check “Set as a pre-release”.
- Click “Publish release”.
- Create a new
-
Submit the package to CRAN.
- Use your own name and email.
- Click “Choose File” and select
rhino_X.Y.Z.tar.gz
from step 1. - Click “Upload the package”.
- Click “Submit package”.
- Click the confirmation link sent to
opensource@appsilon.com
.
- If CRAN reviewers ask for changes, implement them and return to step 1. Use
rc.2
,rc.3
and so on for subsequent submissions.
Once accepted to CRAN
-
Publish a new release on GitHub.
- Create a new
vX.Y.Z
tag on themain
branch. - Use the tag name for title.
- Fill in the description from
NEWS.md
. - Check “Set as the latest release”.
- Click “Publish release”.
- Create a new
- Prepare the package for further development.
- Add the new version to
pkgdown/versions.yml
. - Add a development version
.9000
inDESCRIPTION
. - Update
NEWS.md
:- Add a
# rhino (development version)
header. - Link the
# rhino X.Y.Z
header to the GitHub release. - Add a link to the migration guide in
NEWS.md
.
- Add a
- Add the new version to
- Announce the release on
#proj-rhino
. - Complete the upgrade of Rhino Showcase.
Development process
- All changes are introduced in pull requests to the
main
branch, which must be always kept in a “potentially shippable” state. - Pull requests must be peer-reviewed. The reviewer inspects the code, tests the changes and checks them against the DoD before approving.
- We follow the Semantic Versioning scheme. Starting with
1.0.0
, all versions should be released to CRAN.