
SOP RPACT CRAN Release
© RPACT GmbH, Germany
SOP-RPACT-001
Version 1.0.7
rpact_sop_001_cran_release.Rmd
RPACT GmbH
Am Rodenkathen 11
23611 Sereetz
Germany
www.rpact.com
Copyright © 2025 RPACT GmbH. All rights reserved.
Standard Operating Procedure for RPACT CRAN Release
This SOP outlines the steps necessary to release a new version of the
rpact R package on CRAN. It is intended to ensure that all
releases meet quality standards and comply with CRAN submission
requirements.
| SOP-ID | SOP-RPACT-001 |
| Title | SOP RPACT CRAN Release |
| Description | Standard operating procedure for releasing a new rpact version with publication on CRAN |
| Author | Friedrich Pahlke |
| Creation date | 2021-09-06 |
| Version | 1.0.7 |
| Date of modification | 2023-04-07 |
Preconditions
Before initiating the release process, the following preconditions must be met:
- Check open GitHub issues: All known bugs and critical issues reported on github.com/rpact-com/rpact/issues must be resolved and closed. No open issues should be left unaddressed.
- Check CRAN package check results: All rpact results must have status OK or NOTE.
- Overall package check time: The package must pass all checks within a time frame of less than 10 minutes. This ensures that the package is efficient and does not impose undue burden on CRAN’s resources.
- Test coverage: The test coverage must be greater than 80%. This means that at least 80% of the code must be covered by unit tests, ensuring that most of the code has been tested and verified for correctness. See app.codecov.io/gh/rpact-com/rpact?branch=main.
General Preparation Steps Before Release on CRAN
Spell Check
Run the devtools::spell_check() function to ensure that
there are no spelling errors in the documentation. This step is crucial
to maintaining professionalism and clarity in the documentation.
devtools::spell_check()Run All Unit Tests
Ensure that all unit tests are up-to-date and pass successfully. Running all tests helps to confirm that no existing functionality is broken.
devtools::test()Upload Unit Test Credentials for All Clients
Make sure that any credentials required for unit tests are uploaded
and available for the testing environment. Use
rpact.validator::createUnitTestAccessFiles() to create and
upload all credentials.
Upload All Unit Tests
Ensure that all unit tests are correctly uploaded to the FTP
folder/www/private/rpact/{CURRENT_VERSION}/tests (replace
{CURRENT_VERSION} by the current version, e.g.,
4.0.0). This step is necessary to validate the package
across different environments and configurations.
Calculate and Check Test Coverage
Calculate the current test coverage and verify that it meets the required threshold of > 80%. The test coverage report should be reviewed to identify any untested code areas.
covr::package_coverage()Run rpact Function testPackage()
Execute the testPackage() function from the rpact
package to perform additional package-specific checks.
rpact::testPackage()Check rpact on RHub
Use RHub to check the package on different platforms and R versions. This step is critical to ensure cross-platform compatibility.
rhub::check_for_cran()Recreate and Check All Vignettes
Recreate all package vignettes using the new package version to ensure they compile correctly and reflect the latest changes:
- Open the Quarto project
rpact.vignettes/quarto/project.Rproj - Click on
BuildRender Website
Push Source Code to GitHub and Check CI/CD Pipeline
- Push the latest source code in the current developer branch to the GitHub repository
- Create a pull request.
- Monitor the CI/CD pipeline at github.com/rpact-com/rpact/actions to ensure all automated tests and checks pass successfully.
- Merge the pull request only into the main branch if the pipeline runs through without any issues
Submit Package to CRAN
Run devtools::release()
To submit the package to CRAN, run the
devtools::release() function. This function will guide you
through the submission process, including additional checks and the
creation of necessary files (e.g., NEWS.md,
CRAN-comments.md).
devtools::release()Follow the on-screen instructions carefully and ensure that all steps are completed without errors.
Post-Release Activities (One Week After Release)
Take a Screenshot of CRAN Check Results
Visit the CRAN package check results page for rpact
(cran.r-project.org/web/checks/check_results_rpact.html)
and take a screenshot of the check results. This provides a record of
the initial CRAN status after submission.
Save Screenshot and Create Validation Documentation
Save the screenshot in the validation documentation for rpact
at4_verification/chapter/validation_results/CRAN-Package-Check-Results.png.
Create or update the validation documentation for all clients, including
notes on any issues encountered during the CRAN checks.
See "SOP-RPACT-002 - SOP RPACT Validation Documentation"
for details.
Confirmation of Execution and Review
By signing below, I confirm that all steps outlined in this SOP have been fully executed and reviewed. I certify that the procedures were followed as described, and that the results have been verified for accuracy and compliance with the relevant standards.
| Name | Signature | Date |
|---|---|---|