Skip to content

Commit

Permalink
Format files using ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanhmorris committed Oct 2, 2024
1 parent 224bcaa commit 652b93e
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 15 deletions.
1 change: 0 additions & 1 deletion pyrenew/datasets/wastewater.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
This module loads the package dataset named 'wastewater' and provides functions to manipulate the data. It uses the 'polars' library.
"""


from importlib.resources import files

import polars as pl
Expand Down
1 change: 1 addition & 0 deletions pyrenew/distutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
found in renewal equation modeling,
such as discrete time-to-event distributions
"""

from __future__ import annotations

import jax.numpy as jnp
Expand Down
3 changes: 1 addition & 2 deletions test/test_forecast.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# numpydoc ignore=GL08

from test.utils import SimpleRt

import jax.numpy as jnp
import jax.random as jr
import numpyro
Expand All @@ -17,6 +15,7 @@
from pyrenew.model import RtInfectionsRenewalModel
from pyrenew.observation import PoissonObservation
from pyrenew.randomvariable import DistributionalVariable
from test.utils import SimpleRt


def test_forecast():
Expand Down
1 change: 1 addition & 0 deletions test/test_integrate_discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test the integrate_discrete function
used in DifferencedProcess and elsewhere
"""

import jax
import jax.numpy as jnp
import pytest
Expand Down
3 changes: 1 addition & 2 deletions test/test_latent_admissions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# numpydoc ignore=GL08

from test.utils import SimpleRt

import jax.numpy as jnp
import numpy.testing as testing
import numpyro
Expand All @@ -10,6 +8,7 @@
from pyrenew.deterministic import DeterministicPMF, DeterministicVariable
from pyrenew.latent import HospitalAdmissions, Infections
from pyrenew.randomvariable import DistributionalVariable
from test.utils import SimpleRt


def test_admissions_sample():
Expand Down
3 changes: 1 addition & 2 deletions test/test_latent_infections.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# numpydoc ignore=GL08

from test.utils import SimpleRt

import jax.numpy as jnp
import numpy.testing as testing
import numpyro
import pytest

from pyrenew.latent import Infections
from test.utils import SimpleRt


def test_infections_as_deterministic():
Expand Down
3 changes: 1 addition & 2 deletions test/test_model_basic_renewal.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# numpydoc ignore=GL08

from test.utils import SimpleRt

import jax.numpy as jnp
import jax.random as jr
import numpy as np
Expand All @@ -19,6 +17,7 @@
from pyrenew.model import RtInfectionsRenewalModel
from pyrenew.observation import PoissonObservation
from pyrenew.randomvariable import DistributionalVariable
from test.utils import SimpleRt


def test_model_basicrenewal_no_timepoints_or_observations():
Expand Down
3 changes: 1 addition & 2 deletions test/test_model_hosp_admissions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# numpydoc ignore=GL08

from test.utils import SimpleRt

import jax.numpy as jnp
import jax.random as jr
import numpy as np
Expand All @@ -24,6 +22,7 @@
from pyrenew.model import HospitalAdmissionsModel
from pyrenew.observation import PoissonObservation
from pyrenew.randomvariable import DistributionalVariable
from test.utils import SimpleRt


def test_model_hosp_no_timepoints_or_observations():
Expand Down
3 changes: 1 addition & 2 deletions test/test_predictive.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
when no posterior samples are available.
"""

from test.utils import SimpleRt

import jax.numpy as jnp
import numpyro.distributions as dist
import pytest
Expand All @@ -18,6 +16,7 @@
from pyrenew.model import RtInfectionsRenewalModel
from pyrenew.observation import PoissonObservation
from pyrenew.randomvariable import DistributionalVariable
from test.utils import SimpleRt

pmf_array = jnp.array([0.25, 0.1, 0.2, 0.45])
gen_int = DeterministicPMF(name="gen_int", value=pmf_array)
Expand Down
3 changes: 1 addition & 2 deletions test/test_random_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
with different random keys behave appropriately.
"""

from test.utils import SimpleRt

import jax.numpy as jnp
import jax.random as jr
import numpyro
Expand All @@ -20,6 +18,7 @@
from pyrenew.model import RtInfectionsRenewalModel
from pyrenew.observation import PoissonObservation
from pyrenew.randomvariable import DistributionalVariable
from test.utils import SimpleRt


def create_test_model(): # numpydoc ignore=GL08
Expand Down
1 change: 1 addition & 0 deletions test/test_scan_rv_plate_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
classes behave as expected in a
:func:`numpyro.plate` context.
"""

import jax.numpy as jnp
import numpyro
import numpyro.distributions as dist
Expand Down

0 comments on commit 652b93e

Please sign in to comment.