From b00687c29e5392d9559a65ff6b0aa4bacff44443 Mon Sep 17 00:00:00 2001 From: Nate McIntosh Date: Fri, 22 Mar 2024 12:23:22 -0400 Subject: [PATCH] Create typos.yaml (#42) * Create typos.yaml * Does this make it run on the whole repo? * remove trailing whitespace * Delete .github/workflows/typos.yaml trying to use typos in pre-commit instead * Update .pre-commit-config.yaml add typos to pre-commit * fixed typos --- .pre-commit-config.yaml | 6 ++++++ model/docs/getting-started.ipynb | 2 +- model/src/pyrenew/metaclass.py | 2 +- model/src/pyrenew/model/hospitalizations.py | 2 +- model/src/pyrenew/observation/negativebinomial.py | 2 +- model/src/pyrenew/process/simplerandomwalk.py | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c2268bd0..140690ad 100755 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,3 +36,9 @@ repos: args: ['--baseline', '.secrets.baseline', '--exclude-files', 'model/docs/'] exclude: package.lock.json +#### +# Typos +- repo: https://github.com/crate-ci/typos + rev: v1.19.0 + hooks: + - id: typos diff --git a/model/docs/getting-started.ipynb b/model/docs/getting-started.ipynb index 59b10dea..0e7e1e86 100644 --- a/model/docs/getting-started.ipynb +++ b/model/docs/getting-started.ipynb @@ -17,7 +17,7 @@ "\n", "`pyrenew` has five main components:\n", "\n", - "- Utilitiy and math functions,\n", + "- Utility and math functions,\n", "- The `processes` sub-module,\n", "- The `observations` sub-module,\n", "- The `latent` sub-module, and\n", diff --git a/model/src/pyrenew/metaclass.py b/model/src/pyrenew/metaclass.py index 96b337e0..3bdc0ec1 100644 --- a/model/src/pyrenew/metaclass.py +++ b/model/src/pyrenew/metaclass.py @@ -96,7 +96,7 @@ def sample( ) -> tuple: """Sample method of the process - The method desing in the class should have two dictionaries: + The method design in the class should have two dictionaries: `random_variables` and `constants`. - `randon_variables`: This dictionary contains any data that sample diff --git a/model/src/pyrenew/model/hospitalizations.py b/model/src/pyrenew/model/hospitalizations.py index 26ea5609..7db65665 100644 --- a/model/src/pyrenew/model/hospitalizations.py +++ b/model/src/pyrenew/model/hospitalizations.py @@ -135,7 +135,7 @@ def sample( if constants is None: constants = dict() - # Getting the basline quantities from the basic model + # Getting the baseline quantities from the basic model Rt, infections, *_ = self.basic_renewal.sample( constants=constants, random_variables=random_variables, diff --git a/model/src/pyrenew/observation/negativebinomial.py b/model/src/pyrenew/observation/negativebinomial.py index 1aa416bc..257602fb 100644 --- a/model/src/pyrenew/observation/negativebinomial.py +++ b/model/src/pyrenew/observation/negativebinomial.py @@ -23,7 +23,7 @@ def __init__( Parameters ---------- - concentration_prior : dist.Distribution | nummbers.nums + concentration_prior : dist.Distribution | numbers.nums Numpyro distribution from which to sample the positive concentration parameter of the negative binomial. This parameter is sometimes called k, phi, or the "dispersion" or "overdispersion" parameter, diff --git a/model/src/pyrenew/process/simplerandomwalk.py b/model/src/pyrenew/process/simplerandomwalk.py index 8f249c1d..b7745b82 100644 --- a/model/src/pyrenew/process/simplerandomwalk.py +++ b/model/src/pyrenew/process/simplerandomwalk.py @@ -10,7 +10,7 @@ class SimpleRandomWalkProcess(RandomVariable): """ Class for a Markovian random walk with an a - abitrary step distribution + arbitrary step distribution """ def __init__(