Skip to content

Commit 13ff8e4

Browse files
doubling time is now validated
1 parent 18c4335 commit 13ff8e4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/penn_chime/parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(
9090
self.current_date = Date(value=current_date)
9191

9292
self.date_first_hospitalized = OptionalDate(value=date_first_hospitalized)
93-
self.doubling_time = doubling_time
93+
self.doubling_time = OptionalStrictlyPositive(value=doubling_time)
9494

9595
self.infectious_days = StrictlyPositive(value=infectious_days)
9696
self.market_share = Rate(value=market_share)

src/penn_chime/validators/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@
1010
Rate = Rate() # type: ignore
1111
Date = Date() # type: ignore
1212
OptionalDate = OptionalDate() # type: ignore
13+
# # rolling a custom validator for doubling time in case DS wants to add upper bound
14+
# DoublingTime = OptionalBounded(lower_bound=0-EPSILON, upper_bound=None)

0 commit comments

Comments
 (0)