chellow 1761300128.0.0__py3-none-any.whl → 1761318293.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.

@@ -106,6 +106,9 @@ ELEMENT_MAP = {
106
106
  "091890": ("shape", "rate", "kwh"),
107
107
  "122568": ("nrg-msp", "rate", "kwh"),
108
108
  },
109
+ "R10001": {
110
+ "700285": ("standing", "rate", "days"),
111
+ },
109
112
  },
110
113
  "REN": {
111
114
  "REN001": {
@@ -688,8 +688,8 @@ def _process_period(
688
688
 
689
689
  for elname, val_elem in val_elems.items():
690
690
  for part_name, part in val_elem["parts"].items():
691
- virtual_part = part.get("virtual", 0)
692
- actual_part = part.get("actual", 0)
691
+ virtual_part = part.get("virtual")
692
+ actual_part = part.get("actual")
693
693
  if isinstance(virtual_part, set) and len(virtual_part) == 1:
694
694
  virtual_part = next(iter(virtual_part))
695
695
  if isinstance(actual_part, set) and len(actual_part) == 1:
@@ -697,12 +697,16 @@ def _process_period(
697
697
 
698
698
  if virtual_part is None or actual_part is None:
699
699
  diff = None
700
+ passed = "❔"
700
701
  elif isinstance(virtual_part, Number) and isinstance(actual_part, Number):
701
702
  diff = float(actual_part) - float(virtual_part)
703
+ passed = "✅" if diff == 0 else "❌"
702
704
  else:
703
- diff = "✔" if virtual_part == actual_part else "❌"
705
+ diff = None
706
+ passed = "✅" if virtual_part == actual_part else "❌"
704
707
 
705
708
  part["difference"] = diff
709
+ part["passed"] = passed
706
710
 
707
711
  if first_era is None:
708
712
  site = None
@@ -120,81 +120,6 @@
120
120
  </table>
121
121
 
122
122
  <section class="elements">
123
- <!--
124
- <table>
125
- <caption>GBP</caption>
126
- <thead>
127
- <tr>
128
- <th>Part</th>
129
- <th>Covered</th>
130
- <th>Virtual</th>
131
- <th>Difference</th>
132
- </tr>
133
- </thead>
134
- <tbody>
135
- <tr>
136
- <td>gross</td>
137
- <td>
138
- {% if 'covered-gross-gbp' in data and data['covered-gross-gbp'] is number %}
139
- {{"{:0,.2f}".format(data['covered-gross-gbp'])}}
140
- {% endif %}
141
- </td>
142
- <td>
143
- {% if 'virtual-gross-gbp' in data and data['virtual-gross-gbp'] is number %}
144
- {{"{:0,.2f}".format(data['virtual-gross-gbp'])}}
145
- {% endif %}
146
- </td>
147
- <td>
148
- {% if 'difference-gross-gbp' in data and data['difference-gross-gbp'] is number %}
149
- {{"{:0,.2f}".format(data['difference-gross-gbp'])}}
150
- {% endif %}
151
- </td>
152
- </tr>
153
- <tr>
154
- <td>net</td>
155
- <td>
156
- {% if 'covered-net-gbp' in data and data['covered-net-gbp'] is number %}
157
- {{"{:0,.2f}".format(data['covered-net-gbp'])}}</td>
158
- {% endif %}
159
- <td>
160
- {% if 'virtual-net-gbp' in data and data['virtual-net-gbp'] is number %}
161
- {{"{:0,.2f}".format(data['virtual-net-gbp'])}}</td>
162
- {% endif %}
163
- <td>
164
- {% if 'difference-net-gbp' in data and data['difference-net-gbp'] is number %}
165
- {{"{:0,.2f}".format(data['difference-net-gbp'])}}</td>
166
- {% endif %}
167
- </tr>
168
- <tr>
169
- <td>vat</td>
170
- <td>
171
- {% if 'covered-vat-gbp' in data and data['covered-vat-gbp'] is number %}
172
- {{"{:0,.2f}".format(data['covered-vat-gbp'])}}</td>
173
- {% endif %}
174
- <td>
175
- {% if 'virtual-vat-gbp' in data and data['virtual-vat-gbp'] is number %}
176
- {{"{:0,.2f}".format(data['virtual-vat-gbp'])}}</td>
177
- {% endif %}
178
- <td>
179
- {% if 'difference-vat-gbp' in data and data['difference-vat-gbp'] is number %}
180
- {{"{:0,.2f}".format(data['difference-vat-gbp'])}}</td>
181
- {% endif %}
182
- </tr>
183
- <tr>
184
- <td>vat-rate</td>
185
- <td>
186
- {{data['covered-vat-rate']}}</td>
187
- <td>{{data['virtual-vat-rate']}}</td>
188
- <td>
189
- {% if data['difference-vat-rate'] is number %}
190
- {{"{:0,.2f}".format(data['difference-vat-rate'])}}
191
- {% endif %}
192
- </td>
193
- </tr>
194
- </tbody>
195
- </table>
196
- -->
197
-
198
123
  {% for table in tables %}
199
124
  {% set element = data['elements'][table] %}
200
125
  {% set parts = element['parts'] %}
@@ -208,6 +133,7 @@
208
133
  <th>Actual</th>
209
134
  <th>Virtual</th>
210
135
  <th>Difference</th>
136
+ <th>Passed</th>
211
137
  </tr>
212
138
  </thead>
213
139
  <tbody>
@@ -243,13 +169,25 @@
243
169
  {% endif %}
244
170
  {% if val is none %}
245
171
  {% elif val is number %}
246
- {{"{:0,.2f}".format(val)}}
172
+ {% if part_name in ('kwh', 'kvarh') or part_name.endswith('-kwh') %}
173
+ {{"{:0,.1f}".format(val)}}
174
+ {% elif part_name.endswith('-kw') %}
175
+ {{"{:0,.2f}".format(val)}}
176
+ {% else %}
177
+ {{val}}
178
+ {% endif %}
247
179
  {% elif (val is string) or (val is boolean) %}
248
180
  {{val}}
249
181
  {% else %}
250
182
  {% for v in val %}
251
183
  {% if v is number %}
252
- {{"{:0,.2f}".format(v)}}
184
+ {% if part_name in ('kwh', 'kvarh') or part_name.endswith('-kwh') %}
185
+ {{"{:0,.1f}".format(v)}}
186
+ {% elif part_name.endswith('-kw') %}
187
+ {{"{:0,.2f}".format(v)}}
188
+ {% else %}
189
+ {{v}}
190
+ {% endif %}
253
191
  {% else %}
254
192
  {{v}}
255
193
  {% endif %}
@@ -260,6 +198,7 @@
260
198
  {% endif %}
261
199
  </td>
262
200
  {% endfor %}
201
+ <td>{{part['passed']}}</td>
263
202
  </tr>
264
203
  {% endif %}
265
204
  {% endfor %}
chellow/views.py CHANGED
@@ -1416,7 +1416,7 @@ def report_run_get(run_id):
1416
1416
  )
1417
1417
  if element == "problem":
1418
1418
  order_by = (
1419
- ReportRunRow.data["data"]["problem"].as_string(),
1419
+ ReportRunRow.data["data"]["problem"].as_string().desc(),
1420
1420
  func.abs(
1421
1421
  func.coalesce(
1422
1422
  ReportRunRow.data["data"]["difference_net_gbp"].as_float(), 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chellow
3
- Version: 1761300128.0.0
3
+ Version: 1761318293.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)
@@ -12,7 +12,7 @@ chellow/rate_server.py,sha256=RwJo-AzBIdzxx7PAtboZEUH1nUjAeJckw0bk06-9oyM,5672
12
12
  chellow/rrun.py,sha256=sWm_tuJ_6xH3T28TY1w63k1Q44N_S_p_pYF5YCeztqU,2226
13
13
  chellow/testing.py,sha256=Dj2c1NX8lVlygueOrh2eyYawLW6qKEHxNhXVVUaNRO0,3637
14
14
  chellow/utils.py,sha256=x6yReQkhFaFGnsuhs6PqrEkE1OfZSPrrC7IqstRXKKU,19701
15
- chellow/views.py,sha256=9IUUbYjqEmQQzbYQB4w-ygCo25gecIxYVbxTXRF-YfY,86078
15
+ chellow/views.py,sha256=Qk8XFG2mnOIJB4MdFkcwS_ItehgWpSzr7kaNyYxC5RM,86085
16
16
  chellow/e/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  chellow/e/aahedc.py,sha256=d2usudp7KYWpU6Pk3fal5EQ47EbvkvKeaFGylnb3NWw,606
18
18
  chellow/e/bill_importer.py,sha256=mEW4s_P5tp81uf1cYWCKcr5DW1EkeRi0JUHy9caz5mI,10353
@@ -50,7 +50,7 @@ chellow/e/bill_parsers/activity_mop_stark_xlsx.py,sha256=hcbjxqLOe7qkDjS7enCpmfy
50
50
  chellow/e/bill_parsers/annual_mop_stark_xlsx.py,sha256=yoEGQS0qcrv3TWFfxELIIi8f1CyKcIzh0xVaPoz2w2s,4191
51
51
  chellow/e/bill_parsers/bgb_edi.py,sha256=GuwHeYbAGk7BVg5n19FcTANFDyKI-y0z3f9niQaPSSw,4828
52
52
  chellow/e/bill_parsers/csv.py,sha256=mLwGaEkLIygBg8Zl5aHs--GurHh1RPPGlF4g6nWAp1Q,5965
53
- chellow/e/bill_parsers/drax_edi.py,sha256=z1skUO7hd62T2sfGCGDhMUyGJCN-w7mr8PhlRzrzShg,14162
53
+ chellow/e/bill_parsers/drax_edi.py,sha256=nkJtLnBImXWu4LYCaQqyo7-Ls7rlYyITyLd8Zk_cx-k,14245
54
54
  chellow/e/bill_parsers/edf_export_xlsx.py,sha256=J4lY8epiSTIePZ6D1SGD76TXRoev35KrUC2sjHkNqlE,6632
55
55
  chellow/e/bill_parsers/engie_edi.py,sha256=4KAyZpQrZhhGLM7WLZS1z8rOn5A8HgwBBvr5Jkf6cxE,12579
56
56
  chellow/e/bill_parsers/engie_export_xlsx.py,sha256=oZO0qHdDlOxjJ6J5Ate82CkAoX4bxed1EJyUKHxBcpk,4690
@@ -78,7 +78,7 @@ chellow/gas/transportation.py,sha256=uWFh0v-ViA02nH9Vof9JG3PiyAPXwhYZ1SvPxuzsQ0I
78
78
  chellow/gas/views.py,sha256=GeCvi6BGTUN7bu7sVkypNckwG3Crl6AbUcRob9qMi0E,59733
79
79
  chellow/reports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
80
  chellow/reports/report_109.py,sha256=Exb-FQ5f70-ier_h15CgHGysQ7vJ7k3gFZ1001zM3iM,11171
81
- chellow/reports/report_111.py,sha256=LNrSqXb_oIShjWj5KewciAc2KCtOZiSIVr4lhZkif1I,26168
81
+ chellow/reports/report_111.py,sha256=lI-d-tT3GMfZzKpCtgaR7o5ySaDFOmD4qc9CFfr8wvY,26314
82
82
  chellow/reports/report_169.py,sha256=wortJyvgXTrnjjXhLzqwaksKKu63K5IgdzU5f4SkHMI,9246
83
83
  chellow/reports/report_181.py,sha256=ypfYWYVNC1X2fMlJyDzwNiNTTRrpPW49DirXE_xDKa0,4958
84
84
  chellow/reports/report_183.py,sha256=fGONpKEIXTqIT_3dE5jZKBIesWPgLq-chHO6X22dIv0,8768
@@ -152,7 +152,7 @@ chellow/templates/report_run_g_bill_check.html,sha256=tOXl_mjR__foYKiOYflJbK-459
152
152
  chellow/templates/report_run_missing_e_bills.html,sha256=l5idQhfaNhMvvzIRv-iqCpeDnYl_wgs6-mZMBOmuyR8,2447
153
153
  chellow/templates/report_run_monthly_duration_org.html,sha256=gGNGJ4Q50q4BtIMi98rhO-7NqRHcsFUmbj2qzeOLejw,1713
154
154
  chellow/templates/report_run_row.html,sha256=bmtcdqJaS1CXpL0i8PuqvmeF98jKNYX5-mnQu-OuDKQ,3791
155
- chellow/templates/report_run_row_bill_check.html,sha256=JzedUA9R4-0jnonnoluV7CYCnzGsSAPFQtEVgMt6GTc,8105
155
+ chellow/templates/report_run_row_bill_check.html,sha256=EDDIgtPbEtjjrSEw5wpuPVor8o-M7aO0fN7yu1WZ8mY,6482
156
156
  chellow/templates/report_run_row_g_bill_check.html,sha256=2Ym9mkwvA_DGDrgktDDwXQXlUK7tR2aR3gp3KUqMLoI,7017
157
157
  chellow/templates/report_run_supply_contacts.html,sha256=JNzwz9M6qbLRDMkCzFCxxANapUer5klxo7t5a48nAzg,2117
158
158
  chellow/templates/report_runs.html,sha256=ecoIkl2WtfYtifiTxnslmpMGYYGVQW-CVSBpqhXyiE4,1131
@@ -400,6 +400,6 @@ chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBe
400
400
  chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
401
401
  chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
402
402
  chellow/templates/reports/channel_snags.html,sha256=_aAgFgMlTkK2HuKFU8YisAIcUYfg6Hqhgyf5MZpdK8c,2629
403
- chellow-1761300128.0.0.dist-info/METADATA,sha256=P8R_gGwMFw4jdwYKRJX9X0ptfSwWCzDXCQBklJ9Arfo,12428
404
- chellow-1761300128.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
405
- chellow-1761300128.0.0.dist-info/RECORD,,
403
+ chellow-1761318293.0.0.dist-info/METADATA,sha256=tEhiVeVet3NH3UUtaV6iNlZm2pHTlCSng3JxIdv3vj4,12428
404
+ chellow-1761318293.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
405
+ chellow-1761318293.0.0.dist-info/RECORD,,