chellow 1726485186.0.0__py3-none-any.whl → 1726494151.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of chellow might be problematic. Click here for more details.
- chellow/e/views.py +46 -8
- chellow/templates/e/scenario.html +5 -1
- {chellow-1726485186.0.0.dist-info → chellow-1726494151.0.0.dist-info}/METADATA +1 -1
- {chellow-1726485186.0.0.dist-info → chellow-1726494151.0.0.dist-info}/RECORD +5 -5
- {chellow-1726485186.0.0.dist-info → chellow-1726494151.0.0.dist-info}/WHEEL +0 -0
chellow/e/views.py
CHANGED
|
@@ -3943,20 +3943,58 @@ def scenario_add_get():
|
|
|
3943
3943
|
|
|
3944
3944
|
@e.route("/scenarios/<int:scenario_id>")
|
|
3945
3945
|
def scenario_get(scenario_id):
|
|
3946
|
+
start_date = None
|
|
3947
|
+
finish_date = None
|
|
3948
|
+
duration = 1
|
|
3949
|
+
|
|
3946
3950
|
scenario = Scenario.get_by_id(g.sess, scenario_id)
|
|
3947
3951
|
props = scenario.props
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3952
|
+
site_codes = "\n".join(props.get("site_codes", []))
|
|
3953
|
+
try:
|
|
3954
|
+
duration = props["scenario_duration"]
|
|
3955
|
+
_, finish_date_ct = list(
|
|
3956
|
+
c_months_c(
|
|
3957
|
+
start_year=props["scenario_start_year"],
|
|
3958
|
+
start_month=props["scenario_start_month"],
|
|
3959
|
+
months=duration,
|
|
3960
|
+
)
|
|
3961
|
+
)[-1]
|
|
3962
|
+
finish_date = to_utc(finish_date_ct)
|
|
3963
|
+
except KeyError:
|
|
3964
|
+
pass
|
|
3965
|
+
|
|
3966
|
+
try:
|
|
3967
|
+
start_date = to_utc(
|
|
3968
|
+
ct_datetime(
|
|
3969
|
+
props["scenario_start_year"],
|
|
3970
|
+
props["scenario_start_month"],
|
|
3971
|
+
props["scenario_start_day"],
|
|
3972
|
+
props["scenario_start_hour"],
|
|
3973
|
+
props["scenario_start_minute"],
|
|
3974
|
+
)
|
|
3953
3975
|
)
|
|
3954
|
-
|
|
3976
|
+
except KeyError:
|
|
3977
|
+
pass
|
|
3978
|
+
|
|
3979
|
+
try:
|
|
3980
|
+
finish_date = to_utc(
|
|
3981
|
+
ct_datetime(
|
|
3982
|
+
props["scenario_finish_year"],
|
|
3983
|
+
props["scenario_finish_month"],
|
|
3984
|
+
props["scenario_finish_day"],
|
|
3985
|
+
props["scenario_finish_hour"],
|
|
3986
|
+
props["scenario_finish_minute"],
|
|
3987
|
+
)
|
|
3988
|
+
)
|
|
3989
|
+
except KeyError:
|
|
3990
|
+
pass
|
|
3955
3991
|
return render_template(
|
|
3956
3992
|
"scenario.html",
|
|
3957
3993
|
scenario=scenario,
|
|
3958
|
-
|
|
3959
|
-
|
|
3994
|
+
scenario_start_date=start_date,
|
|
3995
|
+
scenario_finish_date=finish_date,
|
|
3996
|
+
scenario_duration=duration,
|
|
3997
|
+
site_codes=site_codes,
|
|
3960
3998
|
)
|
|
3961
3999
|
|
|
3962
4000
|
|
|
@@ -28,8 +28,12 @@
|
|
|
28
28
|
<fieldset>
|
|
29
29
|
<legend>Run With Duration</legend>
|
|
30
30
|
<input type="hidden" name="scenario_id" value="{{scenario.id}}">
|
|
31
|
+
<label>Start Date</label>
|
|
32
|
+
{{ input_date('start', scenario_start_date) }}
|
|
33
|
+
<label>Finish Date</label>
|
|
34
|
+
{{ input_date('finish', scenario_finish_date) }}
|
|
31
35
|
<label>Site Codes</label>
|
|
32
|
-
{{input_textarea('site_codes',
|
|
36
|
+
{{input_textarea('site_codes', site_codes, 5, 40,
|
|
33
37
|
placeholder='One on each line, includes all if left blank')}}
|
|
34
38
|
<input type="submit" value="Run">
|
|
35
39
|
</fieldset>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: chellow
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1726494151.0.0
|
|
4
4
|
Summary: Web Application for checking UK energy bills.
|
|
5
5
|
Project-URL: Homepage, https://github.com/WessexWater/chellow
|
|
6
6
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
@@ -38,7 +38,7 @@ chellow/e/system_price.py,sha256=6w5J7bzwFAZubE2zdOFRiS8IIrVP8hkoIOaG2yCt-Ic,623
|
|
|
38
38
|
chellow/e/tlms.py,sha256=M33D6YpMixu2KkwSCzDRM3kThLgShg8exp63Obo75l8,8905
|
|
39
39
|
chellow/e/tnuos.py,sha256=XseYztPUsQXNKuBmystO2kzzwAG9ehCZgpGBTdgSk-A,4313
|
|
40
40
|
chellow/e/triad.py,sha256=lIQj7EdUrcFwEqleuHZXYU_bfzIwNOqUVVxB3NPQt4A,13710
|
|
41
|
-
chellow/e/views.py,sha256=
|
|
41
|
+
chellow/e/views.py,sha256=aljiDbLvO_rUl00ohDDxs-3-xPmsuguaOyo69lcXcBA,220624
|
|
42
42
|
chellow/e/bill_parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
43
|
chellow/e/bill_parsers/activity_mop_stark_xlsx.py,sha256=UgWXDPzQkQghyj_lfgBqoSJpHB-t-qOdSaB8qY6GLog,4071
|
|
44
44
|
chellow/e/bill_parsers/annual_mop_stark_xlsx.py,sha256=-HMoIfa_utXYKA44RuC0Xqv3vd2HLeQU_4P0iBUd3WA,4219
|
|
@@ -272,7 +272,7 @@ chellow/templates/e/read_add.html,sha256=PGNPKTQiXkTEANMKOXCzBLGwJJJfQIkIgpGRAb-
|
|
|
272
272
|
chellow/templates/e/read_edit.html,sha256=JWnHn8Dcq3t_LUGLUV9IAMnhuacw38On7552kGn4QiU,3147
|
|
273
273
|
chellow/templates/e/read_type.html,sha256=volKteZB79famXrzN_Bgqy9JT9C4a50vXLkuZ0ObBq0,403
|
|
274
274
|
chellow/templates/e/read_types.html,sha256=CknHXNEkBnsAprqI66ftvnnMFBdR_kqI7o26rxjlrJA,473
|
|
275
|
-
chellow/templates/e/scenario.html,sha256=
|
|
275
|
+
chellow/templates/e/scenario.html,sha256=E8o3WQwAEejzaMPzeuUqyt9fWWNSDtN96qkJz0slDEo,1522
|
|
276
276
|
chellow/templates/e/scenario_add.html,sha256=qQpxvhlrQqrNYiIQTHu_NvSoeSKuRNEJQYwLqRlQ8_U,516
|
|
277
277
|
chellow/templates/e/scenario_docs.html,sha256=hOg6hrrnOcvdk7jXRsMrk1wtwK7K0IpqcBukX_vlvRg,4878
|
|
278
278
|
chellow/templates/e/scenario_edit.html,sha256=Uf64v_qsBP0BxaFEIz214CC_dZXlvro4zvQXH_towhA,1070
|
|
@@ -365,6 +365,6 @@ chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1
|
|
|
365
365
|
chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
|
|
366
366
|
chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
|
|
367
367
|
chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
|
|
368
|
-
chellow-
|
|
369
|
-
chellow-
|
|
370
|
-
chellow-
|
|
368
|
+
chellow-1726494151.0.0.dist-info/METADATA,sha256=64Fg0dcAvXBOlRHQla8VKh58635-X7YjLyWsRhWhv2A,12204
|
|
369
|
+
chellow-1726494151.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
370
|
+
chellow-1726494151.0.0.dist-info/RECORD,,
|
|
File without changes
|