chellow 1733501869.0.0__py3-none-any.whl → 1734005435.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/views.py CHANGED
@@ -3,6 +3,7 @@ import os
3
3
  import threading
4
4
  from collections import defaultdict
5
5
  from datetime import datetime as Datetime
6
+ from decimal import Decimal
6
7
  from io import BytesIO, StringIO
7
8
  from itertools import chain, islice
8
9
  from random import random
@@ -4729,6 +4730,127 @@ def site_add_e_supply_post(site_id):
4729
4730
  )
4730
4731
 
4731
4732
 
4733
+ @e.route("/sites/<int:site_id>/hh_data")
4734
+ def site_hh_data_get(site_id):
4735
+ caches = {}
4736
+ site = Site.get_by_id(g.sess, site_id)
4737
+
4738
+ start_year = req_int("start_year")
4739
+ start_month = req_int("start_month")
4740
+ start_date, finish_date = next(
4741
+ c_months_u(start_year=start_year, start_month=start_month, months=1)
4742
+ )
4743
+
4744
+ supplies = (
4745
+ g.sess.query(Supply)
4746
+ .join(Era)
4747
+ .join(SiteEra)
4748
+ .join(Source)
4749
+ .filter(
4750
+ SiteEra.site == site,
4751
+ SiteEra.is_physical == true(),
4752
+ Era.start_date <= finish_date,
4753
+ or_(Era.finish_date == null(), Era.finish_date >= start_date),
4754
+ Source.code != "sub",
4755
+ )
4756
+ .order_by(Supply.id)
4757
+ .distinct()
4758
+ .options(joinedload(Supply.source), joinedload(Supply.generator_type))
4759
+ .all()
4760
+ )
4761
+
4762
+ data = iter(
4763
+ g.sess.query(HhDatum)
4764
+ .join(Channel)
4765
+ .join(Era)
4766
+ .filter(
4767
+ Channel.channel_type == "ACTIVE",
4768
+ Era.supply_id.in_([s.id for s in supplies]),
4769
+ HhDatum.start_date >= start_date,
4770
+ HhDatum.start_date <= finish_date,
4771
+ )
4772
+ .order_by(HhDatum.start_date, Era.supply_id)
4773
+ .options(
4774
+ joinedload(HhDatum.channel)
4775
+ .joinedload(Channel.era)
4776
+ .joinedload(Era.supply)
4777
+ .joinedload(Supply.source)
4778
+ )
4779
+ )
4780
+ datum = next(data, None)
4781
+
4782
+ hh_data = []
4783
+ for hh_date in hh_range(caches, start_date, finish_date):
4784
+ sups = []
4785
+ hh_dict = {
4786
+ "start_date": hh_date,
4787
+ "supplies": sups,
4788
+ "export_kwh": Decimal(0),
4789
+ "import_kwh": Decimal(0),
4790
+ "parasitic_kwh": Decimal(0),
4791
+ "generated_kwh": Decimal(0),
4792
+ "third_party_import_kwh": Decimal(0),
4793
+ "third_party_export_kwh": Decimal(0),
4794
+ }
4795
+ hh_data.append(hh_dict)
4796
+ for supply in supplies:
4797
+ sup_hh = {}
4798
+ sups.append(sup_hh)
4799
+ while (
4800
+ datum is not None
4801
+ and datum.start_date == hh_date
4802
+ and datum.channel.era.supply_id == supply.id
4803
+ ):
4804
+ channel = datum.channel
4805
+ imp_related = channel.imp_related
4806
+ source_code = channel.era.supply.source.code
4807
+
4808
+ prefix = "import_" if imp_related else "export_"
4809
+ sup_hh[f"{prefix}kwh"] = datum.value
4810
+ sup_hh[f"{prefix}status"] = datum.status
4811
+
4812
+ if not imp_related and source_code in ("grid", "gen-grid"):
4813
+ hh_dict["export_kwh"] += datum.value
4814
+ if imp_related and source_code in ("grid", "gen-grid"):
4815
+ hh_dict["import_kwh"] += datum.value
4816
+ if (imp_related and source_code == "gen") or (
4817
+ not imp_related and source_code == "gen-grid"
4818
+ ):
4819
+ hh_dict["generated_kwh"] += datum.value
4820
+ if (not imp_related and source_code == "gen") or (
4821
+ imp_related and source_code == "gen-grid"
4822
+ ):
4823
+ hh_dict["parasitic_kwh"] += datum.value
4824
+ if (imp_related and source_code == "3rd-party") or (
4825
+ not imp_related and source_code == "3rd-party-reverse"
4826
+ ):
4827
+ hh_dict["third_party_import_kwh"] += datum.value
4828
+ if (not imp_related and source_code == "3rd-party") or (
4829
+ imp_related and source_code == "3rd-party-reverse"
4830
+ ):
4831
+ hh_dict["third_party_export_kwh"] += datum.value
4832
+ datum = next(data, None)
4833
+
4834
+ hh_dict["displaced_kwh"] = (
4835
+ hh_dict["generated_kwh"] - hh_dict["export_kwh"] - hh_dict["parasitic_kwh"]
4836
+ )
4837
+ hh_dict["used_kwh"] = sum(
4838
+ (
4839
+ hh_dict["import_kwh"],
4840
+ hh_dict["displaced_kwh"],
4841
+ hh_dict["third_party_import_kwh"] - hh_dict["third_party_export_kwh"],
4842
+ )
4843
+ )
4844
+
4845
+ return render_template(
4846
+ "site_hh_data.html",
4847
+ site=site,
4848
+ supplies=supplies,
4849
+ hh_data=hh_data,
4850
+ start_date=start_date,
4851
+ )
4852
+
4853
+
4732
4854
  @e.route("/sources")
