The procedure of package release

DDT meeting presentation 20220905

Tools used in this presentation

  • Quarto: An open-source scientific and technical publishing system built on Pandoc
  • reveal.js: An open source HTML presentation framework
  • Reference demo and source code
  • VS code

The procedure of package release

1. Review GitLab

Review the merge requests and issues and decide which should be included in the release.

  • Contact developers or reviewers to know the progress
  • Open an issue for new release (tag “all” if necessary)

2. Open a new branch for version bumping

When all the new development is in master branch, open a branch for version bumping and document update.

  • Update NEWS.md
# s2dv 1.2.0 (Release date: 2022-06-22)
- PlotEquiMap(): New feature xxx
- DiffCorr(): Bugfix xxx
  • Automatic generation
devtools::documents()
  • Manual update

DESCRIPTION

Package: s2dv
Title: A Set of Common Tools for Seasonal to Decadal Verification
Version: 1.2.0
Authors@R: c(
    person("BSC-CNS", role = c("aut", "cph")),
    person("An-Chi", "Ho", , "an.ho@bsc.es", role = c("aut", "cre")),
...
Imports:
    abind,
...

2. Open a new branch for version bumping

When all the new development is in master branch, open a branch for version bumping and document update.

  • Update NEWS.md
# s2dv 1.2.0 (Release date: 2022-06-22)
- PlotEquiMap(): New feature xxx
- DiffCorr(): Bugfix xxx
  • Automatic generation
devtools::documents()
  • Manual update

DESCRIPTION

Package: s2dv
Title: A Set of Common Tools for Seasonal to Decadal Verification
Version: 1.2.0
Authors@R: c(
    person("BSC-CNS", role = c("aut", "cph")),
    person("An-Chi", "Ho", , "an.ho@bsc.es", role = c("aut", "cre")),
    person("Eva", "Rifa", , "eva.rifarovira@bsc.es", role = c("ctb")),
...
Imports:
    abind,
...

3. Build the package

R CMD build --resave-data s2dv
* checking for file ‘s2dv/DESCRIPTION’ ... OK
* preparing ‘s2dv’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* re-saving image files
* building ‘s2dv_1.2.0.tar.gz’

R CMD check --as-cran s2dv_1.2.0.tar.gz
...
...
* DONE

Status: 2 WARNINGs, 1 NOTE
See
  ‘/home/Earth/aho/s2dv.Rcheck/00check.log’

4. Submit to win-builder

https://win-builder.r-project.org/ Building and checking R source packages for Windows.

Correct the bugs detected in other systems (Windows, Ubuntu) or newer R versions.

5. Install internally

  • Update manual (PDF generated from building package)
  • Push to GitLab and merge into master branch
  • Install in the usual places (workstation and Nord3v2, commonly used R module)
  • Inform users by email, wait for problem reporting

6. Submit to CRAN

  • If there is problem, open a new branch called “hotfix-<new_version_number>” and fix the problems.
  • If no problem reporting by users, submit to CRAN: https://cran.r-project.org/submit.html

7. Merge to production and create tag

When the pacakge is published on CRAN, merge master branch to production branch, and create a tag on production.

DONE 🎉