library(EPACmodel)
#>
#> Attaching package: 'EPACmodel'
#> The following object is masked from 'package:stats':
#>
#> simulateThis article is intended for developers of this package. It document developer workflows as well as quirks of this project.
{renv}
This package uses {renv}
to manage dependencies.
In order to ensure the development environment is properly tracked,
please use the dev=TRUE option in renv
functions. For instance, to check the status of your environment, use
renv::status(dev=TRUE). To log packages, use
renv::snapshot(dev=TRUE). (renv::restore()
does not use this flag.)
Note that at project startup, renv::status(dev=FALSE)
will execute first, reporting that the project is out-of-sync. After,
the project is set up to automatically run
renv::status(dev=TRUE), so consult this second output to
check the true status of the project.
Creating a new release
- Create a feature-specific branch and make changes to the code as desired.
- Once the work is completed, increment the package version number in
DESCRIPTIONand create a pull request and, summarizing changes to the package. Follow semantic versioning rules to select a version number. Namely, version numbers should be of forma.b.c, where:
-
ais a major version (changes in how the user interfaces with the software, will likely break old code) -
bis a minor version (new features that are backwards compatible, i.e., won’t break old code) -
cis a patch version (bug fixes that are backwards compatible)
- Once the pull request is accepted and merged into
main, pull all changes toorigin/mainonto your local instance of the repo. - Open a git-enabled terminal (like Git Bash) and ensure you’re on the
mainbranch (e.g. withgit branch) - Create an annotated git
tag for this version with
git tag -a [[VERSION]] -m "[[SUMMARY]]". Here, replace[[VERSION]]with the version number (in formatva.b.c–this will be the tag name) and[[SUMMARY]]with a short summary of what’s new in this version of the code. - Push your tag up to the
originrepo withgit push origin [[VERSION]]. Note that by default,git pushwill not push up tags. - Go to the EPACModel GitHub page and click the “Releases” link in the right sidebar.
- Select the “Draft a new release” button. Choose the tag you just created and then select “Generate release notes”. Add any missing details to the autogenerated release notes. Ensure this release is set as the latest release. Click “Publish release” to finish.
Now the package can be installed with something like
remotes::install_github('phac-nml-phrsd/EPACmodel@va.b.c')
(or using renv::install()).