From db90bdaf378d0295a760b36d96dff8aee27bee05 Mon Sep 17 00:00:00 2001 From: "Logan C. Brooks" Date: Wed, 29 Nov 2023 17:27:46 -0800 Subject: [PATCH 1/5] Update pkgdown action&config to build separate dev doc site Also, remove references to defunct/never-existing `master` branch. --- .github/workflows/R-CMD-check.yaml | 4 ++-- .github/workflows/pkgdown.yaml | 4 ++-- _pkgdown.yml | 10 +++++++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 67f4bdb7..ecc1c082 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -4,9 +4,9 @@ # Created with usethis + edited to run on PRs to dev, use API key. on: push: - branches: [main, master] + branches: [main, dev] pull_request: - branches: [main, master, dev] + branches: [main, dev] name: R-CMD-check diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index e591f1d9..5d70a744 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -4,9 +4,9 @@ # Created with usethis + edited to run on PRs to dev, use API key. on: push: - branches: [main, master] + branches: [main, dev] pull_request: - branches: [main, master, dev] + branches: [main, dev] release: types: [published] workflow_dispatch: diff --git a/_pkgdown.yml b/_pkgdown.yml index bba3ea8d..de6d927f 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,6 +1,14 @@ template: bootstrap: 5 - + +development: + mode: auto + +# Colors from epipredict & epidatr, including Carnegie Red https://www.cmu.edu/brand/brand-guidelines/visual-identity/colors.html +navbar: + bg: '#C41230' + fg: '#f8f8f8' + url: https://cmu-delphi.github.io/epiprocess/ home: From a326680eefa3f517a54b16f0a871be5041929b57 Mon Sep 17 00:00:00 2001 From: "Logan C. Brooks" Date: Wed, 29 Nov 2023 17:29:40 -0800 Subject: [PATCH 2/5] Update pkgdown home links --- _pkgdown.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index de6d927f..3d80ebb8 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -13,12 +13,14 @@ url: https://cmu-delphi.github.io/epiprocess/ home: links: - - text: Get the epipredict R package - href: https://cmu-delphi.github.io/epipredict/ - - text: Get the covidcast R package - href: https://cmu-delphi.github.io/covidcast/covidcastR/ + - text: View the Delphi tooling book + href: https://cmu-delphi.github.io/delphi-tooling-book/ + - text: Get epidatasets R package + href: https://cmu-delphi.github.io/epidatasets/ - text: Get the epidatr R package href: https://github.com/cmu-delphi/epidatr + - text: Get the epipredict R package + href: https://cmu-delphi.github.io/epipredict/ articles: - title: Using the package From 909c983f53b8091c0a3eea0a2719095112a42f80 Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Thu, 30 Nov 2023 13:00:56 -0800 Subject: [PATCH 3/5] Update _pkgdown.yml Co-authored-by: nmdefries <42820733+nmdefries@users.noreply.github.com> --- _pkgdown.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 3d80ebb8..98aa1772 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -15,7 +15,7 @@ home: links: - text: View the Delphi tooling book href: https://cmu-delphi.github.io/delphi-tooling-book/ - - text: Get epidatasets R package + - text: Get the epidatasets R package href: https://cmu-delphi.github.io/epidatasets/ - text: Get the epidatr R package href: https://github.com/cmu-delphi/epidatr From 6007722d5d8bd43f37c6da3a04507a034361790c Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Wed, 3 Jan 2024 19:13:41 -0800 Subject: [PATCH 4/5] docs: mirror epidatr development doc --- DEVELOPMENT.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 DEVELOPMENT.md diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 00000000..a344b78e --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,59 @@ +## Setting up the development environment + +```r +install.packages(c('devtools', 'pkgdown', 'styler', 'lintr')) # install dev dependencies +devtools::install_deps(dependencies = TRUE) # install package dependencies +devtools::document() # generate package meta data and man files +devtools::build() # build package +``` + +## Validating the package + +```r +styler::style_pkg() # format code +lintr::lint_package() # lint code + +devtools::test() # test package +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. + +The documentation site can be previewed locally by running in R + +```r +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`. + +You can also build the docs manually and launch the site with python. From the terminal, this looks like +```bash +R -e 'devtools::document()' +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`. + +The documentation website is updated on push or pull request to the `main` and `dev` branches. + +## Release process + +### Manual + +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 302a0ef266fc5c87a4fee1b89806837232165994 Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Wed, 3 Jan 2024 19:17:04 -0800 Subject: [PATCH 5/5] docs: minor nit --- NEWS.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index f303b073..5b338b47 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,4 @@ - -# epiprocess 0.7.0.9999 +# epiprocess 0.7.0.9000 ## Improvements