chellow 1759411815.0.0__py3-none-any.whl → 1759823276.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/general_import.py +64 -41
- chellow/templates/general_imports.html +7 -0
- {chellow-1759411815.0.0.dist-info → chellow-1759823276.0.0.dist-info}/METADATA +4 -5
- {chellow-1759411815.0.0.dist-info → chellow-1759823276.0.0.dist-info}/RECORD +5 -5
- {chellow-1759411815.0.0.dist-info → chellow-1759823276.0.0.dist-info}/WHEEL +0 -0
chellow/general_import.py
CHANGED
|
@@ -942,47 +942,70 @@ def general_import_bill(sess, action, vals, args):
|
|
|
942
942
|
supply,
|
|
943
943
|
)
|
|
944
944
|
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
945
|
+
i = 15
|
|
946
|
+
while i < len(vals):
|
|
947
|
+
typ = add_arg(args, "read or element", vals, i)
|
|
948
|
+
if typ == "read":
|
|
949
|
+
msn = add_arg(args, "Meter Serial Number", vals, i + 1)
|
|
950
|
+
mpan_str = add_arg(args, "MPAN", vals, i + 2)
|
|
951
|
+
coefficient_str = add_arg(args, "Coefficient", vals, i + 3)
|
|
952
|
+
coefficient = Decimal(coefficient_str)
|
|
953
|
+
units = add_arg(args, "Units", vals, i + 4)
|
|
954
|
+
tpr_code = add_arg(args, "TPR", vals, i + 5)
|
|
955
|
+
if len(tpr_code) > 0:
|
|
956
|
+
tpr = Tpr.get_by_code(sess, tpr_code)
|
|
957
|
+
else:
|
|
958
|
+
tpr = None
|
|
959
|
+
|
|
960
|
+
prev_date_str = add_arg(args, "Previous Date", vals, i + 6)
|
|
961
|
+
prev_date = parse_hh_start(prev_date_str)
|
|
962
|
+
prev_value_str = add_arg(args, "Previous Value", vals, i + 7)
|
|
963
|
+
prev_value = Decimal(prev_value_str)
|
|
964
|
+
|
|
965
|
+
prev_type_str = add_arg(args, "Previous Type", vals, i + 8)
|
|
966
|
+
prev_type = ReadType.get_by_code(sess, prev_type_str)
|
|
967
|
+
|
|
968
|
+
pres_date_str = add_arg(args, "Present Date", vals, i + 9)
|
|
969
|
+
pres_date = parse_hh_start(pres_date_str)
|
|
970
|
+
pres_value_str = add_arg(args, "Present Value", vals, i + 10)
|
|
971
|
+
pres_value = Decimal(pres_value_str)
|
|
972
|
+
|
|
973
|
+
pres_type_str = add_arg(args, "Present Type", vals, i + 11)
|
|
974
|
+
pres_type = ReadType.get_by_code(sess, pres_type_str)
|
|
975
|
+
bill.insert_read(
|
|
976
|
+
sess,
|
|
977
|
+
tpr,
|
|
978
|
+
coefficient,
|
|
979
|
+
units,
|
|
980
|
+
msn,
|
|
981
|
+
mpan_str,
|
|
982
|
+
prev_date,
|
|
983
|
+
prev_value,
|
|
984
|
+
prev_type,
|
|
985
|
+
pres_date,
|
|
986
|
+
pres_value,
|
|
987
|
+
pres_type,
|
|
988
|
+
)
|
|
989
|
+
i += 12
|
|
990
|
+
elif typ == "element":
|
|
991
|
+
name = add_arg(args, "Name", vals, i + 1)
|
|
992
|
+
start_date_str = add_arg(args, "Start Date", vals, i + 2)
|
|
993
|
+
start_date = parse_hh_start(start_date_str)
|
|
994
|
+
finish_date_str = add_arg(args, "Finish Date", vals, i + 3)
|
|
995
|
+
finish_date = parse_hh_start(finish_date_str)
|
|
996
|
+
net_str = add_arg(args, "Net", vals, i + 4)
|
|
997
|
+
net = Decimal(net_str)
|
|
998
|
+
breakdown_str = add_arg(args, "Breakdown", vals, i + 5)
|
|
999
|
+
breakdown = _parse_breakdown(breakdown_str)
|
|
1000
|
+
bill.insert_element(
|
|
1001
|
+
sess,
|
|
1002
|
+
name,
|
|
1003
|
+
start_date,
|
|
1004
|
+
finish_date,
|
|
1005
|
+
net,
|
|
1006
|
+
breakdown,
|
|
1007
|
+
)
|
|
1008
|
+
i += 6
|
|
986
1009
|
|
|
987
1010
|
elif action == "update":
|
|
988
1011
|
bill_id_str = add_arg(args, "Bill Id", vals, 0)
|
|
@@ -306,6 +306,7 @@
|
|
|
306
306
|
<td>Type</td>
|
|
307
307
|
<td>Breakdown</td>
|
|
308
308
|
<td>Kwh</td>
|
|
309
|
+
<td>'read' or 'element'</td>
|
|
309
310
|
<td>(Meter Serial Number</td>
|
|
310
311
|
<td>Mpan</td>
|
|
311
312
|
<td>Coefficient</td>
|
|
@@ -317,6 +318,12 @@
|
|
|
317
318
|
<td>Present Date</td>
|
|
318
319
|
<td>Present Value</td>
|
|
319
320
|
<td>Present Type)*</td>
|
|
321
|
+
<td>'read' or 'element'</td>
|
|
322
|
+
<td>(Name</td>
|
|
323
|
+
<td>Start Date</td>
|
|
324
|
+
<td>Finish Date</td>
|
|
325
|
+
<td>Net</td>
|
|
326
|
+
<td>Breakdown)*</td>
|
|
320
327
|
</tr>
|
|
321
328
|
<tr>
|
|
322
329
|
<td><em>update</em></td>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chellow
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1759823276.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)
|
|
@@ -14,7 +14,7 @@ Requires-Dist: odio==0.0.23
|
|
|
14
14
|
Requires-Dist: openpyxl==3.1.5
|
|
15
15
|
Requires-Dist: paramiko==3.4.1
|
|
16
16
|
Requires-Dist: pep3143daemon==0.1.0
|
|
17
|
-
Requires-Dist: pg8000==1.31.
|
|
17
|
+
Requires-Dist: pg8000==1.31.5
|
|
18
18
|
Requires-Dist: pip>=9.0.1
|
|
19
19
|
Requires-Dist: psutil==5.9.5
|
|
20
20
|
Requires-Dist: pympler==1.0.1
|
|
@@ -47,7 +47,7 @@ Chellow is a web application for checking UK electricity and gas bills. It's des
|
|
|
47
47
|
for organizations with high electricity consumption. The software is hosted at
|
|
48
48
|
https://github.com/WessexWater/chellow.
|
|
49
49
|
|
|
50
|
-
[](https://github.com/WessexWater/chellow/workflows/chellow)
|
|
50
|
+
[](https://github.com/WessexWater/chellow/actions/workflows/chellow.yml)
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
## Installation
|
|
@@ -55,8 +55,7 @@ https://github.com/WessexWater/chellow.
|
|
|
55
55
|
Chellow is a Python web application that uses the PostgreSQL database. To install
|
|
56
56
|
Chellow, follow these steps:
|
|
57
57
|
|
|
58
|
-
* Install [PostgreSQL](http://www.postgresql.org/)
|
|
59
|
-
* Set the PostgreSQL time zone to 'UTC'.
|
|
58
|
+
* Install [PostgreSQL](http://www.postgresql.org/) 15
|
|
60
59
|
* Create a PostgreSQL database: `createdb --encoding=UTF8 chellow`
|
|
61
60
|
* Set up the following environment variables to configure Chellow:
|
|
62
61
|
|
|
@@ -5,7 +5,7 @@ chellow/commands.py,sha256=ESBe9ZWj1c3vdZgqMZ9gFvYAB3hRag2R1PzOwuw9yFo,1302
|
|
|
5
5
|
chellow/dloads.py,sha256=dixp-O0MF2_mlwrnKx3D9DH09Qu05BjTo0rZfigTjR4,5534
|
|
6
6
|
chellow/edi_lib.py,sha256=Lq70TUJuogoP5KGrphzUEUfyfgftEclg_iA3mpNAaDI,51324
|
|
7
7
|
chellow/fake_batch_updater.py,sha256=khAmvSUn9qN04w8C92kRg1UeyQvfLztE7QXv9tUz6nE,11611
|
|
8
|
-
chellow/general_import.py,sha256=
|
|
8
|
+
chellow/general_import.py,sha256=ghybbden66VT4q5J0vYwiNg-6G2vg71EgCN_x3fvhW0,69200
|
|
9
9
|
chellow/models.py,sha256=Ws3-jP6x3bSrCmv1umbviaQ3SijpP4R_a6i2Go26gRM,247072
|
|
10
10
|
chellow/national_grid.py,sha256=-c_vqNRtpNIQOcm0F1NDhS3_QUiOaLgEJYWzysSNc5Y,4369
|
|
11
11
|
chellow/proxy.py,sha256=cVXIktPlX3tQ1BYcwxq0nJXKE6r3DtFTtfFHPq55HaM,1351
|
|
@@ -128,7 +128,7 @@ chellow/templates/downloads.html,sha256=R9QPcFz-PLJOX7rDlmquIk-Hp9Iq-thzWCTfOexS
|
|
|
128
128
|
chellow/templates/edi_viewer.html,sha256=szUthgHOdph6Of-7f_1LeC_zYlNJaMeS5ctn6xTAeiM,1437
|
|
129
129
|
chellow/templates/fake_batch_updater.html,sha256=aRQbxtNUlIzxwgSUy2pr-Km5NbhZkse4WSBtlqFIJMg,1885
|
|
130
130
|
chellow/templates/general_import.html,sha256=9ezzieDjaPBZ0nUJkMkzoDxWVzYtr4D-Dr2UCA5xV8U,1370
|
|
131
|
-
chellow/templates/general_imports.html,sha256
|
|
131
|
+
chellow/templates/general_imports.html,sha256=h7UC7AWJ3Qw9PH8UPq24PqZ5xQF5b3Ct7LfC_PK78BE,13866
|
|
132
132
|
chellow/templates/home.html,sha256=7xiD6QLju3ugALzMlzTJosRyMUmQGWPK6jDF7oZbnAQ,5781
|
|
133
133
|
chellow/templates/input_date.html,sha256=rpgB5n0LfN8Y5djN_ZiuSxqdskxzCoKrEqI7hyJkVQo,1248
|
|
134
134
|
chellow/templates/local_report.html,sha256=pV7_0QwyQ-D3OS9LXrly5pq3qprZnwTCoq6vCnMTkS4,1332
|
|
@@ -399,6 +399,6 @@ chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1
|
|
|
399
399
|
chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
|
|
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
|
-
chellow-
|
|
403
|
-
chellow-
|
|
404
|
-
chellow-
|
|
402
|
+
chellow-1759823276.0.0.dist-info/METADATA,sha256=FByd2AG_PHGsgs27uxDhVTHa9U52X14rX8HGh4X7aVo,12500
|
|
403
|
+
chellow-1759823276.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
404
|
+
chellow-1759823276.0.0.dist-info/RECORD,,
|
|
File without changes
|