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 creates a .github/workflows/rhino-test.yml
file on rhino::init()
. This GitHub Actions workflow automatically runs all linters and tests once a project is pushed to GitHub. To test that it works correctly we have the App Push Test workflow.
The Push Test initializes a fresh Rhino application and pushes it to the bot/app-push-test
branch. The Rhino Test of this application then 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.
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.
- 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 a development version
.9000
inDESCRIPTION
. - Add a
# rhino (development version)
header inNEWS.md
. - Link the
# rhino X.Y.Z
header to the GitHub release inNEWS.md
.
- Add a development version
- Announce the release on
#proj-rhino
.
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.