Guidelines for developers and maintainer

Please note that this guideline is no longer up to date and will be revised shortly with the upcoming new CRAN release of the package.

crmPack Development workflow (all developers)

  1. Pull changes from github before starting to work
  2. As you make a change in functionality (either a bugfix or a new feature), please update the NEWS.md file accordingly (otherwise it is usually forgotten at the end)
  3. Run R CMD check locally
  4. Frequently push changes to github after finishing pieces of work, using informative comments.

crmPack Release workflow (maintainer)

  1. Increment version number in DESCRIPTION file to "x.y.z"" format (was „x.y.z.w" before for development, or "x.y.z-1" if submitted to CRAN and came back with comments)
  2. Consider updating README.Rmd.
    • If yes, after updating, need to knit the document (e.g. via pressing the button in RStudio) to create an updated README.md file
  3. Consider updating the vignette (in vignettes/example.Rnw), especially if new features have been introduced in this release.
    • If yes, can be checked by "Compile PDF" button in RStudio before the package build
  4. Regenerate the documentation and NAMESPACE files with Roxygen2:
    • In RStudio, click in the right-hand upper panel: Build -> More -> Document
  5. Build the package and check it:
  6. Open a new terminal in RStudio
  7. go to the directory below the package directory
  8. then type "R CMD build crmPack"
  9. Afterwards type "R CMD check --as-cran crmPack_x.y.z.tar.gz" where you would replace x.y.z with the package version just built.
  10. Correct any errors, warnings and if possible notes and iterate the check/correction cycle (also including numbers 1-3 above if Readme, vignettes or documentation/NAMESPACE were touched).
  11. Commit and push changes to git repository, to trigger GitHub actions
  12. If this release is for CRAN, then submit the package to CRAN:
  13. Go to https://cran.r-project.org/submit.html
  14. Enter your name, email address
  15. Upload the package ("crmPack_x.y.z.tar.gz") – note that it is important that the version is higher than the version you submitted the last time to CRAN, even if it is intended for the same release and had errors in last version.
  16. Confirm that you checked everything.
  17. Wait for feedback and iterate steps 1-5 after taking into account CRAN feedback.
  18. Generate website:
  19. Change "mode: devel" to "mode: release" in _pkgdown.yml
  20. Run "pkgdown::build_site()" in the R console to build the website
  21. Commit and push changes to git repository to release the new website
  22. Create a tag for this release:
  23. Go to https://github.com/openpharma/crmPack and click on "releases" (top line, next to "commits", "branches" on the left and "contributor" on the right)
  24. Click "Create a new release"
  25. Type a version number for your release – this should be "v" followed immediately without blank by the package version number "x.y.z", i.e. e.g. "v1.0.3"
  26. Select the master branch.
  27. Type a title and description that describes your release. Copy and paste the contents of the relevant NEWS.md section into the release notes.
  28. If the release is unstable, select "This is a pre-release" to notify users that it's not ready for production.
  29. If you're ready to publicize your release, click Publish release. Otherwise, click Save draft to work on it later.
  30. Go back to development mode:
  31. Change "mode: release" to "mode: devel" in _pkgdown.yml
  32. Increment the version number (e.g. x.y.z+1.1) in the DESCRIPTION file (so an additional digit after the first 3 numbers to clarify that this is a development version)
  33. Commit and push changes to git repository


Try the crmPack package in your browser

Any scripts or data that you put into this service are public.

crmPack documentation built on June 26, 2024, 5:07 p.m.