@@ -57,7 +57,7 @@ def __init__(
57
57
relative_contact_rate : float ,
58
58
mitigation_date : Optional [date ] = None ,
59
59
ventilated : Disposition ,
60
- current_date : date = date . today () ,
60
+ current_date : Optional [ date ] = None ,
61
61
date_first_hospitalized : Optional [date ] = None ,
62
62
doubling_time : Optional [float ] = None ,
63
63
infectious_days : int = 14 ,
@@ -69,7 +69,6 @@ def __init__(
69
69
region : Optional [Regions ] = None ,
70
70
):
71
71
self .current_hospitalized = Positive (value = current_hospitalized )
72
-
73
72
Rate (value = hospitalized .rate ), Rate (value = icu .rate ), Rate (value = ventilated .rate )
74
73
StrictlyPositive (value = hospitalized .days ), StrictlyPositive (value = icu .days ),
75
74
StrictlyPositive (value = ventilated .days )
@@ -87,8 +86,10 @@ def __init__(
87
86
else :
88
87
raise AssertionError ('population or regions must be provided.' )
89
88
89
+ if current_date is None :
90
+ current_date = date .today ()
90
91
self .current_date = Date (value = current_date )
91
-
92
+
92
93
self .date_first_hospitalized = OptionalDate (value = date_first_hospitalized )
93
94
self .doubling_time = OptionalStrictlyPositive (value = doubling_time )
94
95
0 commit comments