Skip to content

Commit 27d720f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 86af24d commit 27d720f

21 files changed

+26
-16
lines changed

docs/source/_static/images/make_infectiousness_period.ipynb

+1-3
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,7 @@
125125
],
126126
"source": [
127127
"dist_mean = 2 * 0.12 + 4 * 0.29 + 6 * 0.47 + 10 * 0.12\n",
128-
"dist_var = (\n",
129-
" 2 ** 2 * 0.12 + 4 ** 2 * 0.29 + 6 ** 2 * 0.47 + 10 ** 2 * 0.12 - dist_mean ** 2\n",
130-
")\n",
128+
"dist_var = 2**2 * 0.12 + 4**2 * 0.29 + 6**2 * 0.47 + 10**2 * 0.12 - dist_mean**2\n",
131129
"dist_std = np.sqrt(dist_var)\n",
132130
"dist_mean, dist_std"
133131
]

docs/source/_static/images/make_time_until_death.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"source": [
4242
"mean = 11.74\n",
4343
"std = 8.79\n",
44-
"var = 8.79 ** 2\n",
44+
"var = 8.79**2\n",
4545
"\n",
4646
"print(mean, std)"
4747
]

docs/source/_static/images/make_time_until_icu_recovery.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"source": [
4242
"mean = 18.8\n",
4343
"std = 12.21\n",
44-
"var = std ** 2\n",
44+
"var = std**2\n",
4545
"\n",
4646
"print(mean, std)"
4747
]

setup.cfg

+2-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ url = https://github.com/covid-19-impact-lab/sid
77
author = Janos Gabler, Tobias Raabe, Klara Roehrl
88
author_email = [email protected]
99
license = MIT
10-
license_file = LICENSE
10+
license_files = LICENSE
1111
platforms = any
1212
classifiers =
1313
Development Status :: 3 - Alpha
@@ -16,10 +16,6 @@ classifiers =
1616
Operating System :: OS Independent
1717
Programming Language :: Python :: 3
1818
Programming Language :: Python :: 3 :: Only
19-
Programming Language :: Python :: 3.6
20-
Programming Language :: Python :: 3.7
21-
Programming Language :: Python :: 3.8
22-
Programming Language :: Python :: 3.9
2319
Topic :: Scientific/Engineering
2420
project_urls =
2521
Changelog = https://sid-dev.readthedocs.io/en/latest/changes.html
@@ -41,7 +37,7 @@ install_requires =
4137
python-snappy
4238
seaborn
4339
tqdm
44-
python_requires = >=3.6
40+
python_requires = >=3.8
4541
include_package_data = True
4642
package_dir =
4743
=src

src/sid/colors.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
https://github.com/covid-19-impact-lab/utilities/blob/master/utilities/colors.py.""
44
55
"""
6+
67
import numpy as np
78
import seaborn as sns
89
from matplotlib.colors import LinearSegmentedColormap

src/sid/config.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains configuration values for sid."""
2+
23
from pathlib import Path
34

45
import numpy as np

src/sid/contacts.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains everything related to contacts and matching."""
2+
23
import itertools
34
from typing import Any
45
from typing import Dict

src/sid/events.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the code to calculate infections by events."""
2+
23
import pandas as pd
34
from sid.config import DTYPE_VIRUS_STRAIN
45
from sid.virus_strains import combine_first_factorized_infections

src/sid/initial_conditions.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
beginning of a simulation and can used to create patterns which match the real data.
55
66
"""
7+
78
import itertools
89
import math
910
from typing import Any
@@ -456,9 +457,9 @@ def _sample_factorized_virus_strains_for_infections(
456457
sampled_virus_strains = np.random.choice(
457458
virus_strain_factors, p=probabilities, size=n_infected
458459
)
459-
spread_out_virus_strains.loc[
460-
spread_out_infections[column], column
461-
] = sampled_virus_strains
460+
spread_out_virus_strains.loc[spread_out_infections[column], column] = (
461+
sampled_virus_strains
462+
)
462463

463464
return spread_out_virus_strains
464465

src/sid/matching_probabilities.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Functions to work with transition matrices for assortative matching."""
2+
23
import string
34
import warnings
45
from typing import List

src/sid/msm.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
of Asset Prices. Econometrica, 61(4), 929-952.
1616
1717
"""
18+
1819
import functools
1920

2021
import numpy as np
@@ -156,7 +157,7 @@ def _msm(
156157
moment_errors = flat_simulated_moments - flat_empirical_moments
157158

158159
root_contribs = np.sqrt(np.diagonal(weighting_matrix)) * moment_errors
159-
value = np.sum(root_contribs ** 2)
160+
value = np.sum(root_contribs**2)
160161

161162
out = {
162163
"value": value,

src/sid/parse_model.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the code the parse input data."""
2+
23
import copy
34
import pprint
45
import warnings

src/sid/pathogenesis.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
countdown lengths. Currently, most of it is deterministic.
55
66
"""
7+
78
import numpy as np
89
import pandas as pd
910
from sid.config import DTYPE_DRAW_COURSE_OF_DISEASE

src/sid/policies.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the code to for applying contact policies."""
2+
23
import itertools
34
from typing import Any
45
from typing import Dict

src/sid/seasonality.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the code related to seasonality."""
2+
23
import itertools
34
from typing import Any
45
from typing import Callable

src/sid/testing.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module holds the interface for the testing models."""
2+
23
import itertools
34
from typing import Any
45
from typing import Dict

src/sid/testing_demand.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Contains the code for calculating the demand for tests."""
2+
23
import itertools
34
from typing import Any
45
from typing import Dict

src/sid/time.py

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
estimation to reduce memory consumption.
1414
1515
"""
16+
1617
from functools import partial
1718

1819
import pandas as pd

src/sid/update_states.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def _get_waning_immunity_coefficients(
289289
("immunity", "immunity_waning", f"slope_after_maximum_{event}"), "value"
290290
]
291291

292-
slope_before_maximum = maximum_immunity / (time_to_reach_maximum ** 3)
292+
slope_before_maximum = maximum_immunity / (time_to_reach_maximum**3)
293293
intercept_after_maximum = (
294294
maximum_immunity - slope_after_maximum * time_to_reach_maximum
295295
)

src/sid/vaccination.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the code for vaccinating individuals."""
2+
23
import itertools
34
from typing import Any
45
from typing import Dict

src/sid/validation.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains routines to validate inputs to functions."""
2+
23
import inspect
34
import warnings
45
from typing import Callable

0 commit comments

Comments
 (0)