Skip to content

Commit e40d02a

Browse files
authored
Merge pull request #383 from cmu-delphi/lcb/update-actions-and-pkgdown
Update pkgdown actions based on branch reorganization
2 parents b444a3c + 302a0ef commit e40d02a

File tree

5 files changed

+142
-80
lines changed

5 files changed

+142
-80
lines changed

.github/workflows/R-CMD-check.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# Created with usethis + edited to run on PRs to dev, use API key.
55
on:
66
push:
7-
branches: [main, master]
7+
branches: [main, dev]
88
pull_request:
9-
branches: [main, master, dev]
9+
branches: [main, dev]
1010

1111
name: R-CMD-check
1212

.github/workflows/pkgdown.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# Created with usethis + edited to run on PRs to dev, use API key.
55
on:
66
push:
7-
branches: [main, master]
7+
branches: [main, dev]
88
pull_request:
9-
branches: [main, master, dev]
9+
branches: [main, dev]
1010
release:
1111
types: [published]
1212
workflow_dispatch:

DEVELOPMENT.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
## Setting up the development environment
2+
3+
```r
4+
install.packages(c('devtools', 'pkgdown', 'styler', 'lintr')) # install dev dependencies
5+
devtools::install_deps(dependencies = TRUE) # install package dependencies
6+
devtools::document() # generate package meta data and man files
7+
devtools::build() # build package
8+
```
9+
10+
## Validating the package
11+
12+
```r
13+
styler::style_pkg() # format code
14+
lintr::lint_package() # lint code
15+
16+
devtools::test() # test package
17+
devtools::check() # check package for errors
18+
```
19+
20+
## Developing the documentation site
21+
22+
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.
23+
24+
The documentation site can be previewed locally by running in R
25+
26+
```r
27+
pkgdown::build_site(preview=TRUE)
28+
```
29+
30+
The `main` version is available at `file:///<local path>/epidatr/docs/index.html` and `dev` at `file:///<local path>/epidatr/docs/dev/index.html`.
31+
32+
You can also build the docs manually and launch the site with python. From the terminal, this looks like
33+
```bash
34+
R -e 'devtools::document()'
35+
python -m http.server -d docs
36+
```
37+
38+
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`.
39+
40+
The documentation website is updated on push or pull request to the `main` and `dev` branches.
41+
42+
## Release process
43+
44+
### Manual
45+
46+
TBD
47+
48+
### Automated (currently unavailable)
49+
50+
The release consists of multiple steps which can be all done via the GitHub website:
51+
52+
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.
53+
2. The action will prepare a new release and will end up with a new [Pull Request](https://github.com/cmu-delphi/epidatr/pulls)
54+
3. Let the code owner review the PR and its changes and let the CI check whether everything builds successfully
55+
4. Once approved and merged, another GitHub action job starts which automatically will
56+
1. create a git tag
57+
2. create another [Pull Request](https://github.com/cmu-delphi/epidatr/pulls) to merge the changes back to the `dev` branch
58+
3. create a [GitHub release](https://github.com/cmu-delphi/epidatr/releases) with automatically derived release notes
59+
5. Release to CRAN

NEWS.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
# epiprocess 0.7.0.9999
1+
# epiprocess 0.7.0.9000
32

43
## Improvements
54

_pkgdown.yml

+78-74
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,90 @@
11
template:
2-
bootstrap: 5
3-
bootswatch: cosmo
4-
bslib:
5-
font_scale: 1.0
6-
primary: '#C41230'
7-
link-color: '#C41230'
8-
navbar-bg: '#C41230'
9-
navbar-fg: '#f8f8f8'
2+
bootstrap: 5
103

4+
development:
5+
mode: auto
6+
7+
# Colors from epipredict & epidatr, including Carnegie Red https://www.cmu.edu/brand/brand-guidelines/visual-identity/colors.html
118
navbar:
12-
bg: '#C41230'
13-
fg: '#f8f8f8'
14-
9+
bg: "#C41230"
10+
fg: "#f8f8f8"
11+
bootswatch: cosmo
12+
bslib:
13+
font_scale: 1.0
14+
primary: "#C41230"
15+
link-color: "#C41230"
16+
navbar-bg: "#C41230"
17+
navbar-fg: "#f8f8f8"
18+
1519
url: https://cmu-delphi.github.io/epiprocess/
1620

1721
home:
18-
links:
19-
- text: Introduction to Delphi's Tooling Work
20-
href: https://cmu-delphi.github.io/delphi-tooling-book/
21-
- text: Get the epipredict R package
22-
href: https://cmu-delphi.github.io/epipredict/
23-
- text: Get the epidatr R package
24-
href: https://github.com/cmu-delphi/epidatr
22+
links:
23+
- text: Introduction to Delphi's Tooling Work
24+
href: https://cmu-delphi.github.io/delphi-tooling-book/
25+
- text: Get the epipredict R package
26+
href: https://cmu-delphi.github.io/epipredict/
27+
- text: Get the epidatr R package
28+
href: https://github.com/cmu-delphi/epidatr
29+
- text: Get the epidatasets R package
30+
href: https://cmu-delphi.github.io/epidatasets/
2531

2632
articles:
27-
- title: Using the package
28-
desc: Basic usage and examples.
29-
navbar: ~
30-
contents:
31-
- epiprocess
32-
- slide
33-
- growth_rate
34-
- correlation
35-
- aggregation
36-
- outliers
37-
- archive
38-
- advanced
39-
- compactify
33+
- title: Using the package
34+
desc: Basic usage and examples.
35+
navbar: ~
36+
contents:
37+
- epiprocess
38+
- slide
39+
- growth_rate
40+
- correlation
41+
- aggregation
42+
- outliers
43+
- archive
44+
- advanced
45+
- compactify
4046

4147
repo:
42-
url:
43-
home: https://github.com/cmu-delphi/epiprocess/tree/main/
44-
source: https://github.com/cmu-delphi/epiprocess/blob/main/
45-
issue: https://github.com/cmu-delphi/epiprocess/issues
46-
user: https://github.com/
47-
48+
url:
49+
home: https://github.com/cmu-delphi/epiprocess/tree/main/
50+
source: https://github.com/cmu-delphi/epiprocess/blob/main/
51+
issue: https://github.com/cmu-delphi/epiprocess/issues
52+
user: https://github.com/
4853

4954
reference:
50-
- title: "`epi_df` basics"
51-
desc: Details on `epi_df` format, and basic functionality.
52-
- contents:
53-
- matches("epi_df")
54-
- title: "`epi_*()` functions"
55-
desc: Functions that act on `epi_df` objects.
56-
- contents:
57-
- epi_slide
58-
- epi_cor
59-
- title: Vector functions
60-
desc: Functions that act directly on signal variables.
61-
- contents:
62-
- growth_rate
63-
- detect_outlr
64-
- detect_outlr_rm
65-
- detect_outlr_stl
66-
- title: "`epi_archive` basics"
67-
desc: Details on `epi_archive`, and basic functionality.
68-
- contents:
69-
- matches("archive")
70-
- title: "`epix_*()` functions"
71-
desc: Functions that act on an `epi_archive` and/or `grouped_epi_archive` object.
72-
- contents:
73-
- starts_with("epix")
74-
- group_by.epi_archive
75-
- title: Example data
76-
- contents:
77-
- archive_cases_dv_subset
78-
- incidence_num_outlier_example
79-
- contains("jhu_csse")
80-
- title: internal
81-
contents:
82-
- epiprocess
83-
- max_version_with_row_in
84-
- next_after
85-
- guess_period
86-
55+
- title: "`epi_df` basics"
56+
desc: Details on `epi_df` format, and basic functionality.
57+
- contents:
58+
- matches("epi_df")
59+
- title: "`epi_*()` functions"
60+
desc: Functions that act on `epi_df` objects.
61+
- contents:
62+
- epi_slide
63+
- epi_cor
64+
- title: Vector functions
65+
desc: Functions that act directly on signal variables.
66+
- contents:
67+
- growth_rate
68+
- detect_outlr
69+
- detect_outlr_rm
70+
- detect_outlr_stl
71+
- title: "`epi_archive` basics"
72+
desc: Details on `epi_archive`, and basic functionality.
73+
- contents:
74+
- matches("archive")
75+
- title: "`epix_*()` functions"
76+
desc: Functions that act on an `epi_archive` and/or `grouped_epi_archive` object.
77+
- contents:
78+
- starts_with("epix")
79+
- group_by.epi_archive
80+
- title: Example data
81+
- contents:
82+
- archive_cases_dv_subset
83+
- incidence_num_outlier_example
84+
- contains("jhu_csse")
85+
- title: internal
86+
contents:
87+
- epiprocess
88+
- max_version_with_row_in
89+
- next_after
90+
- guess_period

0 commit comments

Comments
 (0)