4733
4855
  def sources_get():
4734
4856
  sources = g.sess.query(Source).order_by(Source.code)
@@ -1,52 +1,76 @@
1
- <form>
2
- <fieldset>
3
- <label>Site Code </label>
4
- {{input_text('site_code', site.code)}}
5
- <label>Month</label>
6
- {{input_date(None, None, 'month')}}
7
- <input type="submit" value="Show">
8
- </fieldset>
9
- </form>
10
- <table class="sticky">
11
- <caption>HH Data</caption>
12
- <thead>
13
- <tr>
14
- <th>HH Starting</th>
15
- <th>Imported kWh</th>
16
- <th>Used kWh</th>
17
- <th>Displaced kWh</th>
18
- <th>Generated kWh</th>
19
- <th>Exported kWh</th>
20
- <th>Parasitic kWh</th>
21
- {% for supply in supplies %}
22
- {% set pref = supply.name + ' '+ supply.source.code +
23
- (' ' + supply.generator_type.code if
24
- supply.generator_type != None else '') %}
25
- <th style="border-left-width: medium;">{{pref}} Imp kWh</th>
26
- <th>{{pref}} Imp Status</th>
27
- <th>{{pref}} Exp kWh</th>
28
- <th>{{pref}} Exp Status</th>
29
- {% endfor %}
30
- </tr>
31
- </thead>
32
- <tbody>
33
- {% for hh in hh_data %}
1
+ {% extends "base.html" %}
2
+
3
+ {% block title %}
4
+ Sites &raquo; {{site.code}} {{site.name}} &raquo; HH data
5
+ {% endblock %}
6
+
7
+ {% block inside_head %}
8
+ <style>
9
+ tbody > tr {
10
+ scroll-margin-top: 8em;
11
+ }
12
+
13
+ tbody > tr:target {
14
+ background-color: yellow;
15
+ }
16
+ </style>
17
+ {% endblock %}
18
+
19
+ {% block nav %}
20
+ <a href="/sites">Sites</a> &raquo;
21
+ <a href="/sites/{{site.id}}">{{site.code}} {{site.name}}</a> &raquo; HH data
22
+ {% endblock %}
23
+
24
+ {% block content %}
25
+ <form action="/e/sites/{{site.id}}/hh_data">
26
+ <fieldset>
27
+ <label>Month</label> {{input_date(prefix='start', initial=start_date, resolution='month')}}
28
+ <input type="submit" value="Show">
29
+ </fieldset>
30
+ </form>
31
+
32
+ <table class="sticky">
33
+ <caption>HH Data</caption>
34
+ <thead>
34
35
  <tr>
