chellow 1736431515.0.0__py3-none-any.whl → 1737990669.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/bill_parsers/edf_export_xlsx.py +6 -0
- chellow/e/bill_parsers/mm.py +4 -1
- chellow/reports/report_247.py +44 -7
- {chellow-1736431515.0.0.dist-info → chellow-1737990669.0.0.dist-info}/METADATA +1 -1
- {chellow-1736431515.0.0.dist-info → chellow-1737990669.0.0.dist-info}/RECORD +6 -6
- {chellow-1736431515.0.0.dist-info → chellow-1737990669.0.0.dist-info}/WHEEL +0 -0
|
@@ -83,6 +83,12 @@ ELEM_LOOKUP = {
|
|
|
83
83
|
"units": "duos-red-kwh",
|
|
84
84
|
"rate": "duos-red-gbp-per-kwh",
|
|
85
85
|
},
|
|
86
|
+
"Unit Rate Super Red": {
|
|
87
|
+
"name": "duos-super-red",
|
|
88
|
+
"gbp": "duos-super-red-gbp",
|
|
89
|
+
"units": "duos-super-red-kwh",
|
|
90
|
+
"rate": "duos-super-red-gbp-per-kwh",
|
|
91
|
+
},
|
|
86
92
|
}
|
|
87
93
|
|
|
88
94
|
|
chellow/e/bill_parsers/mm.py
CHANGED
|
@@ -114,6 +114,7 @@ ELEMENT_LOOKUP = {
|
|
|
114
114
|
"20RS0050": "duos-amber",
|
|
115
115
|
"30RS0050": "duos-red",
|
|
116
116
|
"9CANNUAL": "duos-reactive",
|
|
117
|
+
"40RS0050": "duos-super-red",
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
|
|
@@ -186,7 +187,9 @@ def _handle_0461(headers, pre_record, record):
|
|
|
186
187
|
headers["mpan_core"] = mpan_core
|
|
187
188
|
units = CONSUMPTION_UNITS_LOOKUP[parts["units"].strip()]
|
|
188
189
|
register_code = parts["register_code"].strip()
|
|
189
|
-
if units == "kWh" and not
|
|
190
|
+
if units == "kWh" and not (
|
|
191
|
+
register_code.startswith("NOCHARGE") or register_code.endswith("XXXX")
|
|
192
|
+
):
|
|
190
193
|
headers["kwh"] += Decimal(parts["quantity"])
|
|
191
194
|
|
|
192
195
|
prev_read_date_str = parts["prev_read_date"].strip()
|
chellow/reports/report_247.py
CHANGED
|
@@ -772,7 +772,7 @@ def content(scenario_props, base_name, user_id, compression, now):
|
|
|
772
772
|
else:
|
|
773
773
|
forecast_from = to_utc(forecast_from)
|
|
774
774
|
|
|
775
|
-
|
|
775
|
+
base_site_set = set()
|
|
776
776
|
|
|
777
777
|
mpan_cores = scenario_props.get("mpan_cores")
|
|
778
778
|
supply_ids = None
|
|
@@ -788,12 +788,14 @@ def content(scenario_props, base_name, user_id, compression, now):
|
|
|
788
788
|
else:
|
|
789
789
|
base_name.append("mpan_cores")
|
|
790
790
|
|
|
791
|
-
|
|
792
|
-
|
|
791
|
+
for site in sess.scalars(
|
|
792
|
+
select(Site)
|
|
793
|
+
.join(SiteEra)
|
|
793
794
|
.join(Era)
|
|
794
795
|
.join(Supply)
|
|
795
796
|
.where(Supply.id.in_(supply_ids))
|
|
796
|
-
)
|
|
797
|
+
):
|
|
798
|
+
base_site_set.add(site.id)
|
|
797
799
|
|
|
798
800
|
site_codes = scenario_props.get("site_codes")
|
|
799
801
|
if site_codes is not None:
|
|
@@ -802,7 +804,10 @@ def content(scenario_props, base_name, user_id, compression, now):
|
|
|
802
804
|
base_name.append(site_codes[0])
|
|
803
805
|
else:
|
|
804
806
|
base_name.append("sitecodes")
|
|
805
|
-
|
|
807
|
+
|
|
808
|
+
for site_code in site_codes:
|
|
809
|
+
site = Site.get_by_code(sess, site_code)
|
|
810
|
+
base_site_set.add(site.id)
|
|
806
811
|
|
|
807
812
|
user = User.get_by_id(sess, user_id)
|
|
808
813
|
|
|
@@ -969,7 +974,6 @@ def content(scenario_props, base_name, user_id, compression, now):
|
|
|
969
974
|
site_rows.append(site_header_titles + summary_titles)
|
|
970
975
|
era_rows.append(era_titles)
|
|
971
976
|
|
|
972
|
-
sites = sites.all()
|
|
973
977
|
normal_reads = set()
|
|
974
978
|
|
|
975
979
|
for month_start, month_finish in month_pairs:
|
|
@@ -980,7 +984,40 @@ def content(scenario_props, base_name, user_id, compression, now):
|
|
|
980
984
|
else:
|
|
981
985
|
data_source_bill = None
|
|
982
986
|
org_month_data = defaultdict(int)
|
|
983
|
-
|
|
987
|
+
|
|
988
|
+
if len(base_site_set) > 0:
|
|
989
|
+
site_set = base_site_set
|
|
990
|
+
else:
|
|
991
|
+
site_set = set()
|
|
992
|
+
for site in sess.scalars(
|
|
993
|
+
select(Site)
|
|
994
|
+
.join(SiteEra)
|
|
995
|
+
.join(Era)
|
|
996
|
+
.where(
|
|
997
|
+
Era.start_date <= month_finish,
|
|
998
|
+
or_(
|
|
999
|
+
Era.finish_date == null(),
|
|
1000
|
+
Era.finish_date >= month_start,
|
|
1001
|
+
),
|
|
1002
|
+
)
|
|
1003
|
+
):
|
|
1004
|
+
site_set.add(site.id)
|
|
1005
|
+
for site in sess.scalars(
|
|
1006
|
+
select(Site)
|
|
1007
|
+
.join(SiteEra)
|
|
1008
|
+
.join(Era)
|
|
1009
|
+
.join(Supply)
|
|
1010
|
+
.join(Bill)
|
|
1011
|
+
.where(
|
|
1012
|
+
Bill.start_date <= month_finish,
|
|
1013
|
+
Bill.finish_date >= month_start,
|
|
1014
|
+
)
|
|
1015
|
+
):
|
|
1016
|
+
site_set.add(site.id)
|
|
1017
|
+
|
|
1018
|
+
for site in sess.scalars(
|
|
1019
|
+
select(Site).where(Site.id.in_(site_set)).order_by(Site.code)
|
|
1020
|
+
):
|
|
984
1021
|
if by_hh:
|
|
985
1022
|
sf = [
|
|
986
1023
|
(d, d)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chellow
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1737990669.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)
|
|
@@ -49,7 +49,7 @@ chellow/e/bill_parsers/activity_mop_stark_xlsx.py,sha256=UgWXDPzQkQghyj_lfgBqoSJ
|
|
|
49
49
|
chellow/e/bill_parsers/annual_mop_stark_xlsx.py,sha256=-HMoIfa_utXYKA44RuC0Xqv3vd2HLeQU_4P0iBUd3WA,4219
|
|
50
50
|
chellow/e/bill_parsers/bgb_edi.py,sha256=GuwHeYbAGk7BVg5n19FcTANFDyKI-y0z3f9niQaPSSw,4828
|
|
51
51
|
chellow/e/bill_parsers/csv.py,sha256=U5zcIaZ6B5QTTpFDAcBnk4G2r8B3j5kJhDPL4AJNkEk,5640
|
|
52
|
-
chellow/e/bill_parsers/edf_export_xlsx.py,sha256=
|
|
52
|
+
chellow/e/bill_parsers/edf_export_xlsx.py,sha256=J4lY8epiSTIePZ6D1SGD76TXRoev35KrUC2sjHkNqlE,6632
|
|
53
53
|
chellow/e/bill_parsers/engie_edi.py,sha256=CTobTskDjzdcqqf_qk2ukDSaTLrVpGZMM0sYlwehog4,14985
|
|
54
54
|
chellow/e/bill_parsers/engie_export_xlsx.py,sha256=oZO0qHdDlOxjJ6J5Ate82CkAoX4bxed1EJyUKHxBcpk,4690
|
|
55
55
|
chellow/e/bill_parsers/engie_xls.py,sha256=jrut2heH_ZWmSjcn7celOydZS9Y49GfpYjDk_EKwamI,14453
|
|
@@ -58,7 +58,7 @@ chellow/e/bill_parsers/gdf_csv.py,sha256=ZfK3Oc6oP28p_P9DIevLNB_zW2WLcEJ3Lvb1gL3
|
|
|
58
58
|
chellow/e/bill_parsers/haven_csv.py,sha256=0uENq8IgVNqdxfBQMBxLTSZWCOuDHXZC0xzk52SbfyE,13652
|
|
59
59
|
chellow/e/bill_parsers/haven_edi.py,sha256=YGPHRxPOhje9s32jqPHHELni2tooOYj3cMC_qaZVPq4,16107
|
|
60
60
|
chellow/e/bill_parsers/haven_edi_tprs.py,sha256=ZVX9CCqUybsot_Z0BEOJPvl9x5kSr7fEWyuJXvZDcz4,11841
|
|
61
|
-
chellow/e/bill_parsers/mm.py,sha256=
|
|
61
|
+
chellow/e/bill_parsers/mm.py,sha256=5909bJe_zwRItqkMYnq5bdZA6XhBBMquvBqsC6bbnqU,10808
|
|
62
62
|
chellow/e/bill_parsers/nonsettlement_dc_stark_xlsx.py,sha256=yogXTuQHGRL7IiqvRWr2C9V24ez1j9Yx0128UygPE_k,4723
|
|
63
63
|
chellow/e/bill_parsers/settlement_dc_stark_xlsx.py,sha256=PlEqCZuJ9DfQXeeYQ64jtf3ML7sUt_tt61QOOTnkE5c,6380
|
|
64
64
|
chellow/e/bill_parsers/sse_edi.py,sha256=L85DOfNkqexeEIEr8pCBn_2sHJI-zEaw6cogpE3YyYM,15204
|
|
@@ -84,7 +84,7 @@ chellow/reports/report_219.py,sha256=3Zs16ka6dWWY_lCDoA-ZFrlPb4vHk1LQoa2yrlTMntA
|
|
|
84
84
|
chellow/reports/report_231.py,sha256=WARLztV2HzBFSi5_xvY_DTXVyuBBbBYiU0RazfjKw-Y,5270
|
|
85
85
|
chellow/reports/report_233.py,sha256=qJdPFuBgQAWD24BsljgGJ44L_RGdHOA1RqsxGjTWhFc,4975
|
|
86
86
|
chellow/reports/report_241.py,sha256=lfivElRkV_CZAhck0rxAuhqzgponj3aWwmwGMNQvUxg,5343
|
|
87
|
-
chellow/reports/report_247.py,sha256=
|
|
87
|
+
chellow/reports/report_247.py,sha256=A74EfUihmV4Pa3NyrJfkf28HJn61Ai4wN694ETfbO4Q,45894
|
|
88
88
|
chellow/reports/report_29.py,sha256=ZXnq6Kg5on-IPquUsH4bn46mBVESY_WhwqDWZPXOJwo,2695
|
|
89
89
|
chellow/reports/report_291.py,sha256=BnWtxe0eWN2QKKWpwjs5-RI5LbReBKL119QbkrkNhV8,7478
|
|
90
90
|
chellow/reports/report_33.py,sha256=lt1EN_LNx6u-AgdaS3YRkPMZA33JgMcELolHF4oJUMw,16689
|
|
@@ -376,6 +376,6 @@ chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1
|
|
|
376
376
|
chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
|
|
377
377
|
chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
|
|
378
378
|
chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
|
|
379
|
-
chellow-
|
|
380
|
-
chellow-
|
|
381
|
-
chellow-
|
|
379
|
+
chellow-1737990669.0.0.dist-info/METADATA,sha256=OP4AXY6aiOoNzLbNqmIfNoVtrpaEbzQtqBuS5VSzG7Y,12204
|
|
380
|
+
chellow-1737990669.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
381
|
+
chellow-1737990669.0.0.dist-info/RECORD,,
|
|
File without changes
|