chellow 1725628177.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/mdd_importer.py +4 -0
- chellow/e/views.py +46 -8
- chellow/models.py +14 -0
- chellow/templates/e/scenario.html +5 -1
- {chellow-1725628177.0.0.dist-info → chellow-1726494151.0.0.dist-info}/METADATA +1 -1
- {chellow-1725628177.0.0.dist-info → chellow-1726494151.0.0.dist-info}/RECORD +7 -7
- {chellow-1725628177.0.0.dist-info → chellow-1726494151.0.0.dist-info}/WHEEL +0 -0
chellow/e/mdd_importer.py
CHANGED
|
@@ -248,6 +248,10 @@ def _import_Market_Participant_Role(sess, rows, ctx):
|
|
|
248
248
|
dno_code_str = values[14]
|
|
249
249
|
dno_code = None if len(dno_code_str) == 0 else dno_code_str
|
|
250
250
|
|
|
251
|
+
if participant_code == "CIDC" and dno_code == "99":
|
|
252
|
+
# We already use 99 with CROW
|
|
253
|
+
continue
|
|
254
|
+
|
|
251
255
|
if party is None:
|
|
252
256
|
participant.insert_party(
|
|
253
257
|
sess,
|
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
|
|
chellow/models.py
CHANGED
|
@@ -7511,6 +7511,19 @@ def db_upgrade_49_to_50(sess, root_path):
|
|
|
7511
7511
|
sess.flush()
|
|
7512
7512
|
|
|
7513
7513
|
|
|
7514
|
+
def db_upgrade_50_to_51(sess, root_path):
|
|
7515
|
+
participant_cidc = Participant.get_by_code(sess, "CIDC")
|
|
7516
|
+
dno_99 = sess.scalars(
|
|
7517
|
+
select(Party).where(
|
|
7518
|
+
Party.dno_code == "99", Party.participant == participant_cidc
|
|
7519
|
+
)
|
|
7520
|
+
).one_or_none()
|
|
7521
|
+
if dno_99 is not None:
|
|
7522
|
+
sess.execute(delete(Llfc).where(Llfc.dno == dno_99))
|
|
7523
|
+
|
|
7524
|
+
sess.execute(delete(Party).where(Party.id == dno_99.id))
|
|
7525
|
+
|
|
7526
|
+
|
|
7514
7527
|
upgrade_funcs = [None] * 18
|
|
7515
7528
|
upgrade_funcs.extend(
|
|
7516
7529
|
[
|
|
@@ -7546,6 +7559,7 @@ upgrade_funcs.extend(
|
|
|
7546
7559
|
db_upgrade_47_to_48,
|
|
7547
7560
|
db_upgrade_48_to_49,
|
|
7548
7561
|
db_upgrade_49_to_50,
|
|
7562
|
+
db_upgrade_50_to_51,
|
|
7549
7563
|
]
|
|
7550
7564
|
)
|
|
7551
7565
|
|
|
@@ -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)
|
|
@@ -5,7 +5,7 @@ chellow/commands.py,sha256=ESBe9ZWj1c3vdZgqMZ9gFvYAB3hRag2R1PzOwuw9yFo,1302
|
|
|
5
5
|
chellow/dloads.py,sha256=dixp-O0MF2_mlwrnKx3D9DH09Qu05BjTo0rZfigTjR4,5534
|
|
6
6
|
chellow/edi_lib.py,sha256=alu20x9ZX06iPfnNI9dEJzuP6RIf4We3Y_M_bl7RrcY,51789
|
|
7
7
|
chellow/general_import.py,sha256=l3EHq9zG9Vfl5Ee6XTVrC1nusXo4YGGB4VBmZ_JaJR8,65798
|
|
8
|
-
chellow/models.py,sha256=
|
|
8
|
+
chellow/models.py,sha256=qq7YLv-FGTGE5ussQKMXGYwB7EuCyDk7nMeEUVYdfqw,243939
|
|
9
9
|
chellow/national_grid.py,sha256=czwIZqzJndSGhEMQ5YzI6hRBhvjkM6VRVYXybf4_KXg,4377
|
|
10
10
|
chellow/proxy.py,sha256=cVXIktPlX3tQ1BYcwxq0nJXKE6r3DtFTtfFHPq55HaM,1351
|
|
11
11
|
chellow/rate_server.py,sha256=fg-Pf_9Hk3bXmC9riPQNGQxBvLvBa_WtNYdwDCjnCSg,5678
|
|
@@ -30,7 +30,7 @@ chellow/e/hh_parser_df2.py,sha256=7gaVidyIqeqprm3zYPtHvRLLn08nph04N0cKlveNTV0,42
|
|
|
30
30
|
chellow/e/hh_parser_simple_csv.py,sha256=RN4QOLvTQeoPrpvXvQ9hkOBZnR5piybLfjCiSJdjpjs,2112
|
|
31
31
|
chellow/e/laf_import.py,sha256=aqkcbjnvfBPszBLSNg6getP7iW1uWiTVHy6N5Z5x39U,5514
|
|
32
32
|
chellow/e/lcc.py,sha256=OkpynN8_iAdHRlu-yyU6BhRUqYYOZsUnl0HbHULYo_4,4670
|
|
33
|
-
chellow/e/mdd_importer.py,sha256=
|
|
33
|
+
chellow/e/mdd_importer.py,sha256=NugJr2JhuzkPTsEMl_5UdQuw5K2p8lVJ-hyz4MK6Hfg,35762
|
|
34
34
|
chellow/e/rcrc.py,sha256=92CA1uIotIHd1epQ_jEPdJKzXqDFV-AoJOJeRO6MEyA,4274
|
|
35
35
|
chellow/e/ro.py,sha256=dZKZv_9wXSWuwcb3jiKavoD_9ot-PZseNVeEEe0siLo,596
|
|
36
36
|
chellow/e/scenario.py,sha256=fBDZVOdrI1I3XQG-RdpB0-lDF9VYENBu_9bBXJxmvWk,23362
|
|
@@ -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
|