35
- <td style="white-space: nowrap">{{hh.start_date|hh_format}}</td>
36
- <td>{{hh.import_kwh}}</td>
37
- <td>{{hh.used_kwh}}</td>
38
- <td>{{hh.displaced_kwh}}</td>
39
- <td>{{hh.generated_kwh}}</td>
40
- <td>{{hh.export_kwh}}</td>
41
- <td>{{hh.parasitic_kwh}}</td>
42
- {% for datum in hh.supplies %}
43
- <td style="border-left-width: medium;"
44
- >{{datum.import_kwh}}</td>
45
- <td>{{datum.import_status}}</td>
46
- <td>{{datum.export_kwh}}</td>
47
- <td>{{datum.export_status}}</td>
36
+ <th>HH Starting</th>
37
+ <th>Imported kWh</th>
38
+ <th>Used kWh</th>
39
+ <th>Displaced kWh</th>
40
+ <th>Generated kWh</th>
41
+ <th>Exported kWh</th>
42
+ <th>Parasitic kWh</th>
43
+ {% for supply in supplies %}
44
+ {% set pref = supply.name + ' '+ supply.source.code +
45
+ (' ' + supply.generator_type.code if
46
+ supply.generator_type != None else '') %}
47
+ <th style="border-left-width: medium;">{{pref}} Imp kWh</th>
48
+ <th>{{pref}} Imp Status</th>
49
+ <th>{{pref}} Exp kWh</th>
50
+ <th>{{pref}} Exp Status</th>
48
51
  {% endfor %}
49
52
  </tr>
50
- {% endfor %}
51
- </tbody>
52
- </table>
53
+ </thead>
54
+ <tbody>
55
+ {% for hh in hh_data %}
56
+ {% set start_str = hh.start_date|hh_format %}
57
+ <tr id="{{start_str}}">
58
+ <td style="white-space: nowrap">{{start_str}}</td>
59
+ <td>{{hh.import_kwh}}</td>
60
+ <td>{{hh.used_kwh}}</td>
61
+ <td>{{hh.displaced_kwh}}</td>
62
+ <td>{{hh.generated_kwh}}</td>
63
+ <td>{{hh.export_kwh}}</td>
64
+ <td>{{hh.parasitic_kwh}}</td>
65
+ {% for datum in hh.supplies %}
66
+ <td style="border-left-width: medium;"
67
+ >{{datum.import_kwh}}</td>
68
+ <td>{{datum.import_status}}</td>
69
+ <td>{{datum.export_kwh}}</td>
70
+ <td>{{datum.export_status}}</td>
71
+ {% endfor %}
72
+ </tr>
73
+ {% endfor %}
74
+ </tbody>
75
+ </table>
76
+ {% endblock %}
@@ -161,7 +161,7 @@
161
161
  Table of site level monthly kWh, MD kWh etc.</a>
162
162
  </li>
163
163
  <li>
164
- <a href="/sites/{{site.id}}/hh_data?year={{month_finish.year}}&amp;month={{month_finish.month}}">Table of hh data</a>
164
+ <a href="/e/sites/{{site.id}}/hh_data?start_year={{month_finish.year}}&amp;start_month={{month_finish.month}}">Table of hh data</a>
165
165
  </li>
166
166
  <li>
167
167
  <a href="/e/sites/{{site.id}}/site_snags">Site Snags</a>
chellow/views.py CHANGED
@@ -10,7 +10,6 @@ import traceback
10
10
  import types
11
11
  from collections import OrderedDict
12
12
  from datetime import datetime as Datetime
13
- from decimal import Decimal
14
13
  from functools import wraps
