Skip to content

Commit 56d927a

Browse files
authored
Merge pull request #391 from cmu-delphi/dev
Sync main with dev, epiprocess 0.9.0
2 parents d46e0c5 + aa41827 commit 56d927a

File tree

213 files changed

+10670
-2914
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+10670
-2914
lines changed

.Rbuildignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
^epipredict\.Rproj$
44
^\.Rproj\.user$
55
^LICENSE\.md$
6+
^DEVELOPMENT\.md$
67
^drafts$
78
^\.Rprofile$
89
^man-roxygen$
@@ -15,5 +16,8 @@
1516
^data-raw$
1617
^vignettes/articles$
1718
^.git-blame-ignore-revs$
19+
^DEVELOPMENT\.md$
1820
^doc$
1921
^Meta$
22+
^.lintr$
23+
^.venv$

.github/pull_request_template.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
### Checklist
2+
3+
Please:
4+
5+
- [ ] Make sure this PR is against "dev", not "main".
6+
- [ ] Request a review from one of the current epipredict main reviewers:
7+
dajmcdon.
8+
- [ ] Make sure to bump the version number in `DESCRIPTION` and `NEWS.md`.
9+
Always increment the patch version number (the third number), unless you are
10+
making a release PR from dev to main, in which case increment the minor
11+
version number (the second number).
12+
- [ ] Describe changes made in NEWS.md, making sure breaking changes
13+
(backwards-incompatible changes to the documented interface) are noted.
14+
Collect the changes under the next release number (e.g. if you are on
15+
0.7.2, then write your changes under the 0.8 heading).
16+
- [ ] Consider pinning the `epiprocess` version in the `DESCRIPTION` file if
17+
- You anticipate breaking changes in `epiprocess` soon
18+
- You want to co-develop features in `epipredict` and `epiprocess`
19+
20+
### Change explanations for reviewer
21+
22+
### Magic GitHub syntax to mark associated Issue(s) as resolved when this is merged into the default branch
23+
24+
- Resolves #{issue number}

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

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

1111
name: R-CMD-check
1212

.github/workflows/pkgdown.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
#
4-
# Created with usethis + edited to use API key.
4+
# 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
release:
99
types: [published]
1010
workflow_dispatch:
@@ -13,14 +13,16 @@ name: pkgdown
1313

1414
jobs:
1515
pkgdown:
16+
# only build docs on the main repository and not forks
17+
if: github.repository_owner == 'cmu-delphi'
1618
runs-on: ubuntu-latest
1719
# Only restrict concurrency for non-PR jobs
1820
concurrency:
1921
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
2022
env:
2123
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2224
steps:
23-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
2426

2527
- uses: r-lib/actions/setup-pandoc@v2
2628

@@ -35,13 +37,19 @@ jobs:
3537

3638
- name: Build site
3739
env:
38-
DELPHI_EPIDATA_KEY: ${{ secrets.SECRET_EPIPREDICT_GHACTIONS_DELPHI_EPIDATA_KEY }}
39-
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
40+
DELPHI_EPIDATA_KEY: ${{ secrets.SECRET_EPIPROCESS_GHACTIONS_DELPHI_EPIDATA_KEY }}
41+
run: |
42+
if (startsWith("${{ github.event_name }}", "pull_request")) {
43+
mode <- ifelse("${{ github.base_ref }}" == "main", "release", "devel")
44+
} else {
45+
mode <- ifelse("${{ github.ref_name }}" == "main", "release", "devel")
46+
}
47+
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, override=list(PKGDOWN_DEV_MODE=mode))
4048
shell: Rscript {0}
4149

4250
- name: Deploy to GitHub pages 🚀
4351
if: github.event_name != 'pull_request'
44-
uses: JamesIves/[email protected].4
52+
uses: JamesIves/github-pages-deploy-action@v4.4.1
4553
with:
4654
clean: false
4755
branch: gh-pages

