chellow 1732281664.0.0__py3-none-any.whl → 1733390302.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/e/bill_parsers/mm.py +1 -0
- chellow/e/hh_parser_df2.py +29 -12
- chellow/templates/e/dc_contract_properties_edit.html +11 -2
- {chellow-1732281664.0.0.dist-info → chellow-1733390302.0.0.dist-info}/METADATA +1 -1
- {chellow-1732281664.0.0.dist-info → chellow-1733390302.0.0.dist-info}/RECORD +6 -6
- {chellow-1732281664.0.0.dist-info → chellow-1733390302.0.0.dist-info}/WHEEL +0 -0
chellow/e/bill_parsers/mm.py
CHANGED
chellow/e/hh_parser_df2.py
CHANGED
|
@@ -4,7 +4,12 @@ from codecs import iterdecode
|
|
|
4
4
|
|
|
5
5
|
from werkzeug.exceptions import BadRequest
|
|
6
6
|
|
|
7
|
-
from chellow.utils import HH, parse_mpan_core, utc_datetime
|
|
7
|
+
from chellow.utils import HH, hh_format, parse_mpan_core, utc_datetime
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def _append_new_message(messages, message):
|
|
11
|
+
if len(messages) == 0 or messages[-1] != message:
|
|
12
|
+
messages.append(message)
|
|
8
13
|
|
|
9
14
|
|
|
10
15
|
def create_parser(reader, mpan_map, messages):
|
|
@@ -41,14 +46,6 @@ class StarkDf2HhParser:
|
|
|
41
46
|
if lline.startswith("#O"):
|
|
42
47
|
outstation_parts = lline[2:].split("-")
|
|
43
48
|
self.core = parse_mpan_core(outstation_parts[0])
|
|
44
|
-
if self.core in self.mpan_map and self.mpan_map[self.core] is None:
|
|
45
|
-
msg = f"The MPAN core {self.core} has been ignored"
|
|
46
|
-
if len(self.messages) == 0 or self.messages[-1] != msg:
|
|
47
|
-
self.messages.append(
|
|
48
|
-
f"The MPAN core {self.core} has been ignored"
|
|
49
|
-
)
|
|
50
|
-
self.core = None
|
|
51
|
-
continue
|
|
52
49
|
|
|
53
50
|
elif lline.startswith("#S"):
|
|
54
51
|
sensor = int(lline[2:].strip())
|
|
@@ -87,11 +84,31 @@ class StarkDf2HhParser:
|
|
|
87
84
|
raise BadRequest("Problem parsing the value: " + fields[2])
|
|
88
85
|
status = fields[3][-1]
|
|
89
86
|
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
mpan_core = self.core
|
|
88
|
+
if self.core in self.mpan_map:
|
|
89
|
+
mapping = self.mpan_map[self.core]
|
|
90
|
+
from_date = mapping["from"]
|
|
91
|
+
to_date = mapping["to"]
|
|
92
|
+
if from_date <= start_date <= to_date:
|
|
93
|
+
mpan_core = mapping["mpan"]
|
|
94
|
+
|
|
95
|
+
if mpan_core is None:
|
|
96
|
+
_append_new_message(
|
|
97
|
+
self.messages,
|
|
98
|
+
f"The MPAN core {self.core} is ignored from "
|
|
99
|
+
f"{hh_format(from_date)} to {hh_format(to_date)}",
|
|
100
|
+
)
|
|
101
|
+
continue
|
|
102
|
+
else:
|
|
103
|
+
_append_new_message(
|
|
104
|
+
self.messages,
|
|
105
|
+
f"The MPAN core {self.core} is changed to "
|
|
106
|
+
f"{mpan_core} from {hh_format(from_date)} to "
|
|
107
|
+
f"{hh_format(to_date)}",
|
|
108
|
+
)
|
|
92
109
|
|
|
93
110
|
local_datum = {
|
|
94
|
-
"mpan_core":
|
|
111
|
+
"mpan_core": mpan_core,
|
|
95
112
|
"channel_type": self.channel_type,
|
|
96
113
|
"start_date": start_date,
|
|
97
114
|
"value": value,
|
|
@@ -39,8 +39,17 @@
|
|
|
39
39
|
"private_key": "private_key", /* Remove if using password */
|
|
40
40
|
"directories": ["downloads1", "downloads2"],
|
|
41
41
|
"mpan_map": { /* Optional */
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
"99 0993 2821 985": {
|
|
43
|
+
"mpan": null, /* Ignore MPAN */
|
|
44
|
+
"from": 2024-12-04T10:00:00Z,
|
|
45
|
+
"to": 2025-01-12:00:00Z,
|
|
46
|
+
},
|
|
47
|
+
"99 0873 1942 952": {
|
|
48
|
+
"mpan": "99 7821 8541 389",
|
|
49
|
+
"from": 2024-11-16T22:00:00Z,
|
|
50
|
+
"to": 2025-02-18:00:00Z,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
44
53
|
}
|
|
45
54
|
</pre>
|
|
46
55
|
</code>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: chellow
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1733390302.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)
|
|
@@ -27,7 +27,7 @@ chellow/e/elexon.py,sha256=ALhXS9Es7PV0z9ukPbIramn3cf3iLyFi-PMWPSm5iOs,5487
|
|
|
27
27
|
chellow/e/energy_management.py,sha256=aXC2qlGt3FAODlNl_frWzVYAQrJLP8FFOiNX3m-QE_Y,12388
|
|
28
28
|
chellow/e/hh_importer.py,sha256=adfogJgPWsJurPOVSBLLQ7m68s1LhfQmDYpAFnGm0eM,21510
|
|
29
29
|
chellow/e/hh_parser_bg_csv.py,sha256=W5SU2MSpa8BGA0VJw1JXF-IwbCNLFy8fe35yxLZ7gEw,2453
|
|
30
|
-
chellow/e/hh_parser_df2.py,sha256=
|
|
30
|
+
chellow/e/hh_parser_df2.py,sha256=nZT198EZWo_G26IfJZncI_kOo-UdsXzFYDmDf3qyEs8,5089
|
|
31
31
|
chellow/e/hh_parser_edf_csv.py,sha256=CLkkL1Z6BPgVV_3uwS6McmtMzgXkoEIoJnH8FsQk1C8,2839
|
|
32
32
|
chellow/e/hh_parser_schneider_csv.py,sha256=m8FHwXp1Tbas91RPS7TriCskSNRuSaFf1SD9v2HXfSk,2366
|
|
33
33
|
chellow/e/hh_parser_schneider_xlsx.py,sha256=Vtq0TNz-oojoKJm4PeH4ZwBp2I-mjArB9-FL71ctCHs,3590
|
|
@@ -58,7 +58,7 @@ chellow/e/bill_parsers/gdf_csv.py,sha256=ZfK3Oc6oP28p_P9DIevLNB_zW2WLcEJ3Lvb1gL3
|
|
|
58
58
|
chellow/e/bill_parsers/haven_csv.py,sha256=0uENq8IgVNqdxfBQMBxLTSZWCOuDHXZC0xzk52SbfyE,13652
|
|
59
59
|
chellow/e/bill_parsers/haven_edi.py,sha256=YGPHRxPOhje9s32jqPHHELni2tooOYj3cMC_qaZVPq4,16107
|
|
60
60
|
chellow/e/bill_parsers/haven_edi_tprs.py,sha256=ZVX9CCqUybsot_Z0BEOJPvl9x5kSr7fEWyuJXvZDcz4,11841
|
|
61
|
-
chellow/e/bill_parsers/mm.py,sha256=
|
|
61
|
+
chellow/e/bill_parsers/mm.py,sha256=jFy5KlUnqfO0dsGgLMCEYAw0LPBIMBa9NDa-5ob2GwM,10033
|
|
62
62
|
chellow/e/bill_parsers/nonsettlement_dc_stark_xlsx.py,sha256=yogXTuQHGRL7IiqvRWr2C9V24ez1j9Yx0128UygPE_k,4723
|
|
63
63
|
chellow/e/bill_parsers/settlement_dc_stark_xlsx.py,sha256=PlEqCZuJ9DfQXeeYQ64jtf3ML7sUt_tt61QOOTnkE5c,6380
|
|
64
64
|
chellow/e/bill_parsers/sse_edi.py,sha256=L85DOfNkqexeEIEr8pCBn_2sHJI-zEaw6cogpE3YyYM,15204
|
|
@@ -202,7 +202,7 @@ chellow/templates/e/dc_contract_edit.html,sha256=IObmbHQmeZ_LSpnYgabmhoSNUR3aPmm
|
|
|
202
202
|
chellow/templates/e/dc_contract_hh_import.html,sha256=JncR3L6cOK4jghsGyr-itEqlIemXBXt3kL09wpqnQSE,856
|
|
203
203
|
chellow/templates/e/dc_contract_hh_imports.html,sha256=eXFDGyzSgag4JRism81_p5yTzQOjCIXaVkQ8tl3dDcM,8172
|
|
204
204
|
chellow/templates/e/dc_contract_properties.html,sha256=2EmA91gYWZcTOHQ3PxXQrpTOb8dm0OGjwRWsW6qNI9s,455
|
|
205
|
-
chellow/templates/e/dc_contract_properties_edit.html,sha256=
|
|
205
|
+
chellow/templates/e/dc_contract_properties_edit.html,sha256=YWmG0dnzD6hf2kAFWCAjQWkHDPVRDi0jaUdLSLw-tfw,1901
|
|
206
206
|
chellow/templates/e/dc_contracts.html,sha256=FPZUM7fkw-R6sRELHZCQTUkKSRqad8HOLHnyyYhQEEw,1819
|
|
207
207
|
chellow/templates/e/dc_contracts_add.html,sha256=2lrGrNqAoKp16OiMoNDNlJxBMW3QdSPfgEFheSg826s,710
|
|
208
208
|
chellow/templates/e/dc_rate_script.html,sha256=gfKUHV2IMsTQT-cYfjl4aiEBqGEWSj3uW22UZpoyGq4,1219
|
|
@@ -377,6 +377,6 @@ chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1
|
|
|
377
377
|
chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
|
|
378
378
|
chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
|
|
379
379
|
chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
|
|
380
|
-
chellow-
|
|
381
|
-
chellow-
|
|
382
|
-
chellow-
|
|
380
|
+
chellow-1733390302.0.0.dist-info/METADATA,sha256=gaYBOwq3UhXxTCphDMWhGc0rFvubI80XXISsocq3EK0,12204
|
|
381
|
+
chellow-1733390302.0.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
382
|
+
chellow-1733390302.0.0.dist-info/RECORD,,
|
|
File without changes
|