15
14
  from importlib import import_module
16
15
  from io import DEFAULT_BUFFER_SIZE, StringIO
@@ -50,7 +49,6 @@ from sqlalchemy import (
50
49
  true,
51
50
  )
52
51
  from sqlalchemy.exc import IntegrityError
53
- from sqlalchemy.orm import joinedload
54
52
  from sqlalchemy.orm.attributes import flag_modified
55
53
 
56
54
  from werkzeug.exceptions import BadRequest, Forbidden
@@ -1155,123 +1153,6 @@ def report_post(report_id):
1155
1153
  return report_module.do_post(g.sess)
1156
1154
 
1157
1155
 
1158
- @home.route("/sites/<int:site_id>/hh_data")
1159
- def site_hh_data_get(site_id):
1160
- caches = {}
1161
- site = Site.get_by_id(g.sess, site_id)
1162
-
1163
- year = req_int("year")
1164
- month = req_int("month")
1165
- start_date, finish_date = next(
1166
- c_months_u(start_year=year, start_month=month, months=1)
1167
- )
1168
-
1169
- supplies = (
1170
- g.sess.query(Supply)
1171
- .join(Era)
1172
- .join(SiteEra)
1173
- .join(Source)
1174
- .filter(
1175
- SiteEra.site == site,
1176
- SiteEra.is_physical == true(),
1177
- Era.start_date <= finish_date,
1178
- or_(Era.finish_date == null(), Era.finish_date >= start_date),
1179
- Source.code != "sub",
1180
- )
1181
- .order_by(Supply.id)
1182
- .distinct()
1183
- .options(joinedload(Supply.source), joinedload(Supply.generator_type))
1184
- .all()
1185
- )
1186
-
1187
- data = iter(
1188
- g.sess.query(HhDatum)
1189
- .join(Channel)
1190
- .join(Era)
1191
- .filter(
1192
- Channel.channel_type == "ACTIVE",
1193
- Era.supply_id.in_([s.id for s in supplies]),
1194
- HhDatum.start_date >= start_date,
1195
- HhDatum.start_date <= finish_date,
1196
- )
1197
- .order_by(HhDatum.start_date, Era.supply_id)
1198
- .options(
1199
- joinedload(HhDatum.channel)
1200
- .joinedload(Channel.era)
1201
- .joinedload(Era.supply)
1202
- .joinedload(Supply.source)
1203
- )
1204
- )
1205
- datum = next(data, None)
1206
-
1207
- hh_data = []
1208
- for hh_date in hh_range(caches, start_date, finish_date):
1209
- sups = []
1210
- hh_dict = {
1211
- "start_date": hh_date,
1212
- "supplies": sups,
1213
- "export_kwh": Decimal(0),
1214
- "import_kwh": Decimal(0),
1215
- "parasitic_kwh": Decimal(0),
1216
- "generated_kwh": Decimal(0),
1217
- "third_party_import_kwh": Decimal(0),
1218
- "third_party_export_kwh": Decimal(0),
1219
- }
1220
- hh_data.append(hh_dict)
1221
- for supply in supplies:
1222
- sup_hh = {}
1223
- sups.append(sup_hh)
1224
- while (
1225
- datum is not None
1226
- and datum.start_date == hh_date
1227
- and datum.channel.era.supply_id == supply.id
1228
- ):
1229
- channel = datum.channel
1230
- imp_related = channel.imp_related
1231
- source_code = channel.era.supply.source.code
1232
-
1233
- prefix = "import_" if imp_related else "export_"
1234
- sup_hh[f"{prefix}kwh"] = datum.value
1235
- sup_hh[f"{prefix}status"] = datum.status
1236
-
1237
- if not imp_related and source_code in ("grid", "gen-grid"):
1238
- hh_dict["export_kwh"] += datum.value
1239
- if imp_related and source_code in ("grid", "gen-grid"):
1240
- hh_dict["import_kwh"] += datum.value
1241
- if (imp_related and source_code == "gen") or (
1242
- not imp_related and source_code == "gen-grid"
1243
- ):
1244
- hh_dict["generated_kwh"] += datum.value
1245
- if (not imp_related and source_code == "gen") or (
1246
- imp_related and source_code == "gen-grid"
1247
- ):
1248
- hh_dict["parasitic_kwh"] += datum.value
1249
- if (imp_related and source_code == "3rd-party") or (
1250
- not imp_related and source_code == "3rd-party-reverse"
1251
- ):
1252
- hh_dict["third_party_import_kwh"] += datum.value
1253
- if (not imp_related and source_code == "3rd-party") or (
1254
- imp_related and source_code == "3rd-party-reverse"
1255
- ):
1256
- hh_dict["third_party_export_kwh"] += datum.value
1257
- datum = next(data, None)
1258
-
1259
- hh_dict["displaced_kwh"] = (
1260
- hh_dict["generated_kwh"] - hh_dict["export_kwh"] - hh_dict["parasitic_kwh"]
1261
- )
1262
- hh_dict["used_kwh"] = sum(
1263
- (
1264
- hh_dict["import_kwh"],
1265
- hh_dict["displaced_kwh"],
1266
- hh_dict["third_party_import_kwh"] - hh_dict["third_party_export_kwh"],
1267
- )
1268
- )
1269
-
1270
- return render_template(
1271
- "site_hh_data.html", site=site, supplies=supplies, hh_data=hh_data
1272
- )
1273
-
1274
-
1275
1156
  @home.route("/sites/<int:site_id>")
