From eb3f91c11e8401c8e48dfc3906748e672f045502 Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Fri, 16 Feb 2024 11:56:20 -0800 Subject: [PATCH 1/4] repo+doc: follow version conventions from epiprocess --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ad7a8b5e..febe8e4a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: epidatr Type: Package Title: Client for Delphi's 'Epidata' API -Version: 1.0.0.9000 +Version: 1.0.1 Date: 2023-12-07 Authors@R: c( diff --git a/NEWS.md b/NEWS.md index 021d9522..41c461ec 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# epidatr 1.0.0.9000 +# epidatr 1.1.0 - Function reference now displays commonly-used functions first (#205). - Endpoints now fail when passed misspelled arguments (#187, #201). From 7ece8677dfc351ca16352872858fa67186625180 Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Fri, 16 Feb 2024 12:12:28 -0800 Subject: [PATCH 2/4] doc: update development guide --- DEVELOPMENT.md | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 095c25d7..d5c463ef 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -5,7 +5,6 @@ install.packages(c('devtools', 'pkgdown', 'styler', 'lintr')) # install dev depe devtools::install_deps(dependencies = TRUE) # install package dependencies devtools::document() # generate package meta data and man files devtools::build() # build package - ``` ## Validating the package @@ -20,41 +19,39 @@ devtools::check() # check package for errors ## Developing the documentation site -The [documentation site](https://cmu-delphi.github.io/epidatr/) is built off of the `main` branch. The `dev` version of the site is available at https://cmu-delphi.github.io/epidatr/dev. +Our CI is setup to build the [main documentation site](https://cmu-delphi.github.io/epidatr/) off of the `main` branch, while the [`dev` version of the site](https://cmu-delphi.github.io/epidatr/dev) is built off the `dev` branch. -The documentation site can be previewed locally by running in R +The documentation site can be previewed locally by running in R: ```r +# Should automatically open a browser pkgdown::build_site(preview=TRUE) ``` -The `main` version is available at `file:////epidatr/docs/index.html` and `dev` at `file:////epidatr/docs/dev/index.html`. +If the above does not open a browser, you can try using a Python server from the command line: -You can also build the docs manually and launch the site with python. From the terminal, this looks like ```bash R -e 'devtools::document()' +R -e 'pkgdown::build_site()' python -m http.server -d docs ``` -For `pkgdown` to correctly generate both public (`main`) and `dev` documentation sites, the package version in `DESCRIPTION` on `dev` must have four components, and be of the format `x.x.x.9000`. The package version on `main` must be in the format `x.x.x`. +## Versioning -The documentation website is updated on push or pull request to the `main` and `dev` branches. +Please follow the guidelines in the PR template document (reproduced here): -## Release process +- [ ] Make sure this PR is against "dev", not "main". +- [ ] Request a review from one of the current epiprocess main reviewers: + brookslogan, nmdefries. +- [ ] Makes sure to bump the version number in `DESCRIPTION` and `NEWS.md`. + Always increment the patch version number (the third number), unless you are + making a release PR from dev to main, in which case increment the minor + version number (the second number). +- [ ] Describe changes made in NEWS.md, making sure breaking changes + (backwards-incompatible changes to the documented interface) are noted. + Collect the changes under the next release number (e.g. if you are on + 0.7.2, then write your changes under the 0.8 heading). -### Manual +## Release process TBD - -### Automated (currently unavailable) - -The release consists of multiple steps which can be all done via the GitHub website: - -1. Go to [create_release GitHub Action](https://github.com/cmu-delphi/epidatr/actions/workflows/create_release.yml) and click the `Run workflow` button. Enter the next version number or one of the magic keywords (patch, minor, major) and hit the green `Run workflow` button. -2. The action will prepare a new release and will end up with a new [Pull Request](https://github.com/cmu-delphi/epidatr/pulls) -3. Let the code owner review the PR and its changes and let the CI check whether everything builds successfully -4. Once approved and merged, another GitHub action job starts which automatically will - 1. create a git tag - 2. create another [Pull Request](https://github.com/cmu-delphi/epidatr/pulls) to merge the changes back to the `dev` branch - 3. create a [GitHub release](https://github.com/cmu-delphi/epidatr/releases) with automatically derived release notes -5. Release to CRAN From cfb6578dac6a9d0e3e408718bd40615ee12fd317 Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Fri, 16 Feb 2024 12:14:43 -0800 Subject: [PATCH 3/4] ci: add pull request template from epiprocess --- .github/pull_request_template.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..9a0edceb --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,21 @@ +### Checklist + +Please: + +- [ ] Make sure this PR is against "dev", not "main". +- [ ] Request a review from one of the current epiprocess main reviewers: + brookslogan, nmdefries. +- [ ] Makes sure to bump the version number in `DESCRIPTION` and `NEWS.md`. + Always increment the patch version number (the third number), unless you are + making a release PR from dev to main, in which case increment the minor + version number (the second number). +- [ ] Describe changes made in NEWS.md, making sure breaking changes + (backwards-incompatible changes to the documented interface) are noted. + Collect the changes under the next release number (e.g. if you are on + 1.7.2, then write your changes under the 1.8 heading). + +### Change explanations for reviewer + +### Magic GitHub syntax to mark associated Issue(s) as resolved when this is merged into the default branch + +- Resolves #{issue number} From 4a73d0eb8bb837f5a6e00a7d58b58e674f8d5436 Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Fri, 23 Feb 2024 14:16:22 -0800 Subject: [PATCH 4/4] doc: update DEVELOPMENT.md --- DEVELOPMENT.md | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index d5c463ef..e8223c9c 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -19,7 +19,10 @@ devtools::check() # check package for errors ## Developing the documentation site -Our CI is setup to build the [main documentation site](https://cmu-delphi.github.io/epidatr/) off of the `main` branch, while the [`dev` version of the site](https://cmu-delphi.github.io/epidatr/dev) is built off the `dev` branch. +Our CI builds two version of the documentation: + +- https://cmu-delphi.github.io/epidatr/ from the `main` branch and +- https://cmu-delphi.github.io/epidatr/dev from the `dev` branch. The documentation site can be previewed locally by running in R: @@ -28,7 +31,8 @@ The documentation site can be previewed locally by running in R: pkgdown::build_site(preview=TRUE) ``` -If the above does not open a browser, you can try using a Python server from the command line: +If the above does not open a browser, you can try using a Python server from the +command line: ```bash R -e 'devtools::document()' @@ -38,19 +42,7 @@ python -m http.server -d docs ## Versioning -Please follow the guidelines in the PR template document (reproduced here): - -- [ ] Make sure this PR is against "dev", not "main". -- [ ] Request a review from one of the current epiprocess main reviewers: - brookslogan, nmdefries. -- [ ] Makes sure to bump the version number in `DESCRIPTION` and `NEWS.md`. - Always increment the patch version number (the third number), unless you are - making a release PR from dev to main, in which case increment the minor - version number (the second number). -- [ ] Describe changes made in NEWS.md, making sure breaking changes - (backwards-incompatible changes to the documented interface) are noted. - Collect the changes under the next release number (e.g. if you are on - 0.7.2, then write your changes under the 0.8 heading). +Please follow the guidelines in the [PR template document](.github/pull_request_template.md). ## Release process