chellow 1716366171.0.0__py3-none-any.whl → 1716370405.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_59.py
CHANGED
|
@@ -486,7 +486,45 @@ def _process_site(
|
|
|
486
486
|
.all()
|
|
487
487
|
)
|
|
488
488
|
if len(bills) > 0:
|
|
489
|
-
|
|
489
|
+
imp_supplier_contract = last_era.imp_supplier_contract
|
|
490
|
+
imp_supplier_contract_name = (
|
|
491
|
+
None
|
|
492
|
+
if imp_supplier_contract is None
|
|
493
|
+
else imp_supplier_contract.name
|
|
494
|
+
)
|
|
495
|
+
exp_supplier_contract = last_era.exp_supplier_contract
|
|
496
|
+
exp_supplier_contract_name = (
|
|
497
|
+
None
|
|
498
|
+
if exp_supplier_contract is None
|
|
499
|
+
else exp_supplier_contract.name
|
|
500
|
+
)
|
|
501
|
+
era_associates = {
|
|
502
|
+
s.site.code for s in last_era.site_eras if not s.is_physical
|
|
503
|
+
}
|
|
504
|
+
vals = {
|
|
505
|
+
"creation-date": now,
|
|
506
|
+
"start-date": chunk_start,
|
|
507
|
+
"finish-date": chunk_finish,
|
|
508
|
+
"imp-mpan-core": last_era.imp_mpan_core,
|
|
509
|
+
"exp-mpan-core": last_era.exp_mpan_core,
|
|
510
|
+
"site-code": site.code,
|
|
511
|
+
"site-name": site.name,
|
|
512
|
+
"associated-site-codes": era_associates,
|
|
513
|
+
"era-start-date": None,
|
|
514
|
+
"era-finish-date": None,
|
|
515
|
+
"imp-supplier-contract": imp_supplier_contract_name,
|
|
516
|
+
"imp-non-actual-hhs": None,
|
|
517
|
+
"imp-non-actual-kwh": None,
|
|
518
|
+
"exp-supplier-contract": exp_supplier_contract_name,
|
|
519
|
+
"exp-non-actual-hhs": None,
|
|
520
|
+
"exp-non-actual-kwh": None,
|
|
521
|
+
"metering-type": last_era.meter_category,
|
|
522
|
+
"source": last_era.supply.source.code,
|
|
523
|
+
"generator-type": None,
|
|
524
|
+
"supply-name": last_era.supply.name,
|
|
525
|
+
"msn": last_era.msn,
|
|
526
|
+
"pc": last_era.pc.code,
|
|
527
|
+
}
|
|
490
528
|
for name in (
|
|
491
529
|
"import-net",
|
|
492
530
|
"export-net",
|
|
@@ -500,10 +538,10 @@ def _process_site(
|
|
|
500
538
|
"billed-import-net",
|
|
501
539
|
):
|
|
502
540
|
for sname in ("kwh", "gbp"):
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
541
|
+
vals[name + "-" + sname] = 0
|
|
542
|
+
vals["billed-supplier-import-net-gbp"] = 0
|
|
543
|
+
vals["billed-dc-import-net-gbp"] = 0
|
|
544
|
+
vals["billed-mop-import-net-gbp"] = 0
|
|
507
545
|
|
|
508
546
|
for bill in bills:
|
|
509
547
|
bill_role_code = bill.batch.contract.market_role.code
|
|
@@ -528,42 +566,12 @@ def _process_site(
|
|
|
528
566
|
else:
|
|
529
567
|
raise BadRequest("Role code not recognized.")
|
|
530
568
|
|
|
531
|
-
for data in
|
|
569
|
+
for data in vals, site_data:
|
|
532
570
|
data["billed-import-net-kwh"] += bill_prop_kwh
|
|
533
571
|
data["billed-import-net-gbp"] += bill_prop_gbp
|
|
534
572
|
data[key] += bill_prop_gbp
|
|
535
573
|
|
|
536
|
-
|
|
537
|
-
exp_supplier_contract = last_era.exp_supplier_contract
|
|
538
|
-
out = [
|
|
539
|
-
now,
|
|
540
|
-
last_era.imp_mpan_core,
|
|
541
|
-
(
|
|
542
|
-
None
|
|
543
|
-
if imp_supplier_contract is None
|
|
544
|
-
else imp_supplier_contract.name
|
|
545
|
-
),
|
|
546
|
-
last_era.exp_mpan_core,
|
|
547
|
-
(
|
|
548
|
-
None
|
|
549
|
-
if exp_supplier_contract is None
|
|
550
|
-
else exp_supplier_contract.name
|
|
551
|
-
),
|
|
552
|
-
chunk_start,
|
|
553
|
-
last_era.meter_category,
|
|
554
|
-
last_era.supply.source.code,
|
|
555
|
-
None,
|
|
556
|
-
last_era.supply.name,
|
|
557
|
-
last_era.msn,
|
|
558
|
-
last_era.pc.code,
|
|
559
|
-
site.code,
|
|
560
|
-
site.name,
|
|
561
|
-
None,
|
|
562
|
-
start_date,
|
|
563
|
-
finish_date,
|
|
564
|
-
] + [month_data[t] for t in summary_titles]
|
|
565
|
-
|
|
566
|
-
era_rows.append([make_val(v) for v in out])
|
|
574
|
+
era_rows.append([make_val(vals.get(t)) for t in era_titles])
|
|
567
575
|
first_era = (
|
|
568
576
|
sess.execute(
|
|
569
577
|
select(Era).where(Era.supply == supply).order_by(Era.start_date)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: chellow
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1716370405.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)
|
|
@@ -20,7 +20,7 @@ Requires-Dist: pympler==1.0.1
|
|
|
20
20
|
Requires-Dist: pypdf==3.17.0
|
|
21
21
|
Requires-Dist: python-dateutil==2.8.2
|
|
22
22
|
Requires-Dist: pytz==2022.6
|
|
23
|
-
Requires-Dist: requests==2.
|
|
23
|
+
Requires-Dist: requests==2.32.2
|
|
24
24
|
Requires-Dist: sqlalchemy==2.0.28
|
|
25
25
|
Requires-Dist: waitress==2.1.2
|
|
26
26
|
Requires-Dist: xlrd==2.0.1
|
|
@@ -84,7 +84,7 @@ chellow/reports/report_33.py,sha256=laVz-itDbJTdvC6LxLEeuY0eKpYx43Un4adiExPTEEE,
|
|
|
84
84
|
chellow/reports/report_387.py,sha256=KcClrEOK5IRvePp0Jgbzs1Gwf-_CqYmEtFFlXrr_Z3E,5670
|
|
85
85
|
chellow/reports/report_41.py,sha256=QQeTshA1Og7N3wPaoZ8ynJzwsvZ1mgSFc7DDkVqIZoM,7447
|
|
86
86
|
chellow/reports/report_429.py,sha256=0GCc0rQnOSG0fusw69yMMOCxnWApBd3P2sGWIg1py9M,12359
|
|
87
|
-
chellow/reports/report_59.py,sha256=
|
|
87
|
+
chellow/reports/report_59.py,sha256=CCFPUspUFgoMt6sMFsdtLYW-inA9rN6D-6Kted6vskA,45458
|
|
88
88
|
chellow/reports/report_81.py,sha256=UYr0Dm4TmCCYUbIWw3hWNI0GdQRhH27vwVk3Ytdsrcg,5288
|
|
89
89
|
chellow/reports/report_87.py,sha256=ZadBo40rUORN0Fi926-dDHeTFn6L-fBzp3b4k7v5MdY,6802
|
|
90
90
|
chellow/reports/report_asset_comparison.py,sha256=UN298MHuzyUDUiiZr7F_Ua6SrdVOlFLjgKjnIbrA-14,6118
|
|
@@ -364,6 +364,6 @@ chellow/templates/g/supply_note_edit.html,sha256=6UQf_qbhFDys3cVsTp-c7ABWZpggW9R
|
|
|
364
364
|
chellow/templates/g/supply_notes.html,sha256=WR3YwGh_qqTklSJ7JqWX6BKBc9rk_jMff4RiWZiF2CM,936
|
|
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-1716370405.0.0.dist-info/METADATA,sha256=TuaScYTcnRt-YAdvw014lKjfOAS9GaelicnQ1FPdkjI,12205
|
|
368
|
+
chellow-1716370405.0.0.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
|
369
|
+
chellow-1716370405.0.0.dist-info/RECORD,,
|
|
File without changes
|