1276
1157
  def site_get(site_id):
1277
1158
  configuration_contract = Contract.get_non_core_by_name(g.sess, "configuration")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chellow
3
- Version: 1733501869.0.0
3
+ Version: 1734005435.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)
@@ -12,7 +12,7 @@ chellow/rate_server.py,sha256=fg-Pf_9Hk3bXmC9riPQNGQxBvLvBa_WtNYdwDCjnCSg,5678
12
12
  chellow/rrun.py,sha256=1Kt2q_K9UoDG_nsZz-Q6XJiMNKroWqlqFdxn2M6Q8CA,2088
13
13
  chellow/testing.py,sha256=Od4HHH6pZrhJ_De118_F55RJEKmAvhUH2S24QE9qFQk,3635
14
14
  chellow/utils.py,sha256=Ej7dsbQ6Ee8X2aZ7B2Vs-hUFCsMABioAdOV1DJjwY-0,19293
15
- chellow/views.py,sha256=d1q8OL3GL9dsyQARmiVe-somkj900MkG9lwaWpWduoA,83700
15
+ chellow/views.py,sha256=OlNGtFB9OatQPMzHiXTjBoGOSnFT7cC38GA2x7rtcFg,79490
16
16
  chellow/e/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  chellow/e/aahedc.py,sha256=d2usudp7KYWpU6Pk3fal5EQ47EbvkvKeaFGylnb3NWw,606
18
18
  chellow/e/bill_importer.py,sha256=7UcnqNlKbJc2GhW9gy8sDp9GuqambJVpZLvbafOZztA,7411
@@ -43,7 +43,7 @@ chellow/e/system_price.py,sha256=6w5J7bzwFAZubE2zdOFRiS8IIrVP8hkoIOaG2yCt-Ic,623
43
43
  chellow/e/tlms.py,sha256=M33D6YpMixu2KkwSCzDRM3kThLgShg8exp63Obo75l8,8905
44
44
  chellow/e/tnuos.py,sha256=NBmc-f3oezrl4gviAKobljHfICTpBKxxxEGBGJi_lRk,4927
45
45
  chellow/e/triad.py,sha256=lIQj7EdUrcFwEqleuHZXYU_bfzIwNOqUVVxB3NPQt4A,13710
46
- chellow/e/views.py,sha256=8xNeBgr4LFPPPYD-lcOV4S5tlV19zSMF66zoeBKrc8U,216492
46
+ chellow/e/views.py,sha256=VkoB3-jgydp-2RMdlYVvSL4UVUmt7wMnCJpHSBdf1jM,220753
47
47
  chellow/e/bill_parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
