Skip to content

Commit 16c14b0

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 7a5754e commit 16c14b0

19 files changed

+24
-15
lines changed

setup.cfg

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,14 @@ long_description = file: README.rst
55
long_description_content_type = text/x-rst
66
author = Janos Gabler, Tobias Raabe, Klara Röhrl
77
license = MIT
8-
license_file = LICENSE
8+
license_files = LICENSE
99
classifiers =
10-
License :: OSI Approved :: MIT License
1110
Programming Language :: Python :: 3
1211
Programming Language :: Python :: 3 :: Only
13-
Programming Language :: Python :: 3.6
14-
Programming Language :: Python :: 3.7
15-
Programming Language :: Python :: 3.8
16-
Programming Language :: Python :: 3.9
17-
Programming Language :: Python :: 3.10
1812

1913
[options]
2014
packages = find:
21-
python_requires = >=3.6.1
15+
python_requires = >=3.9
2216
include_package_data = True
2317
package_dir =
2418
= .

src/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
REMOVE EVERYTHING THAT IMPORTS THE VARIABLE YOU CHANGED.
77
88
"""
9+
910
import warnings
1011
from pathlib import Path
1112

src/contact_models/task_create_contact_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def measure_of_diff_btw_distributions(params, old_distribution, desired_total):
351351
"""
352352
assert (params.index == old_distribution.index).all()
353353
params_deviation = params["value"].to_numpy() - old_distribution.to_numpy()
354-
params_penalty = (params_deviation ** 2).sum()
354+
params_penalty = (params_deviation**2).sum()
355355
actual_total = params.index.to_numpy() @ params["value"].to_numpy()
356356
total_contacts_penalty = (desired_total - actual_total) ** 2
357357
cost = total_contacts_penalty + params_penalty

src/create_initial_states/create_contact_model_group_ids.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ class with 23 individuals of the same age. Classes meet their peers and 3 pairs
9393
df[educ_group_cols] = df[educ_group_cols].astype("category")
9494

9595
# the stays_home_when_schools_close variable is not used yet.
96-
df[
97-
"stays_home_when_schools_close"
98-
] = _identify_adult_staying_home_when_schools_close(df)
96+
df["stays_home_when_schools_close"] = (
97+
_identify_adult_staying_home_when_schools_close(df)
98+
)
9999

100100
df = df.drop(columns=["pos_in_group", "one", "group_size"])
101101
return df

src/create_initial_states/create_group_transition_probs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
This module is copied from sid commit 206886a14eeb3257deb71db91aba4e7fb2385fc2.
44
55
"""
6+
67
import string
78

89
import numpy as np

src/create_initial_states/create_vaccination_priority.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
- shares of each group: https://bit.ly/3cb5uUQ
9292
9393
"""
94+
9495
import numpy as np
9596
import pandas as pd
9697

src/create_initial_states/task_build_full_params.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,9 @@ def _add_rapid_test_reaction_params(params):
368368
369369
"""
370370
params = params.copy(deep=True)
371-
params.loc[
372-
("rapid_test_demand", "reaction", "hh_contacts_multiplier"), "value"
373-
] = 0.7
371+
params.loc[("rapid_test_demand", "reaction", "hh_contacts_multiplier"), "value"] = (
372+
0.7
373+
)
374374
params.loc[
375375
("rapid_test_demand", "reaction", "not_hh_contacts_multiplier"), "value"
376376
] = 0.15

src/create_initial_states/task_create_background_characteristics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Create a synthetic population that is representative of Germany."""
2+
23
from pathlib import Path
34

45
import numpy as np

src/plotting/task_plot_decomposition.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module holds the code to compute marginal contributions and shapley values."""
2+
23
from typing import Dict
34

45
import matplotlib

src/plotting/task_plot_incidences_by_group.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""For each available scenario plot the incidences in each of the age groups."""
2+
23
import matplotlib.pyplot as plt
34
import pandas as pd
45
import pytask

0 commit comments

Comments
 (0)