chellow 1719570651.0.0__py3-none-any.whl → 1720006293.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/reports/report_231.py +26 -25
- chellow/reports/report_81.py +30 -29
- chellow/reports/report_87.py +27 -28
- {chellow-1719570651.0.0.dist-info → chellow-1720006293.0.0.dist-info}/METADATA +1 -1
- {chellow-1719570651.0.0.dist-info → chellow-1720006293.0.0.dist-info}/RECORD +6 -6
- {chellow-1719570651.0.0.dist-info → chellow-1720006293.0.0.dist-info}/WHEEL +0 -0
chellow/reports/report_231.py
CHANGED
|
@@ -36,6 +36,9 @@ def content(user_id, start_date, finish_date, contract_id):
|
|
|
36
36
|
"energisation_status",
|
|
37
37
|
"gsp_group",
|
|
38
38
|
"dno",
|
|
39
|
+
"era_start",
|
|
40
|
+
"pc",
|
|
41
|
+
"meter_type",
|
|
39
42
|
"site_code",
|
|
40
43
|
"imp_is_substation",
|
|
41
44
|
"imp_llfc_code",
|
|
@@ -46,7 +49,8 @@ def content(user_id, start_date, finish_date, contract_id):
|
|
|
46
49
|
]
|
|
47
50
|
|
|
48
51
|
bill_titles = contract_func(caches, contract, "virtual_bill_titles")()
|
|
49
|
-
|
|
52
|
+
titles = header_titles + bill_titles
|
|
53
|
+
writer.writerow(titles)
|
|
50
54
|
vb_func = contract_func(caches, contract, "virtual_bill")
|
|
51
55
|
|
|
52
56
|
for era in (
|
|
@@ -77,34 +81,31 @@ def content(user_id, start_date, finish_date, contract_id):
|
|
|
77
81
|
exp_llfc_description = supply_source.llfc.description
|
|
78
82
|
imp_is_substation = imp_llfc_code = imp_llfc_description = None
|
|
79
83
|
|
|
80
|
-
out =
|
|
81
|
-
era.imp_mpan_core,
|
|
82
|
-
era.exp_mpan_core,
|
|
83
|
-
chunk_start,
|
|
84
|
-
chunk_finish,
|
|
85
|
-
supply_source.energisation_status_code,
|
|
86
|
-
supply_source.gsp_group_code,
|
|
87
|
-
supply_source.dno_code,
|
|
88
|
-
era.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
84
|
+
out = {
|
|
85
|
+
"imp_mpan_core": era.imp_mpan_core,
|
|
86
|
+
"exp_mpan_core": era.exp_mpan_core,
|
|
87
|
+
"start_date": chunk_start,
|
|
88
|
+
"finish_date": chunk_finish,
|
|
89
|
+
"energisation_status": supply_source.energisation_status_code,
|
|
90
|
+
"gsp_group": supply_source.gsp_group_code,
|
|
91
|
+
"dno": supply_source.dno_code,
|
|
92
|
+
"era_start": era.start_date,
|
|
93
|
+
"pc": supply_source.pc_code,
|
|
94
|
+
"meter_type": supply_source.meter_type_code,
|
|
95
|
+
"site_code": era.get_physical_site(sess).code,
|
|
96
|
+
"imp_is_substation": imp_is_substation,
|
|
97
|
+
"imp_llfc_code": imp_llfc_code,
|
|
98
|
+
"imp_llfc_description": imp_llfc_description,
|
|
99
|
+
"exp_is_substation": exp_is_substation,
|
|
100
|
+
"exp_llfc_code": exp_llfc_code,
|
|
101
|
+
"exp_llfc_description": exp_llfc_description,
|
|
102
|
+
}
|
|
96
103
|
vb_func(supply_source)
|
|
97
104
|
bill = supply_source.mop_bill
|
|
98
105
|
for title in bill_titles:
|
|
99
106
|
if title in bill:
|
|
100
|
-
out
|
|
101
|
-
|
|
102
|
-
else:
|
|
103
|
-
out.append("")
|
|
104
|
-
for k in sorted(bill.keys()):
|
|
105
|
-
out.append(k)
|
|
106
|
-
out.append(bill[k])
|
|
107
|
-
writer.writerow(csv_make_val(v) for v in out)
|
|
107
|
+
out[title] = bill[title]
|
|
108
|
+
writer.writerow(csv_make_val(out.get(t)) for t in titles)
|
|
108
109
|
|
|
109
110
|
sess.rollback() # Avoid long-running transactions
|
|
110
111
|
except BadRequest as e:
|
chellow/reports/report_81.py
CHANGED
|
@@ -37,13 +37,16 @@ def content(user_id, contract_id, end_year, end_month, months):
|
|
|
37
37
|
|
|
38
38
|
bill_titles = contract_func(caches, contract, "virtual_bill_titles")()
|
|
39
39
|
header_titles = [
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
40
|
+
"imp_mpan_core",
|
|
41
|
+
"exp_mpan_core",
|
|
42
|
+
"start_date",
|
|
43
|
+
"finish_date",
|
|
44
44
|
"energisation_status",
|
|
45
45
|
"gsp_group",
|
|
46
46
|
"dno",
|
|
47
|
+
"era_start",
|
|
48
|
+
"pc",
|
|
49
|
+
"meter_type",
|
|
47
50
|
"site_code",
|
|
48
51
|
"imp_is_substation",
|
|
49
52
|
"imp_llfc_code",
|
|
@@ -55,7 +58,8 @@ def content(user_id, contract_id, end_year, end_month, months):
|
|
|
55
58
|
|
|
56
59
|
vb_func = contract_func(caches, contract, "virtual_bill")
|
|
57
60
|
|
|
58
|
-
|
|
61
|
+
titles = header_titles + bill_titles
|
|
62
|
+
writer.writerow(titles)
|
|
59
63
|
|
|
60
64
|
for era in (
|
|
61
65
|
sess.query(Era)
|
|
@@ -86,36 +90,33 @@ def content(user_id, contract_id, end_year, end_month, months):
|
|
|
86
90
|
exp_llfc_description = supply_source.llfc.description
|
|
87
91
|
imp_is_substation = imp_llfc_code = imp_llfc_description = None
|
|
88
92
|
|
|
89
|
-
vals =
|
|
90
|
-
era.imp_mpan_core,
|
|
91
|
-
era.exp_mpan_core,
|
|
92
|
-
chunk_start,
|
|
93
|
-
chunk_finish,
|
|
94
|
-
supply_source.energisation_status_code,
|
|
95
|
-
supply_source.gsp_group_code,
|
|
96
|
-
supply_source.dno_code,
|
|
97
|
-
era.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
93
|
+
vals = {
|
|
94
|
+
"imp_mpan_core": era.imp_mpan_core,
|
|
95
|
+
"exp_mpan_core": era.exp_mpan_core,
|
|
96
|
+
"start_date": chunk_start,
|
|
97
|
+
"finish_date": chunk_finish,
|
|
98
|
+
"energisation_status": supply_source.energisation_status_code,
|
|
99
|
+
"gsp_group": supply_source.gsp_group_code,
|
|
100
|
+
"dno": supply_source.dno_code,
|
|
101
|
+
"era_start": era.start_date,
|
|
102
|
+
"pc": supply_source.pc_code,
|
|
103
|
+
"meter_type": supply_source.meter_type_code,
|
|
104
|
+
"site_code": era.get_physical_site(sess).code,
|
|
105
|
+
"imp_is_substation": imp_is_substation,
|
|
106
|
+
"imp_llfc_code": imp_llfc_code,
|
|
107
|
+
"imp_llfc_description": imp_llfc_description,
|
|
108
|
+
"exp_is_substation": exp_is_substation,
|
|
109
|
+
"exp_llfc_code": exp_llfc_code,
|
|
110
|
+
"exp_llfc_description": exp_llfc_description,
|
|
111
|
+
}
|
|
105
112
|
|
|
106
113
|
vb_func(supply_source)
|
|
107
114
|
bill = supply_source.dc_bill
|
|
108
115
|
|
|
109
116
|
for title in bill_titles:
|
|
110
|
-
vals
|
|
111
|
-
if title in bill:
|
|
112
|
-
del bill[title]
|
|
117
|
+
vals[title] = bill.get(title)
|
|
113
118
|
|
|
114
|
-
for
|
|
115
|
-
vals.append(k)
|
|
116
|
-
vals.append(bill[k])
|
|
117
|
-
|
|
118
|
-
writer.writerow(csv_make_val(v) for v in vals)
|
|
119
|
+
writer.writerow(csv_make_val(vals.get(t)) for t in titles)
|
|
119
120
|
|
|
120
121
|
# Avoid long-running transactions
|
|
121
122
|
sess.rollback()
|
chellow/reports/report_87.py
CHANGED
|
@@ -83,37 +83,32 @@ def _process_era(
|
|
|
83
83
|
exp_llfc_description = data_source.llfc.description
|
|
84
84
|
imp_is_substation = imp_llfc_code = imp_llfc_description = None
|
|
85
85
|
|
|
86
|
-
vals =
|
|
87
|
-
data_source.mpan_core,
|
|
88
|
-
site.code,
|
|
89
|
-
site.name,
|
|
90
|
-
data_source.supplier_account,
|
|
91
|
-
data_source.start_date,
|
|
92
|
-
data_source.finish_date,
|
|
93
|
-
data_source.energisation_status_code,
|
|
94
|
-
data_source.gsp_group_code,
|
|
95
|
-
data_source.dno_code,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
86
|
+
vals = {
|
|
87
|
+
"mpan_core": data_source.mpan_core,
|
|
88
|
+
"site_code": site.code,
|
|
89
|
+
"site_name": site.name,
|
|
90
|
+
"account": data_source.supplier_account,
|
|
91
|
+
"from": data_source.start_date,
|
|
92
|
+
"to": data_source.finish_date,
|
|
93
|
+
"energisation_status": data_source.energisation_status_code,
|
|
94
|
+
"gsp_group": data_source.gsp_group_code,
|
|
95
|
+
"dno": data_source.dno_code,
|
|
96
|
+
"era_start": era.start_date,
|
|
97
|
+
"pc": data_source.pc_code,
|
|
98
|
+
"meter_type": data_source.meter_type_code,
|
|
99
|
+
"imp_is_substation": imp_is_substation,
|
|
100
|
+
"imp_llfc_code": imp_llfc_code,
|
|
101
|
+
"imp_llfc_description": imp_llfc_description,
|
|
102
|
+
"exp_is_substation": exp_is_substation,
|
|
103
|
+
"exp_llfc_code": exp_llfc_code,
|
|
104
|
+
"exp_llfc_description": exp_llfc_description,
|
|
105
|
+
}
|
|
103
106
|
|
|
104
107
|
vb_func(data_source)
|
|
105
108
|
bill = data_source.supplier_bill
|
|
106
109
|
for title in bill_titles:
|
|
107
110
|
if title in bill:
|
|
108
|
-
|
|
109
|
-
del bill[title]
|
|
110
|
-
else:
|
|
111
|
-
val = ""
|
|
112
|
-
vals.append(val)
|
|
113
|
-
|
|
114
|
-
for k in sorted(bill.keys()):
|
|
115
|
-
vals.append(k)
|
|
116
|
-
vals.append(str(bill[k]))
|
|
111
|
+
vals[title] = bill[title]
|
|
117
112
|
|
|
118
113
|
return vals
|
|
119
114
|
|
|
@@ -163,6 +158,9 @@ def create_csv(f, sess, start_date, finish_date, contract_id):
|
|
|
163
158
|
"energisation_status",
|
|
164
159
|
"gsp_group",
|
|
165
160
|
"dno",
|
|
161
|
+
"era_start",
|
|
162
|
+
"pc",
|
|
163
|
+
"meter_type",
|
|
166
164
|
"imp_is_substation",
|
|
167
165
|
"imp_llfc_code",
|
|
168
166
|
"imp_llfc_description",
|
|
@@ -170,7 +168,8 @@ def create_csv(f, sess, start_date, finish_date, contract_id):
|
|
|
170
168
|
"exp_llfc_code",
|
|
171
169
|
"exp_llfc_description",
|
|
172
170
|
]
|
|
173
|
-
|
|
171
|
+
titles = header_titles + bill_titles
|
|
172
|
+
writer.writerow(titles)
|
|
174
173
|
vb_func = contract_func(caches, contract, "virtual_bill")
|
|
175
174
|
|
|
176
175
|
for month_start, month_finish in month_pairs:
|
|
@@ -201,7 +200,7 @@ def create_csv(f, sess, start_date, finish_date, contract_id):
|
|
|
201
200
|
period_finish,
|
|
202
201
|
era,
|
|
203
202
|
)
|
|
204
|
-
writer.writerow(csv_make_val(
|
|
203
|
+
writer.writerow(csv_make_val(vals.get(t)) for t in titles)
|
|
205
204
|
except BadRequest as e:
|
|
206
205
|
raise BadRequest(
|
|
207
206
|
f"Problem with {chellow.utils.url_root}eras/{era.id}/edit "
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: chellow
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1720006293.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)
|
|
@@ -74,7 +74,7 @@ chellow/reports/report_181.py,sha256=mCL6vXfrj8r0kL-LilDS0SnSu5tJOzCq7eMJVx9zpEw
|
|
|
74
74
|
chellow/reports/report_183.py,sha256=DZX-hHJPl_Tbgkt31C_cuLZg_5L2b6iCPQ5foOZizR0,8817
|
|
75
75
|
chellow/reports/report_187.py,sha256=UvpaYHjyJFNV5puYq8_KxfzoBtVrwFgIGUOmC5oGA9A,9956
|
|
76
76
|
chellow/reports/report_219.py,sha256=cA0lfJKnJg41Zc4_gZB1KUXZ9JeJo0TiTlu5jm1bdDM,7158
|
|
77
|
-
chellow/reports/report_231.py,sha256=
|
|
77
|
+
chellow/reports/report_231.py,sha256=uhO1algP7sibpZVaniqGs56HOCPCQeDO-Y-UfvFQwnI,5311
|
|
78
78
|
chellow/reports/report_233.py,sha256=cIatj-HHYW_GNIRsji-DlsmYjt8rUdm_5xujPLOYL8U,4537
|
|
79
79
|
chellow/reports/report_241.py,sha256=AlFmSHnfG2HWv_ICmWX7fNpPwLHjq7mo1QtOTjSKO3k,5384
|
|
80
80
|
chellow/reports/report_247.py,sha256=ozgCcee8XeqYbOpZCyU2STJKaz6h2x7TYQogagTaYLw,46626
|
|
@@ -85,8 +85,8 @@ chellow/reports/report_387.py,sha256=kmBZopb0AOivcowO2nPjRj6LnV0_QjCDXLwqPL7IGVE
|
|
|
85
85
|
chellow/reports/report_41.py,sha256=QQeTshA1Og7N3wPaoZ8ynJzwsvZ1mgSFc7DDkVqIZoM,7447
|
|
86
86
|
chellow/reports/report_429.py,sha256=0GCc0rQnOSG0fusw69yMMOCxnWApBd3P2sGWIg1py9M,12359
|
|
87
87
|
chellow/reports/report_59.py,sha256=CCFPUspUFgoMt6sMFsdtLYW-inA9rN6D-6Kted6vskA,45458
|
|
88
|
-
chellow/reports/report_81.py,sha256=
|
|
89
|
-
chellow/reports/report_87.py,sha256=
|
|
88
|
+
chellow/reports/report_81.py,sha256=f7sKPZUbl2VDbDHIg7B5rMDxcx_xnV1Y6PbjJyiTPLA,5609
|
|
89
|
+
chellow/reports/report_87.py,sha256=j2gdBOapaVY1ZnlNlw14RPx58_k8eUkc3oRSnKuCsNA,7057
|
|
90
90
|
chellow/reports/report_asset_comparison.py,sha256=UN298MHuzyUDUiiZr7F_Ua6SrdVOlFLjgKjnIbrA-14,6118
|
|
91
91
|
chellow/reports/report_batches.py,sha256=7O5TcB9W1sPKS0LQMsC6sUDzx73X5iyoZE0O3zK91zs,4798
|
|
92
92
|
chellow/reports/report_bills.py,sha256=AHW6tiZAOE0gXDfencPvemE4zqK6eTqfN8_bWQ4RT5o,3323
|
|
@@ -364,6 +364,6 @@ chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1
|
|
|
364
364
|
chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
|
|
365
365
|
chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
|
|
366
366
|
chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
|
|
367
|
-
chellow-
|
|
368
|
-
chellow-
|
|
369
|
-
chellow-
|
|
367
|
+
chellow-1720006293.0.0.dist-info/METADATA,sha256=4Fg3yXTfYZ7JKwEwREZI72dTqsSTGAwudXblzYPbCUY,12205
|
|
368
|
+
chellow-1720006293.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
369
|
+
chellow-1720006293.0.0.dist-info/RECORD,,
|
|
File without changes
|