Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release cycle, ? 2025 #449

Draft
wants to merge 46 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
53aa24f
Remove unused method from `Parameters`
TimothyWillard Dec 5, 2024
098e13d
Line length formatting
TimothyWillard Dec 5, 2024
8c8df8b
New documentation and installation script
emprzy Dec 9, 2024
0ebbf08
Update local-installation.md
emprzy Dec 9, 2024
1eee527
Minor styling edits to `seeding.py`
TimothyWillard Dec 9, 2024
2d68856
Remove `modinf` arg from `_DataFrame2NumbaDict`
TimothyWillard Dec 9, 2024
a12150c
Add `ModelInfo.get_seeding_data`
TimothyWillard Dec 10, 2024
8ba5f0c
Update other references to `Seeding.get_from_*`
TimothyWillard Dec 10, 2024
e31cac8
Add documentation to the `Seeding` class
TimothyWillard Dec 10, 2024
692865f
Document `ModelInfo.get_seeding_data`
TimothyWillard Dec 10, 2024
0b9c351
Update `local_install_or_update` and `local-installation.md`
emprzy Dec 16, 2024
d812220
Removing file extension from `local_install_or_update` file
emprzy Dec 18, 2024
67ccbff
Update local_install_or_update
emprzy Dec 19, 2024
cbecd91
Incorporate `conda` env setup into installation script and update doc…
emprzy Dec 20, 2024
8db7923
Update local_install_or_update
emprzy Dec 26, 2024
7b97ac7
Add `Jinja2` dep to `gempyor`
TimothyWillard Jan 6, 2025
5abf319
Set `include-package-data` to `true`
TimothyWillard Nov 26, 2024
0d6f517
Include templates with `include-data` directive
TimothyWillard Dec 2, 2024
ca17746
Jinja2 templating infrastructure
TimothyWillard Oct 29, 2024
a997367
Fix Jinja2 loader
TimothyWillard Nov 26, 2024
20bb555
Provide only pkg name to Jinja2 `PackageLoader`
TimothyWillard Nov 26, 2024
1d82cd4
Prefer `FileSystemLoader` over `PackageLoader`
TimothyWillard Nov 26, 2024
71e2f47
Logging infrastructure for `gempyor`
TimothyWillard Oct 29, 2024
e090873
Only propagate logger in pytest
TimothyWillard Oct 30, 2024
a983af2
`black` linting for `gempyor.logging`
TimothyWillard Jan 7, 2025
cd3392e
Merge pull request #418 from emprzy/installation_documentation
emprzy Jan 7, 2025
39be84e
Merge dev into feature/310/logging-infra
TimothyWillard Jan 7, 2025
cd2bfd0
Add `log_cli_inputs` utility
TimothyWillard Nov 5, 2024
a333f6b
Add custom duration click param type
TimothyWillard Jan 7, 2025
f2edc27
Add custom click param type for memory
TimothyWillard Jan 7, 2025
33ad611
Document info/shared_cli, MemoryParamType int
TimothyWillard Jan 7, 2025
bbfa1c2
Assume unitless numbers are in default unit
TimothyWillard Nov 25, 2024
39bfbdc
Remove unused `_jinja` helpers
TimothyWillard Jan 8, 2025
085beca
Call positional args with names
TimothyWillard Jan 8, 2025
857f9e6
Explicit unit control for custom click types
TimothyWillard Jan 8, 2025
dcb899b
Create internal `gempyor._click` module
TimothyWillard Jan 8, 2025
7426548
Merge pull request #447 from HopkinsIDD/feature/310/logging-infra
TimothyWillard Jan 10, 2025
da7d816
Merge pull request #414 from HopkinsIDD/feature/276/remove-dead-methods
TimothyWillard Jan 10, 2025
4071d37
Merge dev into feature/365/convenience-click-types
TimothyWillard Jan 10, 2025
5eee4a6
Merge pull request #446 from HopkinsIDD/feature/365/templating-infra
TimothyWillard Jan 13, 2025
533fcd9
Merge pull request #448 from HopkinsIDD/feature/365/convenience-click…
TimothyWillard Jan 13, 2025
4917d62
Merge main into dev
TimothyWillard Jan 15, 2025
5e6e622
Merge pull request #422 from HopkinsIDD/feature/397/remove-seeding-de…
TimothyWillard Jan 15, 2025
320188f
Merge main into dev
TimothyWillard Jan 17, 2025
8e6e51c
Merge main into dev
TimothyWillard Jan 23, 2025
986423a
Merge main into dev
TimothyWillard Jan 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Line length formatting
TimothyWillard committed Dec 5, 2024

