Skip to content

Commit

Permalink
Merge branch 'main' into gvegayon/documentation/58-ci-for-rendering-q…
Browse files Browse the repository at this point in the history
…uarto-files
  • Loading branch information
gvegayon authored Apr 4, 2024
2 parents d434cc9 + ca96421 commit 72d5bad
Show file tree
Hide file tree
Showing 31 changed files with 1,385 additions and 395 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/test_model.yaml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/test_model.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: model

on:
pull_request:
push:
branches: [main]

jobs:
install-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: cache poetry
uses: actions/cache@v4
with:
path: ~/.local
key: ${{ runner.os }}-poetry
- name: install poetry
run: pip install poetry

- name: install package
run: poetry install -C model

- name: install pytest-cov
run: poetry run -C model pip install pytest-cov

- name: run tests
run: |
poetry run -C model pytest \
--cov=pyrenew --cov-report term --cov-report xml model
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
file: coverage.xml
plugin: pycoverage
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
2 changes: 1 addition & 1 deletion .github/workflows/test_pipeline.yaml → .github/workflows/test_pipeline.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: installation and testing pipeline
name: pipeline

on:
pull_request:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/sphinx.yaml → .github/workflows/website.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: "Sphinx: Render docs"
name: website

on: push
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [published]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand Down Expand Up @@ -44,6 +50,8 @@ jobs:

deploy:
# Deploy to the github-pages environment
# but not on PRs
if: ${{ github.event_name != 'pull_request' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

⚠️ This is a work in progress ⚠️

[![Pre-commit](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/pre-commit.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/pre-commit.yaml)
[![installation and testing model](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/test_model.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/test_model.yaml)
[![installation and testing pipeline](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/test_pipeline.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/test_pipeline.yaml)
[![Docs: model](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/sphinx.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/sphinx.yaml)
[![Pre-commit](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/pre-commit.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/pre-commit
[![installation and testing model](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/model.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/model.yaml)
[![installation and testing pipeline](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/pipeline.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/pipeline.yaml)
[![Docs: model](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/website.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/website.yaml)
[![codecov (model)](https://codecov.io/gh/CDCgov/multisignal-epi-inference/graph/badge.svg?token=7Z06HOMYR1)](https://codecov.io/gh/CDCgov/multisignal-epi-inference)
[![Quarto documents](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/docs.yaml/badge.svg)](https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/docs.yaml)


This repo hosts the multisignal (*a.k.a.* signal fusion) renewal project: an internal forecasting model that leverages multiple data sources for enhancing epidemiological modeling of infectious disease outbreaks.

This repository is composed of two parts:
Expand Down
11 changes: 8 additions & 3 deletions model/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ test:
docs: docs/pyrenew_demo.md docs/getting-started.md

docs/pyrenew_demo.md: docs/pyrenew_demo.qmd
quarto render docs/pyrenew_demo.qmd
poetry run quarto render docs/pyrenew_demo.qmd

docs/getting-started.md: docs/getting-started.qmd
quarto render docs/getting-started.qmd
poetry run quarto render docs/getting-started.qmd

.PHONY: install test docs
clean:
rm -rf docs/*_files/
rm -f docs/getting-started.ipynb
rm -f docs/pyrenew_demo.ipynb

.PHONY: install test docs clean
9 changes: 6 additions & 3 deletions model/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# PyRenew
# PyRenew: A Package for Bayesian Renewal Modeling with JAX and Numpyro.

A package for Bayesian renewal modeling with JAX and Numpyro.
`pyrenew` is a flexible tool for simulating and statistical inference of epidemiological models, emphasizing renewal models. Built on top of the [`numpyro`](https://num.pyro.ai/) Python library, `pyrenew` provides core components for model building, including pre-defined models for processing various types of observational processes.

## Installation

Install via pip with

```bash
pip install git+https://github.com/cdcent/cfa-pyrenew.git
```

## Demo
The `docs` folder contains a Jupyter notebook with an interactive demo to get you started. It simulates observed hospitalizations using a simple renewal process model and then fits to it using a No-U-Turn Sampler.

The [`docs`](docs) folder contains quarto documents to get you started. It simulates observed hospitalizations using a simple renewal process model and then fits it using a No-U-Turn Sampler.
1 change: 1 addition & 0 deletions model/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
!*png
*_files/libs
Loading

0 comments on commit 72d5bad

Please sign in to comment.