Skip to content

Commit a5eebef

Browse files
authored
Merge branch 'dev' into ndefries/flusurv-new-columns
2 parents 16721b4 + 28c48e6 commit a5eebef

File tree

92 files changed

+3365
-1241
lines changed

Some content is hidden

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

92 files changed

+3365
-1241
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@
2323
^README\.Rmd$
2424
^CRAN-SUBMISSION$
2525
^LICENSE\.md$
26+
^revdep$

.bumpversion.cfg

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @dshemetov @brookslogan @dsweber2
1+
* @dshemetov @brookslogan @dsweber2 @nmdefries

.github/pull_request_template.md

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

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,26 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
config:
22+
# Mac latest release
2223
- { os: macos-latest, r: "release" }
24+
# Oldest R version we claim to support
25+
- { os: macos-latest, r: "3.5" }
2326

27+
# Windows latest release
2428
- { os: windows-latest, r: "release" }
25-
# Use 3.6 to trigger usage of RTools35
26-
- { os: windows-latest, r: "3.6" }
29+
# Use 3.5 to trigger usage of RTools35
30+
- { os: windows-latest, r: "3.5" }
2731
# use 4.1 to check with rtools40's older compiler
2832
- { os: windows-latest, r: "4.1" }
2933

34+
# Ubuntu latest release
3035
- { os: ubuntu-latest, r: "devel", http-user-agent: "release" }
3136
- { os: ubuntu-latest, r: "release" }
3237
- { os: ubuntu-latest, r: "oldrel-1" }
3338
- { os: ubuntu-latest, r: "oldrel-2" }
3439
- { os: ubuntu-latest, r: "oldrel-3" }
3540
- { os: ubuntu-latest, r: "oldrel-4" }
36-
# The oldest version of R we claim to support
41+
# Oldest R version we claim to support
3742
- { os: ubuntu-latest, r: "3.5" }
3843

3944
env:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [main, dev]
66
pull_request:
77
branches: [main, dev]
8+
workflow_dispatch:
89

910
name: R-CMD-check
1011

.github/workflows/document.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
5-
paths: ["R/**"]
5+
paths: ["R/**", "README.Rmd"]
6+
workflow_dispatch:
67

78
name: Document
89

@@ -26,17 +27,25 @@ jobs:
2627
- name: Install dependencies
2728
uses: r-lib/actions/setup-r-dependencies@v2
2829
with:
29-
extra-packages: any::roxygen2
30-
needs: roxygen2
30+
extra-packages: |
31+
any::devtools
32+
any::roxygen2
33+
needs: |
34+
devtools
35+
roxygen2
3136
3237
- name: Document
3338
run: roxygen2::roxygenise()
3439
shell: Rscript {0}
3540

41+
- name: Build README.md from README.Rmd
42+
run: Rscript -e 'devtools::build_readme()'
43+
3644
- name: Commit and push changes
3745
run: |
3846
git config --local user.name "$GITHUB_ACTOR"
3947
git config --local user.email "[email protected]"
48+
git add README.md
4049
git add man/\* NAMESPACE DESCRIPTION
4150
git commit -m "docs: document (GHA)" || echo "No changes to commit"
4251
git pull --rebase

.github/workflows/lint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [main, dev]
66
pull_request:
77
branches: [main, dev]
8+
workflow_dispatch:
89

910
name: lint
1011

.github/workflows/pkgdown.yaml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# update the documentation web site on pushes to `dev` branch.
66
on:
77
push:
8-
branches: [main]
8+
branches: [main, dev]
99
pull_request:
10-
branches: [main]
10+
branches: [main, dev]
1111
release:
1212
types: [published]
1313
workflow_dispatch:
@@ -16,16 +16,17 @@ name: pkgdown
1616

1717
jobs:
1818
pkgdown:
19+
# only build docs on the main repository and not forks
1920
if: github.repository_owner == 'cmu-delphi'
2021
runs-on: ubuntu-latest
2122
# Only restrict concurrency for non-PR jobs
2223
concurrency:
2324
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
2425
env:
2526
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
26-
DELPHI_EPIDATA_KEY: ${{ secrets.DELPHI_GITHUB_ACTIONS_EPIDATA_API_KEY }}
27+
DELPHI_EPIDATA_KEY: ${{ secrets.SECRET_EPIDATR_GHACTIONS_DELPHI_EPIDATA_KEY }}
2728
steps:
28-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
2930

3031
- uses: r-lib/actions/setup-pandoc@v2
3132

@@ -35,18 +36,36 @@ jobs:
3536

3637
- uses: r-lib/actions/setup-r-dependencies@v2
3738
with:
38-
extra-packages: any::pkgdown, local::.
39+
extra-packages: any::pkgdown, local::., any::cli
3940
needs: website
4041

4142
- name: Build site
42-
env:
43-
DELPHI_EPIDATA_KEY: ${{ secrets.SECRET_EPIDATR_GHACTIONS_DELPHI_EPIDATA_KEY }}
44-
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
43+
# - target_ref gets the ref from a different variable, depending on the event
44+
# - override allows us to set the pkgdown mode and version_label
45+
# - mode: release is the standard build mode, devel places the site in /dev
46+
# - version_label: 'light' and 'success' are CSS labels for Bootswatch: Cosmo
47+
# https://bootswatch.com/cosmo/
48+
# - we use pkgdown:::build_github_pages to build the site because of an issue in pkgdown
49+
# https://github.com/r-lib/pkgdown/issues/2257
50+
run: |
51+
target_ref <- "${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}"
52+
override <- if (target_ref == "main" || target_ref == "refs/heads/main") {
53+
list(development = list(mode = "release"))
54+
} else if (target_ref == "dev" || target_ref == "refs/heads/dev") {
55+
list(development = list(mode = "devel"))
56+
} else {
57+
stop("Unexpected target_ref: ", target_ref)
58+
}
59+
pkg <- pkgdown::as_pkgdown(".", override = override)
60+
cli::cli_rule("Cleaning files from old site...")
61+
pkgdown::clean_site(pkg)
62+
pkgdown::build_site(pkg, preview = FALSE, install = FALSE, new_process = FALSE)
63+
pkgdown:::build_github_pages(pkg)
4564
shell: Rscript {0}
4665

4766
- name: Deploy to GitHub pages 🚀
4867
if: github.event_name != 'pull_request'
49-
uses: JamesIves/github-pages-deploy-action@v4.4.1
68+
uses: JamesIves/github-pages-deploy-action@v4.5.0
5069
with:
5170
clean: false
5271
branch: gh-pages

.github/workflows/style.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
"**.[rR]nw",
1111
"**.[rR]profile",
1212
]
13+
workflow_dispatch:
1314

1415
name: Style
1516

0 commit comments

Comments
 (0)