Verified

This commit was signed with the committer’s verified signature.
TimothyWillard Timothy Willard
commit 098e13dcd96768bd030b146e681637078a742b3f
22 changes: 14 additions & 8 deletions flepimop/gempyor_pkg/src/gempyor/parameters.py
Original file line number Diff line number Diff line change
@@ -84,7 +84,8 @@ def __init__(
self.npar = len(self.pnames)
if self.npar != len(set([name.lower() for name in self.pnames])):
raise ValueError(
"Parameters of the SEIR model have the same name (remember that case is not sufficient!)"
"Parameters of the SEIR model have the same "
"name (remember that case is not sufficient!)"
)

# Attributes of dictionary
@@ -128,16 +129,18 @@ def __init__(
print("loaded dates:", df.index)
raise ValueError(
f"Issue loading file '{fn_name}' for parameter '{pn}': "
f"Provided file dates span '{str(df.index[0])}' to '{str(df.index[-1])}', "
f"but the config dates span '{ti}' to '{tf}'."
f"Provided file dates span '{str(df.index[0])}' to "
f"'{str(df.index[-1])}', but the config dates "
f"span '{ti}' to '{tf}'."
)
if not (pd.date_range(ti, tf) == df.index).all():
print("config dates:", pd.date_range(ti, tf))
print("loaded dates:", df.index)
raise ValueError(
f"Issue loading file '{fn_name}' for parameter '{pn}': "
f"Provided file dates span '{str(df.index[0])}' to '{str(df.index[-1])}', "
f"but the config dates span '{ti}' to '{tf}'."
f"Provided file dates span '{str(df.index[0])}' to "
f"'{str(df.index[-1])}', but the config dates "
f"span '{ti}' to '{tf}'."
)

self.pdata[pn]["ts"] = df
@@ -148,7 +151,8 @@ def __init__(
else:
self.pdata[pn]["stacked_modifier_method"] = "product"
logging.debug(
f"No 'stacked_modifier_method' for parameter {pn}, assuming multiplicative NPIs"
f"No 'stacked_modifier_method' for parameter {pn}, "
"assuming multiplicative NPIs."
)

if self.pconfig[pn]["rolling_mean_windows"].exists():
@@ -209,7 +213,8 @@ class via `subpop_names`.
else:
param_arr[idx] = self.pdata[pn]["ts"].values

return param_arr # we don't store it as a member because this object needs to be small to be pickable
# we don't store it as a member because this object needs to be small to be pickable
return param_arr

def parameters_load(
self, param_df: pd.DataFrame, n_days: int, nsubpops: int
@@ -249,7 +254,8 @@ def parameters_load(
param_arr[idx] = self.pdata[pn]["ts"].values
else:
print(
f"PARAM: parameter {pn} NOT found in loadID file. Drawing from config distribution"
f"PARAM: parameter {pn} NOT found in loadID file. "
"Drawing from config distribution"
)
pval = self.pdata[pn]["dist"]()
param_arr[idx] = np.full((n_days, nsubpops), pval)
Original file line number Diff line number Diff line change
@@ -237,7 +237,8 @@ def test_timeseries_parameter_has_insufficient_columns_value_error(
ValueError,
match=(
rf"^Issue loading file '{tmp_file}' for parameter 'sigma': "
rf"the number of non-'date' columns is '{actual_columns}', expected '{mock_inputs.number_of_subpops()}' "
rf"the number of non-'date' columns is '{actual_columns}', expected "
rf"'{mock_inputs.number_of_subpops()}' "
rf"\(number of subpopulations\) or one\.$"
),
):
@@ -282,7 +283,8 @@ def test_timeseries_parameter_has_insufficient_dates_value_error(
ValueError,
match=(
f"Issue loading file '{tmp_file}' for parameter 'sigma': "
f"Provided file dates span '{timeseries_start_date}( 00:00:00)?' to '{timeseries_end_date}( 00:00:00)?', "
f"Provided file dates span '{timeseries_start_date}( 00:00:00)?' to "
rf"'{timeseries_end_date}( 00:00:00)?', "
f"but the config dates span '{mock_inputs.ti}' to '{mock_inputs.tf}'.$"
),
):