Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Quasi-fork of all contents from wwinference package (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitejohnson authored Jul 13, 2024
1 parent 9949dae commit 34d7d8e
Show file tree
Hide file tree
Showing 120 changed files with 7,894 additions and 411 deletions.
6 changes: 6 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.github$
^.*\.Rproj$
^\.Rproj\.user$
13 changes: 0 additions & 13 deletions .gitattributes

This file was deleted.

1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*@kaitejohnson @dylanhmorris
46 changes: 46 additions & 0 deletions .github/CONTRIBUTING.md
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.
8 changes: 1 addition & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ assignees: ''
---

**Describe the bug**
A clear and concise description of what feature is not working.

**Impact**
Please describe the impact this bug is causing to your program or organization.
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
Expand All @@ -26,9 +23,6 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.

**Logs**
If applicable, please attach logs to help describe your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
Expand Down
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/scientific-improvement.md
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
20 changes: 20 additions & 0 deletions .github/SUPPORT.md
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.
74 changes: 74 additions & 0 deletions .github/workflows/pkgdown.yaml
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]
21 changes: 21 additions & 0 deletions .github/workflows/pre-commit.yaml
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]
28 changes: 28 additions & 0 deletions .github/workflows/r-cmd-check.yaml
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
Loading

0 comments on commit 34d7d8e

Please sign in to comment.