Skip to content

Developing Optmatch Notes

Josh Errickson edited this page Nov 15, 2023 · 12 revisions

Releasing a new optmatch version

  1. In DESCRIPTION, increment version number.
  2. In NEWS, replace beta developement number with new version number.
  3. In DESCRIPTION, remove Remotes: josherrickson/rrelaxiv. (Note that Github Actions will fail if this is removed, so don't be surprised!)
  4. Ensure all checks pass
    • make check_win
    • make check_win_dev
    • make check_win_old
    • make check_mac
    • make check_rhub - this one tends to produce spurious warnings/errors/notes.
  5. Run devtools::release(args=c('--compact-vignettes=gs+qpdf') ). The compact-vignettes may not be relevant since vignettes were switched to HTML but shouldn't cause any harm.
  6. Go through the series of questions that release asks.

Once CRAN accepts the submission:

  1. Place a tag of variety vX.X.X on the commit the release is based on. (git tag vX.X.X; git push origin vX.X.X)
  2. In DESCRIPTION, append .9001 to the version number.
  3. In DESCRIPTION, re-add Remotes: josherrickson/rrelaxiv

To ensure the pkgdown site builds properly, follow instructions below to built the release version.

Building release version of pkgdown site

When pushing to the master branch, the pkgdown workflow will automatically update the pkgdown site, the development site if the version number ends of .900X, and the release site otherwise.

The master branch site won't be built when Remotes: josherrickson/rrelaxiv is removed (as in when packing for release) so we'll have to follow these steps to manually rebuild.

If the release site needs to get modified, the following steps can be taken:

  1. Checkout the tag'd commit with the most recent release: git checkout vX.X.X.
  2. Convert to a branch with git switch -C <branchname>.
  3. Make any required modifications:
    • Modify any files (e.g. README.md) directly.
    • You can use git checkout master -- <list of files> to pull files from the HEAD of master.
    • Ensure that DESCRIPTION has a Remotes: josherrickson/rrelaxiv line
  4. Commit any changes and push this new branch to github: git push -u origin <branchname>
  5. Re-run the Github Action on the branch.
    • On Github, goto Actions, choose "pkgdown" on left hand side.
    • There should be a message "This workflow has a workflow_dispatch event trigger" and next to it a dropdown menu called "Run Workflow".
    • In this dropdown, choose the branch you just pushed and click "Run Workflow"
  6. Both the "pkgdown" followed by "pages-build-deployment" actions should run without error.
  7. Once you are satisfied with the results, you can delete both the remote branch and local branch (git branch -d <branchname>).

Because of the rrelaxiv external dependence, building the pkgdown site requires the Remotes: josherrickson/rrelaxiv line, but it should not be pushed to CRAN. This means we'll need to run this after every release.

This is based upon this vignette in the pkgdown package.

The fact that pkgdown needs Remotes: and CRAN should not have it comes from https://r-pkgs.org/description.html#nonstandard-dependencies.