Skip to content

Commit

Permalink
Rename instances of Multisignal Renewal to PyRenew (#399)
Browse files Browse the repository at this point in the history
* rename all instances of multisignal-epi-inference to PyRenew

* one more change

* add deptry config to pyrpoject.toml

* remove args from deptry action
  • Loading branch information
damonbayer authored Aug 20, 2024
1 parent df621e0 commit f891cb7
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deptry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:

- name: run deptry
run: |
poetry run deptry . --per-rule-ignores "DEP001=pyrenew,DEP001=pytest,DEP003=pytest,DEP001=test"
poetry run deptry .
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:24.04

LABEL org.opencontainers.image.description="Image of PyRenew python package"
LABEL org.opencontainers.image.source="https://github.com/CDCgov/multisignal-epi-inference"
LABEL org.opencontainers.image.source="https://github.com/CDCgov/PyRenew"
LABEL org.opencontainers.image.authors="CDC's Center for Forecasting Analytics"
LABEL org.opencontainers.image.license="Apache-2.0"

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

⚠️ This is a work in progress ⚠️

`pyrenew` is a flexible tool for simulation 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. To start, visit the tutorials section on the project's website [here](https://cdcgov.github.io/multisignal-epi-inference/tutorials/index.html).
`pyrenew` is a flexible tool for simulation 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. To start, visit the tutorials section on the project's website [here](https://cdcgov.github.io/PyRenew/tutorials/index.html).

The following diagram illustrates the composition of the `HospitalAdmissionsModel` class. Notably, all components are modular and can be replaced with custom implementations.

Expand Down Expand Up @@ -43,7 +43,7 @@ flowchart LR
Install via pip with

```bash
pip install git+https://github.com/CDCgov/multisignal-epi-inference@main
pip install git+https://github.com/CDCgov/PyRenew@main
```

## Container image
Expand All @@ -56,8 +56,8 @@ docker pull ghcr.io/CDCgov/pyrenew:latest

## Resources

* [The MSR Website](https://cdcgov.github.io/multisignal-epi-inference/tutorials/index.html) provides general documentation and tutorials on using MSR.
* [The Model Equations Sheet](https://github.com/CDCgov/multisignal-epi-inference/blob/main/equations.md) describe the mathematics of the renewal processes and models MSR supports.
* [The MSR Website](https://cdcgov.github.io/PyRenew/tutorials/index.html) provides general documentation and tutorials on using MSR.
* [The Model Equations Sheet](https://github.com/CDCgov/PyRenew/blob/main/equations.md) describe the mathematics of the renewal processes and models MSR supports.
* Additional reading on renewal processes in epidemiology
* [_Semi-mechanistic Bayesian modelling of COVID-19 with renewal processes_](https://academic.oup.com/jrsssa/article-pdf/186/4/601/54770289/qnad030.pdf)
* [_Unifying incidence and prevalence under a time-varying general branching process_](https://link.springer.com/content/pdf/10.1007/s00285-023-01958-w.pdf)
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Sphinx website source code

The files under this folder contain the source code for the project's Sphinx website. The website is automatically built and published by GitHub Actions. The website is hosted at <https://cdcgov.github.io/multisignal-epi-inference/>.
The files under this folder contain the source code for the project's Sphinx website. The website is automatically built and published by GitHub Actions. The website is hosted at <https://cdcgov.github.io/PyRenew/>.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

html_theme = "sphinx_book_theme"
html_theme_options = {
"repository_url": "https://github.com/CDCgov/multisignal-epi-inference",
"repository_url": "https://github.com/CDCgov/PyRenew",
"use_edit_page_button": True,
"use_issues_button": True,
"use_repository_button": True,
Expand Down
8 changes: 4 additions & 4 deletions docs/source/developer_documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Developer Documentation
Github Workflow
---------------

- You should request reviews for pull requests from ``multisignal-epi-inference-devs``, unless you have a good reason to request reviews from a smaller group.
- Reviews from all of ``multisignal-epi-inference-devs`` are encouraged, but an approving review from a `codeowner <https://github.com/CDCgov/multisignal-epi-inference/blob/main/.github/CODEOWNERS>`_ (@dylanhmorris, @damonbayer, or @gvegayon) is required before a pull request can be merged to ``main``.
- You should request reviews for pull requests from ``PyRenew-devs``, unless you have a good reason to request reviews from a smaller group.
- Reviews from all of ``PyRenew-devs`` are encouraged, but an approving review from a `codeowner <https://github.com/CDCgov/PyRenew/blob/main/.github/CODEOWNERS>`_ (@dylanhmorris, @damonbayer, or @gvegayon) is required before a pull request can be merged to ``main``.
- For CDC contributors, If your pull request has not received a review at the time of the next standup, use standup to find a reviewer.
- External contributors should expect to receive a review within a few days of creating a pull request.
- If you create a draft pull request, indicate what, if anything, about the current pull request should be reviewed.
Expand Down Expand Up @@ -67,7 +67,7 @@ This entry tells Sphinx to generate documentation for the ``HospitalAdmissions``
New tutorials
~~~~~~~~~~~~~

``PyRenew`` tutorials are `quarto documents <https://quarto.org>`__ located under `./docs/source/tutorials <https://github.com/CDCgov/multisignal-epi-inference/tree/main/docs/source/tutorials>`__. Tutorials are automatically rendered using GitHub actions (see the Workflow file `here <https://github.com/CDCgov/multisignal-epi-inference/actions/workflows/website.yaml>`__).
``PyRenew`` tutorials are `quarto documents <https://quarto.org>`__ located under `./docs/source/tutorials <https://github.com/CDCgov/PyRenew/tree/main/docs/source/tutorials>`__. Tutorials are automatically rendered using GitHub actions (see the Workflow file `here <https://github.com/CDCgov/PyRenew/actions/workflows/website.yaml>`__).

To make the new tutorial available in the website, developers should follow these steps:

Expand All @@ -82,7 +82,7 @@ To make the new tutorial available in the website, developers should follow thes
getting_started
example_with_datasets
3. Add an rst entry with the same basename as the ``quarto`` file in the ``./docs/source/tutorials`` directory. For instance, the `example_with_datasets.rst` file was added to the repository. This last step can be done running the bash script `./hook_scripts/pre-commit-rst-placeholder.sh <https://github.com/CDCgov/multisignal-epi-inference/blob/main/hook_scripts/pre-commit-rst-placeholder.sh>`__. Note the script should be executed by ``pre-commit``.
3. Add an rst entry with the same basename as the ``quarto`` file in the ``./docs/source/tutorials`` directory. For instance, the `example_with_datasets.rst` file was added to the repository. This last step can be done running the bash script `./hook_scripts/pre-commit-rst-placeholder.sh <https://github.com/CDCgov/PyRenew/blob/main/hook_scripts/pre-commit-rst-placeholder.sh>`__. Note the script should be executed by ``pre-commit``.


Adding new pages
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
.. This `index.rst` file is only a placeholder. Do not edit this file. The final
.. `index.rst` document is automatically generated via GitHub Actions using the
.. root level `README.md` file:
.. https://github.com/CDCgov/multisignal-epi-inference/tree/main/README.md
.. https://github.com/CDCgov/PyRenew/tree/main/README.md
..
.. Any changes made to this file will be discarted during the next build. The
.. GitHub action building this is in:
.. https://github.com/CDCgov/multisignal-epi-inference/tree/main/.github/workflows/website.yaml`
.. https://github.com/CDCgov/PyRenew/tree/main/.github/workflows/website.yaml`
2 changes: 1 addition & 1 deletion docs/source/tutorials/basic_renewal_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.. Please do not edit this file directly.
.. This file is just a placeholder.
.. For the source file, see:
.. <https://github.com/CDCgov/multisignal-epi-inference/tree/main/docs/source/tutorials/basic_renewal_model.qmd>
.. <https://github.com/CDCgov/PyRenew/tree/main/docs/source/tutorials/basic_renewal_model.qmd>
2 changes: 1 addition & 1 deletion docs/source/tutorials/extending_pyrenew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.. Please do not edit this file directly.
.. This file is just a placeholder.
.. For the source file, see:
.. <https://github.com/CDCgov/multisignal-epi-inference/tree/main/docs/source/tutorials/extending_pyrenew.qmd>
.. <https://github.com/CDCgov/PyRenew/tree/main/docs/source/tutorials/extending_pyrenew.qmd>
2 changes: 1 addition & 1 deletion docs/source/tutorials/getting_started.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ poetry install
To install `pyrenew` using pip, run the following command:

```bash
pip install git+https://github.com/CDCgov/multisignal-epi-inference@main
pip install git+https://github.com/CDCgov/PyRenew@main
```


Expand Down
2 changes: 1 addition & 1 deletion docs/source/tutorials/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.. Please do not edit this file directly.
.. This file is just a placeholder.
.. For the source file, see:
.. <https://github.com/CDCgov/multisignal-epi-inference/tree/main/docs/source/tutorials/getting_started.qmd>
.. <https://github.com/CDCgov/PyRenew/tree/main/docs/source/tutorials/getting_started.qmd>
2 changes: 1 addition & 1 deletion docs/source/tutorials/hospital_admissions_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.. Please do not edit this file directly.
.. This file is just a placeholder.
.. For the source file, see:
.. <https://github.com/CDCgov/multisignal-epi-inference/tree/main/docs/source/tutorials/hospital_admissions_model.qmd>
.. <https://github.com/CDCgov/PyRenew/tree/main/docs/source/tutorials/hospital_admissions_model.qmd>
2 changes: 1 addition & 1 deletion docs/source/tutorials/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Tutorials
=========

This section contains tutorials that demonstrate how to use the `pyrenew` package. The source code for the tutorials can be found in the project repository: https://github.com/CDCgov/multisignal-epi-inference/tree/main/docs/source/tutorials.
This section contains tutorials that demonstrate how to use the `pyrenew` package. The source code for the tutorials can be found in the project repository: https://github.com/CDCgov/PyRenew/tree/main/docs/source/tutorials.

.. toctree::
:maxdepth: 2
Expand Down
2 changes: 1 addition & 1 deletion docs/source/tutorials/periodic_effects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.. Please do not edit this file directly.
.. This file is just a placeholder.
.. For the source file, see:
.. <https://github.com/CDCgov/multisignal-epi-inference/tree/main/docs/source/tutorials/periodic_effects.qmd>
.. <https://github.com/CDCgov/PyRenew/tree/main/docs/source/tutorials/periodic_effects.qmd>
2 changes: 1 addition & 1 deletion docs/source/tutorials/time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.. Please do not edit this file directly.
.. This file is just a placeholder.
.. For the source file, see:
.. <https://github.com/CDCgov/multisignal-epi-inference/tree/main/docs/source/tutorials/time.qmd>
.. <https://github.com/CDCgov/PyRenew/tree/main/docs/source/tutorials/time.qmd>
2 changes: 1 addition & 1 deletion hook_scripts/pre-commit-rst-placeholder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ for qmd in ${TUTORIALS_DIR}/*.qmd; do
echo ".. Please do not edit this file directly." >> $rst
echo ".. This file is just a placeholder." >> $rst
echo ".. For the source file, see:" >> $rst
echo ".. <https://github.com/CDCgov/multisignal-epi-inference/tree/main/${TUTORIALS_DIR}/${bname}.qmd>" >> $rst
echo ".. <https://github.com/CDCgov/PyRenew/tree/main/${TUTORIALS_DIR}/${bname}.qmd>" >> $rst

done

Expand Down
13 changes: 9 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "multisignal-epi-inference"
name = "PyRenew"
version = "0.1.0"
description = "The CFA Multisignal Renewal project contains Pyrenew, a Python package for multi-signal Bayesian renewal modeling with NumPyro."
description = "PyRenew, a Python package for multi-signal Bayesian renewal modeling with JAX and NumPyro."
authors = ["CFA"]
license = "Apache 2.0"
readme = "README.md"
Expand Down Expand Up @@ -46,6 +46,7 @@ ipywidgets = "^8.1.3"
optional = true

[tool.poetry.group.test.dependencies]
pytest = "^8.3.2"
pytest-cov = "^5.0.0"
pytest-mpl = "^0.17.0"

Expand All @@ -72,8 +73,12 @@ exclude = [ # don't report on objects that match any of these regex
'\.__call__$'
]



[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.deptry]
known_first_party = ["pyrenew", "test"]

[tool.deptry.per_rule_ignores]
DEP004 = ["pytest"]

0 comments on commit f891cb7

Please sign in to comment.