Skip to content

Developing Optmatch Notes

Josh Errickson edited this page Mar 24, 2022 · 13 revisions

Building Optmatch

  1. In DESCRIPTION, increment version number.
  2. In DESCRIPTION, remove Remotes: josherrickson/rrelaxiv
  3. Ensure all checks pass
    • make check_win
    • make check_win_dev
    • make check_win_old
    • check_mac
    • check_rhub - this one tends to produce spurious warnings/errors/notes.
  4. 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.
  5. 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.
  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.

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 <commit hash>.
  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, the DESCRIPTION file 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.

Clone this wiki locally