chellow 1740757748.0.0__py3-none-any.whl → 1741611223.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.

@@ -92,29 +92,35 @@ CHARGE_UNITS_LOOKUP = {
92
92
  }
93
93
 
94
94
  ELEMENT_LOOKUP = {
95
- "1ANNUAL": "duos-red",
96
- "2ANNUAL": "duos-amber",
97
- "3ANNUAL": "duos-green",
98
- "7ANNUAL": "duos-fixed",
99
- "9ANNUAL": "duos-reactive",
100
- "10ANNUAL": "standing",
101
- "20RS0108": "single",
102
- "30ANNUAL": "mop",
103
- "50ANNUAL": "dc",
104
- "9WANNUAL": "site-fee",
105
- "20RS0123": "day",
106
- "30RS0123": "night",
107
- "90ANNUAL": "duos-fixed",
108
- "9QANNUAL": "duos-availability",
109
- "9UANNUAL": "tnuos",
110
- "40ANNUAL": "maximum-demand",
111
- "20ANNUAL": "triad",
112
- "70ANNUAL": "elexon",
113
- "10RS0050": "duos-red",
114
- "20RS0050": "duos-amber",
115
- "30RS0050": "duos-red",
116
- "9CANNUAL": "duos-reactive",
117
- "40RS0050": "duos-super-red",
95
+ "1ANNUAL": {"UNIT": "duos-red"},
96
+ "2ANNUAL": {"UNIT": "duos-amber"},
97
+ "3ANNUAL": {"UNIT": "duos-green"},
98
+ "20RS0108": {"UNIT": "single"},
99
+ "10ANNUAL": {
100
+ "STDG": "standing",
101
+ "DCDA": "dc",
102
+ },
103
+ "9ANNUAL": {"REAP": "duos-reactive"},
104
+ "7ANNUAL": {"STDG": "duos-fixed"},
105
+ "30ANNUAL": {"MOP1": "mop"},
106
+ "50ANNUAL": {"COMM": "dc"},
107
+ "9WANNUAL": {
108
+ "STDG": "site-fee",
109
+ "AVAL": "duos-availability",
110
+ },
111
+ "20RS0123": {"UNIT": "day"},
112
+ "30RS0123": {"UNIT": "night"},
113
+ "90ANNUAL": {"STDG": "duos-fixed"},
114
+ "9QANNUAL": {"AVAL": "duos-availability"},
115
+ "9UANNUAL": {"TNUOS": "tnuos"},
116
+ "40ANNUAL": {"MD": "maximum-demand"},
117
+ "20ANNUAL": {"LOADU": "triad"},
118
+ "70ANNUAL": {"SAG": "elexon"},
119
+ "10RS0050": {"UNIT": "duos-red"},
120
+ "20RS0050": {"UNIT": "duos-amber"},
121
+ "30RS0050": {"UNIT": "duos-red"},
122
+ "9CANNUAL": {"REAP": "duos-reactive"},
123
+ "40RS0050": {"UNIT": "duos-super-red"},
118
124
  }
119
125
 
120
126
 
@@ -133,11 +139,12 @@ def _handle_0460(headers, pre_record, record):
133
139
  unknown_3=51,
134
140
  days=2,
135
141
  )
136
- units = CHARGE_UNITS_LOOKUP[parts["units"].strip()]
142
+ units_code = parts["units"].strip()
143
+ units = CHARGE_UNITS_LOOKUP[units_code]
137
144
  gbp = Decimal(parts["gbp"]) / 100
138
145
  quantity = Decimal(parts["quantity"])
139
146
  rate = Decimal(parts["rate"])
140
- element_name = ELEMENT_LOOKUP[parts["code"].strip()]
147
+ element_name = ELEMENT_LOOKUP[parts["code"].strip()][units_code]
141
148
  breakdown = headers["breakdown"]
142
149
  breakdown[f"{element_name}-{units}"] += quantity
143
150
  rate_name = f"{element_name}-rate"
@@ -289,7 +296,7 @@ def _handle_1500(headers, pre_record, record):
289
296
  del headers["late_payment"]
290
297
 
291
298
  return {
292
- "bill_type_code": "N",
299
+ "bill_type_code": "W" if net < 0 else "N",
293
300
  "mpan_core": headers["mpan_core"],
294
301
  "account": headers["account"],
295
302
  "reference": headers["reference"],
chellow/e/duos.py CHANGED
@@ -696,7 +696,10 @@ def datum_2012_02_23(ds, hh):
696
696
  hh["ct-month"] < slot["finish-month"]
697
697
  or (
698
698
  hh["ct-month"] == slot["finish-month"]
699
- and hh["ct-day"] <= slot["finish-day"]
699
+ and (
700
+ slot["finish-day"] == "last"
701
+ or hh["ct-day"] <= slot["finish-day"]
702
+ )
700
703
  )
701
704
  )
702
705
  ):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chellow
3
- Version: 1740757748.0.0
3
+ Version: 1741611223.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)
@@ -22,7 +22,7 @@ chellow/e/ccl.py,sha256=30dh_SvlgzsTQPPAJNZWILaMvbeDsv9-P-S1JxS5_SQ,3184
22
22
  chellow/e/cfd.py,sha256=Gm435c42LFwZx1n-1UY1Tdx6mL1is7E0vRLWQe8RPOo,14184
23
23
  chellow/e/computer.py,sha256=KkYNaD4W13s_BvtyPrYbfZ9MU73hKi-IIL-g4OOQxBA,67787
24
24
  chellow/e/dno_rate_parser.py,sha256=A5TP6KjyfT5lVWh7dX4SiXRi6wnf2lGv-H_T4Sod8CI,21731
25
- chellow/e/duos.py,sha256=nwviRjz-qIt3GxIMHk0hItIT4dtKsxOWq9TUC1z-hO8,30864
25
+ chellow/e/duos.py,sha256=RHrn93I1ASO2uYkuF18qlhG4p-jpuJhd_g3o69wtP4U,31004
26
26
  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
@@ -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=5909bJe_zwRItqkMYnq5bdZA6XhBBMquvBqsC6bbnqU,10808
61
+ chellow/e/bill_parsers/mm.py,sha256=S6a-lv22bFybdJWHInCp691xKa4thnCLFDYqzyDZFiw,11186
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=osCpUYUdLcPtlo7ngXWGw0ImnxssLa1fOSejMwe51-k,6381
64
64
  chellow/e/bill_parsers/sse_edi.py,sha256=L85DOfNkqexeEIEr8pCBn_2sHJI-zEaw6cogpE3YyYM,15204
@@ -378,6 +378,6 @@ chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1
378
378
  chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
379
379
  chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
380
380
  chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
381
- chellow-1740757748.0.0.dist-info/METADATA,sha256=kWEFEr_s5EkvcNRRn5zVhFS7BMzCta9kJ6VMS5guWjY,12238
382
- chellow-1740757748.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
383
- chellow-1740757748.0.0.dist-info/RECORD,,
381
+ chellow-1741611223.0.0.dist-info/METADATA,sha256=pOS7UnjGUixI6N2iaTmWHVEKGBzwNJ9l4bBnY2fXyQ8,12238
382
+ chellow-1741611223.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
383
+ chellow-1741611223.0.0.dist-info/RECORD,,