chellow 1700823345.0.0__py3-none-any.whl → 1701342365.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.

@@ -669,6 +669,11 @@ def _process_site(
669
669
  for _, vals in sorted(supplies_data.items()):
670
670
  supply_rows.append(make_val(vals.get(t)) for t in supply_titles)
671
671
 
672
+ site_md_used_kw = 0
673
+ for hh in site.hh_data(sess, start_date, finish_date, exclude_virtual=True):
674
+ used_kw = hh["used"] * 2
675
+ site_md_used_kw = max(used_kw, site_md_used_kw)
676
+
672
677
  site_row = [
673
678
  now,
674
679
  site.code,
@@ -679,6 +684,7 @@ def _process_site(
679
684
  site_category,
680
685
  site_sources,
681
686
  site_gen_types,
687
+ site_md_used_kw,
682
688
  ] + [site_data[k] for k in summary_titles]
683
689
 
684
690
  site_rows.append([make_val(v) for v in site_row])
@@ -879,6 +885,7 @@ def content(
879
885
  "metering-type",
880
886
  "sources",
881
887
  "generator-types",
888
+ "md-used-kw",
882
889
  ]
883
890
  summary_titles = [
884
891
  "import-net-kwh",
chellow/views.py CHANGED
@@ -2429,6 +2429,13 @@ def input_date_get():
2429
2429
  year = req_int_none(year_name)
2430
2430
  if year is None:
2431
2431
  initial = ct_datetime_now()
2432
+ year, month, day, hour, minute = (
2433
+ initial.year,
2434
+ initial.month,
2435
+ initial.day,
2436
+ initial.hour,
2437
+ initial.minute,
2438
+ )
2432
2439
  else:
2433
2440
  month = req_int(month_name)
2434
2441
  if resolution in ("day", "hour", "minute"):
@@ -2446,11 +2453,9 @@ def input_date_get():
2446
2453
  else:
2447
2454
  minute = 0
2448
2455
 
2449
- initial = ct_datetime(year, month, day, hour, minute)
2456
+ month_max_day = (ct_datetime(year, month, 1) + relativedelta(months=1) - HH).day
2450
2457
 
2451
- month_max_day = (
2452
- ct_datetime(initial.year, initial.month, 1) + relativedelta(months=1) - HH
2453
- ).day
2458
+ initial = ct_datetime(year, month, min(day, month_max_day), hour, minute)
2454
2459
 
2455
2460
  return render_template(
2456
2461
  "input_date.html",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: chellow
3
- Version: 1700823345.0.0
3
+ Version: 1701342365.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)
@@ -11,7 +11,7 @@ chellow/proxy.py,sha256=cVXIktPlX3tQ1BYcwxq0nJXKE6r3DtFTtfFHPq55HaM,1351
11
11
  chellow/rate_server.py,sha256=zXY0YZbkga5WL60i-rQ1K5RciZ8-UQ2NNNSlIJ_DFYk,5626
12
12
  chellow/testing.py,sha256=Od4HHH6pZrhJ_De118_F55RJEKmAvhUH2S24QE9qFQk,3635
13
13
  chellow/utils.py,sha256=32qPWEGzCPKPhSM7ztpzcR6ZG74sVZanScDIdK50Rq4,19308
14
- chellow/views.py,sha256=amq1KrO9822SRNiusWFV6qVpqvSE9GVAU7GrkW3P13c,78249
14
+ chellow/views.py,sha256=cnbqRdHwFY90DvM9uxnY8ncTFPhVxXcKWiEQj4kIv_U,78420
15
15
  chellow/e/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  chellow/e/aahedc.py,sha256=d2usudp7KYWpU6Pk3fal5EQ47EbvkvKeaFGylnb3NWw,606
17
17
  chellow/e/bill_importer.py,sha256=y1bpn49xDwltj0PRFowWsjAVamcD8eyxUbCTdGxEZiE,7389
@@ -81,7 +81,7 @@ chellow/reports/report_33.py,sha256=Dakqsl-2kGxl8rVnZuK2f0icIHKB0OlKs-6zoZ7kCMc,
81
81
  chellow/reports/report_387.py,sha256=cfEda5oL9j4Rbwh3PTw6FY6WwJT_It8MUZoSSqPMxyU,5793
82
82
  chellow/reports/report_41.py,sha256=3wNRv6yIAaI4zqM2lA1Fz-X706Hmc5vZSMvvfGmoPng,7571
83
83
  chellow/reports/report_429.py,sha256=zEFYcIw9bA9z7BHVoHRMnMOJt4OlTL4DJNsCX1yJEf0,12503
84
- chellow/reports/report_59.py,sha256=4sySc3r-LZsdJ9YyX9cBGI-v3gDGFrxyrRjTv_ILzQk,44390
84
+ chellow/reports/report_59.py,sha256=Broxh8-8SpkXCgmn2XV-Xnob5zAAUD_E5SsPHiDr-rw,44640
85
85
  chellow/reports/report_81.py,sha256=XrBLfuwLtMsn8EfoMaPRO92TKHsu_3MW95ynknDtF4I,4385
86
86
  chellow/reports/report_87.py,sha256=aqii485kbYZAvl7ajL1rGsC4eHbXAxbkGoazGwDJj0Q,5717
87
87
  chellow/reports/report_asset_comparison.py,sha256=6kHiPOL5fiZXtPyKXQ0fHvi1zYX51Frb4NMMDwLdWvc,6140
@@ -357,6 +357,6 @@ chellow/templates/g/supply_note_edit.html,sha256=6UQf_qbhFDys3cVsTp-c7ABWZpggW9R
357
357
  chellow/templates/g/supply_notes.html,sha256=WR3YwGh_qqTklSJ7JqWX6BKBc9rk_jMff4RiWZiF2CM,936
358
358
  chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
359
359
  chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
360
- chellow-1700823345.0.0.dist-info/METADATA,sha256=SplPekVXqGzuvgCLmpcSwPVZqUEirH18gtNGPI5eOmo,12160
361
- chellow-1700823345.0.0.dist-info/WHEEL,sha256=9QBuHhg6FNW7lppboF2vKVbCGTVzsFykgRQjjlajrhA,87
362
- chellow-1700823345.0.0.dist-info/RECORD,,
360
+ chellow-1701342365.0.0.dist-info/METADATA,sha256=sSBEdkU0HgJn0qi-mowyGcLFIzgFToXUp-GAsoI-H4Y,12160
361
+ chellow-1701342365.0.0.dist-info/WHEEL,sha256=9QBuHhg6FNW7lppboF2vKVbCGTVzsFykgRQjjlajrhA,87
362
+ chellow-1701342365.0.0.dist-info/RECORD,,