This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quasi-fork of all contents from
wwinference
package (#3)
- Loading branch information
1 parent
9949dae
commit 34d7d8e
Showing
120 changed files
with
7,894 additions
and
411 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
^_pkgdown\.yml$ | ||
^docs$ | ||
^pkgdown$ | ||
^\.github$ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*@kaitejohnson @dylanhmorris |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Contributing to `wwinference` | ||
|
||
This outlines how to propose a change to `wwinference`. | ||
|
||
## Fixing typos | ||
|
||
You can fix typos, spelling mistakes, or grammatical errors in the documentation directly using the GitHub web interface, as long as the changes are made in the _source_ file. | ||
This generally means you'll need to edit [roxygen2 comments](https://roxygen2.r-lib.org/articles/roxygen2.html) in an `.R`, not a `.Rd` file. | ||
You can find the `.R` file that generates the `.Rd` by reading the comment in the first line. | ||
|
||
## Bigger changes | ||
|
||
If you want to make a bigger change, it's a good idea to first file an issue and make sure someone from the team agrees that it’s needed. | ||
If you’ve found a bug, please file an issue that illustrates the bug with a minimal | ||
[reprex](https://www.tidyverse.org/help/#reprex) (this will also help you write a unit test, if needed). | ||
See our guide on [how to create a great issue](https://code-review.tidyverse.org/issues/) for more advice. | ||
|
||
### Pull request process | ||
|
||
* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("CDCgov/ww-inference-model", fork = TRUE)`. | ||
|
||
* Install all development dependencies with `devtools::install_dev_deps()`, and then make sure the package passes R CMD check by running `devtools::check()`. | ||
If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing. | ||
* Create a Git branch for your pull request (PR). We recommend using `usethis::pr_init("brief-description-of-change")`. | ||
|
||
* Make your changes, commit to git, and then create a PR by running `usethis::pr_push()`, and following the prompts in your browser. | ||
The title of your PR should briefly describe the change. | ||
The body of your PR should contain `Fixes #issue-number`. | ||
|
||
* For user-facing changes, add a bullet to the top of `NEWS.md` (i.e. just below the first header). Follow the style described in <https://style.tidyverse.org/news.html>. | ||
|
||
### Code style | ||
|
||
* New code should follow the tidyverse [style guide](https://style.tidyverse.org). | ||
You can use the [styler](https://CRAN.R-project.org/package=styler) package to apply these styles, but please don't restyle code that has nothing to do with your PR. | ||
|
||
* We use [roxygen2](https://cran.r-project.org/package=roxygen2), with [Markdown syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/rd-formatting.html), for documentation. | ||
|
||
* We use [testthat](https://cran.r-project.org/package=testthat) for unit tests. | ||
Contributions with test cases included are easier to accept. | ||
|
||
## Code of Conduct | ||
|
||
Please note that the RtGam project is released with a | ||
[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this | ||
project you agree to abide by its terms. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Scientific improvement | ||
about: Suggest a way to improve an existing tool or pipeline | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Describe the improvement that needs to be made | ||
(e.g. update a parameter estimate, tweak the prior, modify the model) | ||
|
||
## Provide links to references to methods or data sources | ||
|
||
## Describe the changes expected to the model's outputs | ||
|
||
## Suggest new tests that will need to be implemented |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Getting help with wwinference | ||
|
||
Thanks for using wwinference! | ||
Before filing an issue, there are a few places to explore and pieces to put together to make the process as smooth as possible. | ||
|
||
## Make a reprex | ||
|
||
Start by making a minimal **repr**oducible **ex**ample using the [reprex](https://reprex.tidyverse.org/) package. | ||
If you haven't heard of or used reprex before, you're in for a treat! | ||
Seriously, reprex will make all of your R-question-asking endeavors easier (which is a pretty insane ROI for the five to ten minutes it'll take you to learn what it's all about). | ||
For additional reprex pointers, check out the [Get help!](https://www.tidyverse.org/help/) section of the tidyverse site. | ||
|
||
## Where to ask? | ||
|
||
[File an issue](https://github.com/CDCgov/ww-inference-model/issues/new)! | ||
|
||
Before opening a new issue, be sure to [search issues and pull requests](https://github.com/CDCgov/ww-inference-model/issues) to make sure the bug hasn't been reported and/or already fixed in the development version. | ||
By default, the search will be pre-populated with `is:issue is:open`. | ||
You can [edit the qualifiers](https://help.github.com/articles/searching-issues-and-pull-requests/) (e.g. `is:pr`, `is:closed`) as needed. | ||
For example, you'd simply remove `is:open` to search _all_ issues in the repo, open or closed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
push: | ||
branches: [main, prod] | ||
pull_request: | ||
branches: [main, prod] | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
name: pkgdown | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
# Only restrict concurrency for non-PR jobs | ||
concurrency: | ||
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
permissions: | ||
contents: write | ||
id-token: write | ||
pages: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
with: | ||
pandoc-version: "2.19.2" | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: "release" | ||
use-public-rspm: true | ||
install-r: false | ||
extra-repositories: "https://mc-stan.org/r-packages/" | ||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
pak-version: rc | ||
extra-packages: any::pkgdown local::. | ||
needs: website | ||
|
||
- name: "Install cmdstan via cmdstanr" | ||
uses: epinowcast/actions/install-cmdstan@v1 | ||
with: | ||
cmdstan-version: "latest" | ||
|
||
- name: Build site | ||
run: "pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)" | ||
shell: Rscript {0} | ||
|
||
- name: Upload artifact for GH pages deployment | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: "docs/" | ||
|
||
deploy: | ||
# check builds on PRs but only deploy when main changes | ||
if: ${{ github.event_name != 'pull_request' }} | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Deploy to GitHub pages | ||
uses: actions/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cache/R/renv | ||
key: r-precommit-cache|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
- uses: pre-commit/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: R CMD check project packages | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main, prod] | ||
|
||
jobs: | ||
check-package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: "release" | ||
use-public-rspm: true | ||
extra-repositories: "https://mc-stan.org/r-packages/" | ||
- name: "Set up dependencies for wwinference" | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
needs: check | ||
- name: "Install cmdstan via cmdstanr" | ||
uses: epinowcast/actions/install-cmdstan@v1 | ||
with: | ||
cmdstan-version: "latest" | ||
- name: "Check wwinference package" | ||
uses: r-lib/actions/check-r-package@v2 |
Oops, something went wrong.