chellow 1724227131.0.0__py3-none-any.whl → 1724313988.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.
chellow/e/cfd.py
CHANGED
|
@@ -225,46 +225,35 @@ def import_operational_costs_levy(sess, log, set_progress, s):
|
|
|
225
225
|
RUN_TYPES = ("II", "SF", "R1", "R2", "R3", "RF", "DF")
|
|
226
226
|
|
|
227
227
|
|
|
228
|
-
def
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
runs = {}
|
|
244
|
-
|
|
245
|
-
settlement_run_type = record["Settlement_Run_Type"]
|
|
246
|
-
runs[settlement_run_type] = record
|
|
247
|
-
prev_settlement_date = settlement_date
|
|
248
|
-
|
|
249
|
-
yield settlement_date, runs
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
def _reconciled_daily_quarters(log, s, search_from):
|
|
253
|
-
quarter = {}
|
|
254
|
-
for settlement_date, lcc_runs in _reconciled_days(log, s, search_from):
|
|
255
|
-
try:
|
|
256
|
-
runs = quarter[settlement_date]
|
|
257
|
-
except KeyError:
|
|
258
|
-
runs = quarter[settlement_date] = {}
|
|
228
|
+
def _reconciled_quarters(log, s, search_from):
|
|
229
|
+
quarters = {}
|
|
230
|
+
|
|
231
|
+
for record in api_records(log, s, "e0e163cb-ba36-416d-83fe-976992d61516"):
|
|
232
|
+
settlement_date = _parse_date(record["Settlement_Date"])
|
|
233
|
+
if settlement_date > search_from:
|
|
234
|
+
settlement_date_ct = to_ct(settlement_date)
|
|
235
|
+
quarter_start_ct_month = int((settlement_date_ct.month - 1) / 3) * 3 + 1
|
|
236
|
+
quarter_start = to_utc(
|
|
237
|
+
ct_datetime(settlement_date_ct.year, quarter_start_ct_month, 1)
|
|
238
|
+
)
|
|
239
|
+
try:
|
|
240
|
+
quarter = quarters[quarter_start]
|
|
241
|
+
except KeyError:
|
|
242
|
+
quarter = quarters[quarter_start] = {}
|
|
259
243
|
|
|
260
|
-
|
|
261
|
-
|
|
244
|
+
try:
|
|
245
|
+
day = quarter[settlement_date]
|
|
246
|
+
except KeyError:
|
|
247
|
+
day = quarter[settlement_date] = {}
|
|
262
248
|
|
|
263
|
-
|
|
249
|
+
settlement_run_type = record["Settlement_Run_Type"]
|
|
250
|
+
day[settlement_run_type] = record
|
|
264
251
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
252
|
+
# Only return complate quarters
|
|
253
|
+
if len(quarters) > 0:
|
|
254
|
+
last_start = sorted(quarters.keys())[-1]
|
|
255
|
+
del quarters[last_start]
|
|
256
|
+
return quarters
|
|
268
257
|
|
|
269
258
|
|
|
270
259
|
def import_reconciled_daily_levy_rates(sess, log, set_progress, s):
|
|
@@ -277,7 +266,7 @@ def import_reconciled_daily_levy_rates(sess, log, set_progress, s):
|
|
|
277
266
|
sess, contract_name, "", {}, to_utc(ct_datetime(1996, 4, 1)), None, {}
|
|
278
267
|
)
|
|
279
268
|
|
|
280
|
-
search_from =
|
|
269
|
+
search_from = to_utc(ct_datetime(1996, 4, 1))
|
|
281
270
|
for rs in sess.scalars(
|
|
282
271
|
select(RateScript)
|
|
283
272
|
.where(RateScript.contract == contract)
|
|
@@ -305,12 +294,12 @@ def import_reconciled_daily_levy_rates(sess, log, set_progress, s):
|
|
|
305
294
|
day_ct += relativedelta(days=1)
|
|
306
295
|
|
|
307
296
|
if complete:
|
|
308
|
-
search_from = quarter_finish_ct
|
|
297
|
+
search_from = to_utc(quarter_finish_ct)
|
|
309
298
|
else:
|
|
310
299
|
break
|
|
311
300
|
|
|
312
|
-
for quarter in
|
|
313
|
-
|
|
301
|
+
for quarter_start, quarter in _reconciled_quarters(log, s, search_from).items():
|
|
302
|
+
|
|
314
303
|
rs = sess.execute(
|
|
315
304
|
select(RateScript).where(
|
|
316
305
|
RateScript.contract == contract,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: chellow
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1724313988.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)
|
|
@@ -18,7 +18,7 @@ chellow/e/bill_importer.py,sha256=7UcnqNlKbJc2GhW9gy8sDp9GuqambJVpZLvbafOZztA,74
|
|
|
18
18
|
chellow/e/bmarketidx.py,sha256=C0BaHn2RxIuWH2QzA-OmSP0fbUGvW9tqEUhLnzOEdmA,7968
|
|
19
19
|
chellow/e/bsuos.py,sha256=hdP9vnOJSuZl46OAkJeUg1XJYvYIBj4J6Sqce1Hy9Vs,15542
|
|
20
20
|
chellow/e/ccl.py,sha256=30dh_SvlgzsTQPPAJNZWILaMvbeDsv9-P-S1JxS5_SQ,3184
|
|
21
|
-
chellow/e/cfd.py,sha256=
|
|
21
|
+
chellow/e/cfd.py,sha256=Gm435c42LFwZx1n-1UY1Tdx6mL1is7E0vRLWQe8RPOo,14184
|
|
22
22
|
chellow/e/computer.py,sha256=CoYf9SA8zrh1NP_S1jKsfXsaBm5kFcjBbtPUJnx8M9A,67274
|
|
23
23
|
chellow/e/dno_rate_parser.py,sha256=A5TP6KjyfT5lVWh7dX4SiXRi6wnf2lGv-H_T4Sod8CI,21731
|
|
24
24
|
chellow/e/duos.py,sha256=nwviRjz-qIt3GxIMHk0hItIT4dtKsxOWq9TUC1z-hO8,30864
|
|
@@ -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-1724313988.0.0.dist-info/METADATA,sha256=t9QpJIWe-EWi4KGZqjLBITe47y-OEcQpgZcSWnG5wg4,12241
|
|
369
|
+
chellow-1724313988.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
370
|
+
chellow-1724313988.0.0.dist-info/RECORD,,
|
|
File without changes
|