48
  chellow/e/bill_parsers/activity_mop_stark_xlsx.py,sha256=UgWXDPzQkQghyj_lfgBqoSJpHB-t-qOdSaB8qY6GLog,4071
49
49
  chellow/e/bill_parsers/annual_mop_stark_xlsx.py,sha256=-HMoIfa_utXYKA44RuC0Xqv3vd2HLeQU_4P0iBUd3WA,4219
@@ -152,11 +152,10 @@ chellow/templates/scenario_add.html,sha256=xFTb9CaA-qV2iwnVqcS44vD8JlYatBQet8Rat
152
152
  chellow/templates/scenario_docs.html,sha256=0YP_h8GYkqCFLBoCj2w4PE4Js15DT_WoxYlK9nRSMlA,6949
153
153
  chellow/templates/scenario_edit.html,sha256=x2Eicq_eFs7ax2EtL4GrD73qKF-LhN41OQdPFbDivrc,1060
154
154
  chellow/templates/scenarios.html,sha256=FIDOSWs9VO_3bJkQoNHh-DdRzVfUyJGK9WbdEHRxxdM,841
155
- chellow/templates/site.html,sha256=dj0VgcmjaKJHuTOZDESO2E2MOyluYJtx4YaSOaWOkwU,10024
155
+ chellow/templates/site.html,sha256=rvK4VnSsiSswyYTPJrKn4iKpT_-t1nfH-4yCPF7OKQc,10038
156
156
  chellow/templates/site_add.html,sha256=NxYmOIZQH6X8EBOuJUbhUJ8IYB3t0BukjR1yVRhnJhM,422
157
157
  chellow/templates/site_edit.html,sha256=TJ_ZDDkodj-uDB3GPP9Cel3FGZY2oP42KCzHOydPWVc,2909
158
158
  chellow/templates/site_gen_graph.html,sha256=LXkD4n_aC_sFm9JJTCmBRrczpyTn2UUEgBToFiM5RPo,3468
159
- chellow/templates/site_hh_data.html,sha256=xmSJ5h_DvI1-bnV7FdBodDUvDCU0-q-UHYj2MuyLOTg,1907
160
159
  chellow/templates/site_months.html,sha256=ToqH42dym82Q4ihFIT3St-EwPlhDAfwskNMh4cZ2EsM,6572
161
160
  chellow/templates/site_used_graph.html,sha256=NXuQYcPXnk2mHb2O4mxVPZ1R-X-MWPwneUV-J6z285w,3094
162
161
  chellow/templates/sites.html,sha256=4ouJ5xYqYHjXCv3cDucTjgbOd_whReFPPHopLBdW6Go,621
@@ -291,7 +290,7 @@ chellow/templates/e/scenario_edit.html,sha256=Uf64v_qsBP0BxaFEIz214CC_dZXlvro4zv
291
290
  chellow/templates/e/scenarios.html,sha256=zlNhZvQEcuwLgHObVHS-4THur5Lz9Jf1G6xD98-jamI,847
292
291
  chellow/templates/e/site_add_e_supply.html,sha256=_gi1ejI4TMTMX9vCW7z2kToR2XKR6qoVh67qp_VrDsM,2731
293
292
  chellow/templates/e/site_add_e_supply_form.html,sha256=q5LfSmp_eamph4FLKslMrxKGOtGCkSFRe9I5AVn-hgM,5553
294
- chellow/templates/e/site_hh_data.html,sha256=1Ld5IIM3G84tVCAwtlJNGJTnrASS7d84AgaPwwHNEMI,1413
293
+ chellow/templates/e/site_hh_data.html,sha256=qCmqQcPKWhNiZ7eSVs8NhMIiBXJHVHF5OAzjEdppyjM,1982
295
294
  chellow/templates/e/site_site_snags.html,sha256=vWpsFyxZj7GOrMXQz2rKq9zOQdVsqeUVtdBzehp9J5w,847
