From cfcb209237e55c6d48dc553b02c8a3270c1df090 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 20:07:06 +0000 Subject: [PATCH 1/6] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.15.21 → v0.16.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.21...v0.16.0) - [github.com/jolars/panache-pre-commit: v2.61.0 → v3.0.1](https://github.com/jolars/panache-pre-commit/compare/v2.61.0...v3.0.1) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 44335a91..a650b9ae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: ##### # Python - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.21 + rev: v0.16.0 hooks: # Run the linter - id: ruff-check @@ -27,7 +27,7 @@ repos: ##### # Quarto - repo: https://github.com/jolars/panache-pre-commit - rev: v2.61.0 + rev: v3.0.1 hooks: - id: panache-format - id: panache-lint From a81d6244e934ab476d36692312a9ac6fdf7f8816 Mon Sep 17 00:00:00 2001 From: "Dylan H. Morris" Date: Mon, 27 Jul 2026 18:12:03 -0400 Subject: [PATCH 2/6] Apply panache fixes --- README.md | 4 ++-- docs/index.md | 2 +- docs/tutorials/latent_infections.qmd | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d3e10235..cf0d576a 100755 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ This source code in this repository is distributed in the hope that it will be u See the Apache Software License for more details. You should have received a copy of the Apache Software License along with this program. -If not, see [http://www.apache.org/licenses/LICENSE-2.0.html](http://www.apache.org/licenses/LICENSE-2.0.html). +If not, see . The source code forked from other open source projects will inherit its license. @@ -92,7 +92,7 @@ Anyone is encouraged to contribute to the repository by [forking](https://help.g By contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users under the terms of the [Apache Software License v2](http://www.apache.org/licenses/LICENSE-2.0.html) or later. All comments, messages, pull requests, and other submissions received through CDC including this GitHub page may be subject to applicable federal law, including but not limited to the Federal Records Act, and may be archived. -Learn more at [http://www.cdc.gov/other/privacy.html](http://www.cdc.gov/other/privacy.html). +Learn more at . ## Records Management Standard Notice diff --git a/docs/index.md b/docs/index.md index dfb997b6..9a588765 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,7 +13,7 @@ It combines two distinct discrete convolutions which describe different processe - The **renewal equation** maps past infections to new infections using the generation interval distribution $w_\tau$. - The **observation equation** maps latent infections to expected observed events using the delay distribution $\pi_d$. -#### Renewal equation +### Renewal equation New infections arise from past infections through a generation interval distribution. diff --git a/docs/tutorials/latent_infections.qmd b/docs/tutorials/latent_infections.qmd index 3408011f..e00d9a08 100644 --- a/docs/tutorials/latent_infections.qmd +++ b/docs/tutorials/latent_infections.qmd @@ -279,7 +279,7 @@ def sample_process(rt_process, label): samples = Predictive(sampler, num_samples=n_samples)(random.PRNGKey(42)) return { - "rt": np.array(samples["PopulationInfections::rt_single"])[:, n_init:, 0], + "rt": np.array(samples[ -> None"PopulationInfections::rt_single"])[:, n_init:, 0], "infections": np.array(samples["PopulationInfections::infections_aggregate"])[ :, n_init: ], From 68a35cc8ea47725d4bd9d1f160203a516c8f9fb5 Mon Sep 17 00:00:00 2001 From: "Dylan H. Morris" Date: Mon, 27 Jul 2026 18:46:51 -0400 Subject: [PATCH 3/6] Update ruff ignores, undo bad 'fix' --- docs/tutorials/latent_infections.qmd | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/tutorials/latent_infections.qmd b/docs/tutorials/latent_infections.qmd index e00d9a08..3408011f 100644 --- a/docs/tutorials/latent_infections.qmd +++ b/docs/tutorials/latent_infections.qmd @@ -279,7 +279,7 @@ def sample_process(rt_process, label): samples = Predictive(sampler, num_samples=n_samples)(random.PRNGKey(42)) return { - "rt": np.array(samples[ -> None"PopulationInfections::rt_single"])[:, n_init:, 0], + "rt": np.array(samples["PopulationInfections::rt_single"])[:, n_init:, 0], "infections": np.array(samples["PopulationInfections::infections_aggregate"])[ :, n_init: ], diff --git a/pyproject.toml b/pyproject.toml index aad3143f..f4da112d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,3 +89,4 @@ select = ["I", "E4", "E7", "E9", "F", "UP", "ANN"] [tool.ruff.lint.per-file-ignores] "test/**" = ["ANN"] +"docs/tutorials/**" = ["ANN"] From f2cab630a18d5e156e646d9af13f2b15993f1276 Mon Sep 17 00:00:00 2001 From: "Dylan H. Morris" Date: Mon, 27 Jul 2026 18:52:14 -0400 Subject: [PATCH 4/6] Fix header levels --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 9a588765..213754e9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -35,7 +35,7 @@ Here, $\tau$ indexes the generation interval. In PyRenew, the latent process is represented on a **per-capita scale** (infection proportion) and is multiplied by a population size downstream when connecting to count observations. -#### Observation equation +### Observation equation Infections are latent and are not directly observed; instead, the data consist of events that occur some time after infection, such as hospitalizations or emergency department visits. @@ -55,7 +55,7 @@ $$ Here, $d$ indexes lags in the infection-to-observation delay distribution. -#### Stochastic observation model +### Stochastic observation model The observation equation defines the expected number of observed events at time $t$, but the actual observed data are stochastic. From efaaabfc0370dd123348e4cd81f38b51168dd935 Mon Sep 17 00:00:00 2001 From: "Dylan H. Morris" Date: Mon, 27 Jul 2026 18:58:35 -0400 Subject: [PATCH 5/6] Minor change to engage CI panache hook --- docs/tutorials/latent_infections.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/latent_infections.qmd b/docs/tutorials/latent_infections.qmd index 3408011f..8a774f60 100644 --- a/docs/tutorials/latent_infections.qmd +++ b/docs/tutorials/latent_infections.qmd @@ -259,7 +259,7 @@ n_init = len(gen_int_pmf) n_samples = 200 log_rt_time_0 = 0.5 I0_val = 0.001 -rt_cap = 3.0 +rt_cap = 3. def sample_process(rt_process, label): From d2ec0de3654b3a9e54cae2f982538cb9cd1c889d Mon Sep 17 00:00:00 2001 From: "Dylan H. Morris" Date: Thu, 30 Jul 2026 20:39:19 -0400 Subject: [PATCH 6/6] Use latest panache hook and add ignores for tutorials --- .pre-commit-config.yaml | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a650b9ae..8c52264e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: ##### # Python - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.16.0 + rev: v0.16.1 hooks: # Run the linter - id: ruff-check @@ -27,7 +27,7 @@ repos: ##### # Quarto - repo: https://github.com/jolars/panache-pre-commit - rev: v3.0.1 + rev: v3.0.2 hooks: - id: panache-format - id: panache-lint diff --git a/pyproject.toml b/pyproject.toml index f4da112d..3f809643 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,4 +89,4 @@ select = ["I", "E4", "E7", "E9", "F", "UP", "ANN"] [tool.ruff.lint.per-file-ignores] "test/**" = ["ANN"] -"docs/tutorials/**" = ["ANN"] +"docs/tutorials/**" = ["ANN", "E402"]