.lintr

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
linters: linters_with_defaults(
2+
line_length_linter(120),
3+
cyclocomp_linter = NULL,
4+
object_length_linter(length = 40L)
5+
)
6+
exclusions: list(
7+
"renv",
8+
"venv"
9+
)

DESCRIPTION

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
Package: epipredict
22
Title: Basic epidemiology forecasting methods
3-
Version: 0.0.8
3+
Version: 0.1.0
44
Authors@R: c(
5-
person("Daniel", "McDonald", , "[email protected]", role = c("aut", "cre")),
5+
person("Daniel J.", "McDonald", , "[email protected]", role = c("aut", "cre")),
66
person("Ryan", "Tibshirani", , "[email protected]", role = "aut"),
7+
person("Dmitry", "Shemetov", email = "[email protected]", role = "aut"),
8+
person("David", "Weber", email = "[email protected]", role = "aut"),
9+
person("CMU's Delphi Research Group", role = c("cph", "fnd")),
710
person("Logan", "Brooks", role = "aut"),
811
person("Rachel", "Lobay", role = "aut"),
9-
person("Dmitry", "Shemetov", email = "[email protected]", role = "ctb"),
10-
person("David", "Weber", email = "[email protected]", role = "ctb"),
1112
person("Maggie", "Liu", role = "ctb"),
1213
person("Ken", "Mawer", role = "ctb"),
1314
person("Chloe", "You", role = "ctb"),
@@ -23,43 +24,46 @@ URL: https://github.com/cmu-delphi/epipredict/,
2324
https://cmu-delphi.github.io/epipredict
2425
BugReports: https://github.com/cmu-delphi/epipredict/issues/
2526
Depends:
26-
epiprocess (>= 0.6.0),
27+
epiprocess (>= 0.9.0),
2728
parsnip (>= 1.0.0),
2829
R (>= 3.5.0)
2930
Imports:
31+
checkmate,
3032
cli,
3133
distributional,
3234
dplyr,
33-
fs,
3435
generics,
36+
ggplot2,
3537
glue,
3638
hardhat (>= 1.3.0),
3739
lifecycle,
3840
magrittr,
39-
methods,
40-
quantreg,
4141
recipes (>= 1.0.4),
42-
rlang,
43-
smoothqr,
42+
rlang (>= 1.1.0),
4443
stats,
4544
tibble,
4645
tidyr,
4746
tidyselect,
48-
usethis,
47+
tsibble,
4948
vctrs,
5049
workflows (>= 1.0.0)
5150
Suggests:
5251
covidcast,
5352
data.table,
5453
epidatr (>= 1.0.0),
55-
ggplot2,
54+
fs,
55+
grf,
5656
knitr,
5757
lubridate,
5858
poissonreg,
59+
purrr,
60+
quantreg,
5961
ranger,
6062
RcppRoll,
6163
rmarkdown,
64+
smoothqr,
6265
testthat (>= 3.0.0),
66+
usethis,
6367
xgboost
6468
VignetteBuilder:
6569
knitr
@@ -71,4 +75,4 @@ Config/testthat/edition: 3
7175
Encoding: UTF-8
7276
LazyData: true
7377
Roxygen: list(markdown = TRUE)
74-
RoxygenNote: 7.3.0
78+
RoxygenNote: 7.3.2

DEVELOPMENT.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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/epipredict/) is built off of the `main` branch. The `dev` version of the site is available at https://cmu-delphi.github.io/epipredict/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/epipredict/index.html` and `dev` at `file:///<local path>/epipredict/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+
34+
```bash
35+
R -e 'devtools::document()'
36+
python -m http.server -d docs
37+
```
38+
39+
## Versioning
40+
41+
Please follow the guidelines in the [PR template document](.github/pull_request_template.md).
42+
43+
## Release process
44+
45+
TBD

0 commit comments

Comments
 (0)