296
295
  chellow/templates/e/site_snag.html,sha256=eZt1H-t-hsoKZBteU9ILpKqKLD0Pf0Uybp8pPQYuTAc,924
297
296
  chellow/templates/e/site_snag_edit.html,sha256=O-m95S-ig9sXmFFkQmjfNnF9zJkgSIuPizuF7ieNi7s,1436
@@ -377,6 +376,6 @@ chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1
377
376
  chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
378
377
  chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
379
378
  chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
380
- chellow-1733501869.0.0.dist-info/METADATA,sha256=zC5NZQjT__VbhNTac6EOSjZEHQZ-ARkcIUf38_BNTQc,12204
381
- chellow-1733501869.0.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
382
- chellow-1733501869.0.0.dist-info/RECORD,,
379
+ chellow-1734005435.0.0.dist-info/METADATA,sha256=rikcxSjkW6hkiNWM_zQJBT9tqQUz1C0JhNytTqShEdk,12204
380
+ chellow-1734005435.0.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
381
+ chellow-1734005435.0.0.dist-info/RECORD,,
@@ -1,75 +0,0 @@
1
- {% extends "base.html" %}
2
-
3
- {% block title %}
4
- Sites &raquo; {{site.code}} {{site.name}} &raquo; HH data
5
- {% endblock %}
6
-
7
- {% block inside_head %}
8
- <style>
9
- tbody > tr {
10
- scroll-margin-top: 8em;
11
- }
12
-
13
- tbody > tr:target {
14
- background-color: yellow;
15
- }
16
- </style>
17
- {% endblock %}
18
-
19
- {% block nav %}
20
- <a href="/sites">Sites</a> &raquo;
21
- <a href="/sites/{{site.id}}">{{site.code}} {{site.name}}</a> &raquo; HH data
22
- {% endblock %}
23
-
24
- {% block content %}
25
- <form>
26
- <fieldset>
27
- <label>Month</label> {{input_date(resolution='month')}}
28
- <input type="submit" value="Show">
29
- </fieldset>
30
- </form>
31
- <table class="sticky">
32
- <caption>HH Data</caption>
33
- <thead>
34
- <tr>
35
- <th>HH Starting</th>
36
- <th>Imported kWh</th>
37
- <th>Used kWh</th>
38
- <th>Displaced kWh</th>
39
- <th>Generated kWh</th>
40
- <th>Exported kWh</th>
41
- <th>Parasitic kWh</th>
42
- {% for supply in supplies %}
43
- {% set pref = supply.name + ' '+ supply.source.code +
44
- (' ' + supply.generator_type.code if
45
- supply.generator_type != None else '') %}
46
- <th style="border-left-width: medium;">{{pref}} Imp kWh</th>
47
- <th>{{pref}} Imp Status</th>
48
- <th>{{pref}} Exp kWh</th>
49
- <th>{{pref}} Exp Status</th>
50
- {% endfor %}
51
- </tr>
52
- </thead>
53
- <tbody>
54
- {% for hh in hh_data %}
55
- {% set start_str = hh.start_date|hh_format %}
56
- <tr id="{{start_str}}">
57
- <td style="white-space: nowrap">{{start_str}}</td>
58
- <td>{{hh.import_kwh}}</td>
59
- <td>{{hh.used_kwh}}</td>
60
- <td>{{hh.displaced_kwh}}</td>
61
- <td>{{hh.generated_kwh}}</td>
62
- <td>{{hh.export_kwh}}</td>
63
- <td>{{hh.parasitic_kwh}}</td>
64
- {% for datum in hh.supplies %}
65
- <td style="border-left-width: medium;"
66
- >{{datum.import_kwh}}</td>
67
- <td>{{datum.import_status}}</td>
68
- <td>{{datum.export_kwh}}</td>
69
- <td>{{datum.export_status}}</td>
70
- {% endfor %}
71
- </tr>
72
- {% endfor %}
73
- </tbody>
74
- </table>
75
- {% endblock %}