chellow 1704810179.0.0__tar.gz → 1705585731.0.0__tar.gz

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.

Files changed (460) hide show
  1. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/PKG-INFO +1 -1
  2. chellow-1705585731.0.0/VERSION +1 -0
  3. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/__init__.py +1 -0
  4. chellow-1705585731.0.0/chellow/e/cfd.py +305 -0
  5. chellow-1705585731.0.0/chellow/e/lcc.py +164 -0
  6. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/views.py +18 -0
  7. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/gas/views.py +21 -11
  8. chellow-1705585731.0.0/chellow/templates/e/lcc.html +55 -0
  9. chellow-1705585731.0.0/chellow/templates/g/supplier_contract_edit.html +40 -0
  10. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/home.html +1 -0
  11. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/views.py +1 -1
  12. chellow-1705585731.0.0/test/e/test_cfd.py +237 -0
  13. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/gas/test_gas_views.py +16 -0
  14. chellow-1704810179.0.0/VERSION +0 -1
  15. chellow-1704810179.0.0/chellow/templates/g/supplier_contract_edit.html +0 -53
  16. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/.ebextensions/chellow.config +0 -0
  17. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/.github/workflows/chellow.yml +0 -0
  18. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/.gitignore +0 -0
  19. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/README.md +0 -0
  20. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/application.py +0 -0
  21. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/bin/chellow_service_monitor.sh +0 -0
  22. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/bin/chellow_start.sh +0 -0
  23. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/api.py +0 -0
  24. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/bank_holidays.py +0 -0
  25. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/commands.py +0 -0
  26. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/dloads.py +0 -0
  27. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/__init__.py +0 -0
  28. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/aahedc.py +0 -0
  29. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_importer.py +0 -0
  30. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/__init__.py +0 -0
  31. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/activity_mop_stark_xlsx.py +0 -0
  32. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/annual_mop_stark_xlsx.py +0 -0
  33. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/bgb_edi.py +0 -0
  34. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/csv.py +0 -0
  35. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/engie_edi.py +0 -0
  36. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/engie_xls.py +0 -0
  37. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/engie_xlsx.py +0 -0
  38. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/gdf_csv.py +0 -0
  39. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/haven_csv.py +0 -0
  40. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/haven_edi.py +0 -0
  41. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/haven_edi_tprs.py +0 -0
  42. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/mm.py +0 -0
  43. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/nonsettlement_dc_stark_xlsx.py +0 -0
  44. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/settlement_dc_stark_xlsx.py +0 -0
  45. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/sse_edi.py +0 -0
  46. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bill_parsers/sww_xls.py +0 -0
  47. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bmarketidx.py +0 -0
  48. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/bsuos.py +0 -0
  49. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/ccl.py +0 -0
  50. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/computer.py +0 -0
  51. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/dno_rate_parser.py +0 -0
  52. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/duos.py +0 -0
  53. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/energy_management.py +0 -0
  54. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/hh_importer.py +0 -0
  55. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/hh_parser_bg_csv.py +0 -0
  56. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/hh_parser_df2.py +0 -0
  57. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/hh_parser_simple_csv.py +0 -0
  58. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/laf_import.py +0 -0
  59. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/mdd_importer.py +0 -0
  60. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/rcrc.py +0 -0
  61. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/ro.py +0 -0
  62. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/scenario.py +0 -0
  63. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/system_price.py +0 -0
  64. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/tlms.py +0 -0
  65. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/tnuos.py +0 -0
  66. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/e/triad.py +0 -0
  67. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/edi_lib.py +0 -0
  68. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/gas/bill_import.py +0 -0
  69. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/gas/bill_parser_csv.py +0 -0
  70. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/gas/bill_parser_engie_edi.py +0 -0
  71. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/gas/ccl.py +0 -0
  72. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/gas/cv.py +0 -0
  73. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/gas/dn_rate_parser.py +0 -0
  74. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/gas/engine.py +0 -0
  75. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/gas/transportation.py +0 -0
  76. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/general_import.py +0 -0
  77. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/models.py +0 -0
  78. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/national_grid.py +0 -0
  79. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/proxy.py +0 -0
  80. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/rate_server.py +0 -0
  81. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/__init__.py +0 -0
  82. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_109.py +0 -0
  83. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_111.py +0 -0
  84. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_169.py +0 -0
  85. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_177.py +0 -0
  86. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_181.py +0 -0
  87. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_183.py +0 -0
  88. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_187.py +0 -0
  89. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_215.py +0 -0
  90. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_219.py +0 -0
  91. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_231.py +0 -0
  92. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_233.py +0 -0
  93. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_241.py +0 -0
  94. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_247.py +0 -0
  95. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_29.py +0 -0
  96. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_291.py +0 -0
  97. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_33.py +0 -0
  98. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_387.py +0 -0
  99. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_41.py +0 -0
  100. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_429.py +0 -0
  101. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_59.py +0 -0
  102. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_81.py +0 -0
  103. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_87.py +0 -0
  104. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_asset_comparison.py +0 -0
  105. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_batches.py +0 -0
  106. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_bills.py +0 -0
  107. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_csv_llfcs.py +0 -0
  108. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_csv_site_hh_data.py +0 -0
  109. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_csv_site_snags.py +0 -0
  110. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_ecoes_comparison.py +0 -0
  111. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_g_monthly_duration.py +0 -0
  112. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_g_supplies_snapshot.py +0 -0
  113. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_g_supply_virtual_bill.py +0 -0
  114. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_g_virtual_bills.py +0 -0
  115. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_g_virtual_bills_hh.py +0 -0
  116. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_sscs.py +0 -0
  117. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/reports/report_supply_contacts.py +0 -0
  118. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/static/css/chellow.css +0 -0
  119. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/static/images/favicon.svg +0 -0
  120. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/static/images/favicon_test.svg +0 -0
  121. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/static/images/logo.png +0 -0
  122. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/static/js/htmx.min.js +0 -0
  123. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/403.html +0 -0
  124. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/base.html +0 -0
  125. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/bill_type.html +0 -0
  126. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/bill_types.html +0 -0
  127. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/chain.html +0 -0
  128. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/csv_sites_monthly_duration.html +0 -0
  129. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/downloads.html +0 -0
  130. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/asset_comparison.html +0 -0
  131. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/channel.html +0 -0
  132. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/channel_add.html +0 -0
  133. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/channel_edit.html +0 -0
  134. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/channel_snag.html +0 -0
  135. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/channel_snag_edit.html +0 -0
  136. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/channel_snags.html +0 -0
  137. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/comm.html +0 -0
  138. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/comms.html +0 -0
  139. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/cop.html +0 -0
  140. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/cops.html +0 -0
  141. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/csv_bills.html +0 -0
  142. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/csv_register_reads.html +0 -0
  143. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/csv_sites_hh_data.html +0 -0
  144. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/csv_sites_triad.html +0 -0
  145. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/csv_supplies_hh_data.html +0 -0
  146. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/csv_supplies_snapshot.html +0 -0
  147. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/csv_supplies_triad.html +0 -0
  148. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_auto_importer.html +0 -0
  149. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_batch.html +0 -0
  150. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_batch_add.html +0 -0
  151. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_batch_edit.html +0 -0
  152. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_batch_file.html +0 -0
  153. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_batch_file_edit.html +0 -0
  154. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_batch_upload_file.html +0 -0
  155. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_batches.html +0 -0
  156. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_bill.html +0 -0
  157. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_bill_add.html +0 -0
  158. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_bill_edit.html +0 -0
  159. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_bill_import.html +0 -0
  160. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_bill_imports.html +0 -0
  161. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_contract.html +0 -0
  162. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_contract_edit.html +0 -0
  163. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_contract_hh_import.html +0 -0
  164. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_contract_hh_imports.html +0 -0
  165. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_contracts.html +0 -0
  166. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_contracts_add.html +0 -0
  167. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_rate_script.html +0 -0
  168. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_rate_script_add.html +0 -0
  169. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dc_rate_script_edit.html +0 -0
  170. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dno.html +0 -0
  171. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dno_rate_script.html +0 -0
  172. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dno_rate_script_add.html +0 -0
  173. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dno_rate_script_edit.html +0 -0
  174. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dnos.html +0 -0
  175. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dtc_meter_type.html +0 -0
  176. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/dtc_meter_types.html +0 -0
  177. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/duration_report.html +0 -0
  178. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/em_hh_data.html +0 -0
  179. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/em_months.html +0 -0
  180. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/em_site.html +0 -0
  181. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/em_totals.html +0 -0
  182. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/energisation_status.html +0 -0
  183. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/energisation_statuses.html +0 -0
  184. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/era_edit.html +0 -0
  185. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/era_edit_form.html +0 -0
  186. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/era_supplier_bill_add.html +0 -0
  187. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/generator_type.html +0 -0
  188. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/generator_types.html +0 -0
  189. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/gsp_group.html +0 -0
  190. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/gsp_groups.html +0 -0
  191. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/hh_datum_edit.html +0 -0
  192. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/lafs.html +0 -0
  193. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/llfc.html +0 -0
  194. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/llfc_edit.html +0 -0
  195. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/llfcs.html +0 -0
  196. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/market_role.html +0 -0
  197. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/market_roles.html +0 -0
  198. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/meter_payment_type.html +0 -0
  199. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/meter_payment_types.html +0 -0
  200. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/meter_type.html +0 -0
  201. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/meter_types.html +0 -0
  202. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_batch.html +0 -0
  203. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_batch_add.html +0 -0
  204. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_batch_edit.html +0 -0
  205. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_batch_file.html +0 -0
  206. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_batch_file_edit.html +0 -0
  207. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_batch_upload_file.html +0 -0
  208. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_batches.html +0 -0
  209. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_bill.html +0 -0
  210. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_bill_add.html +0 -0
  211. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_bill_edit.html +0 -0
  212. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_bill_import.html +0 -0
  213. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_bill_imports.html +0 -0
  214. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_contract.html +0 -0
  215. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_contract_add.html +0 -0
  216. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_contract_edit.html +0 -0
  217. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_contracts.html +0 -0
  218. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_rate_script.html +0 -0
  219. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_rate_script_add.html +0 -0
  220. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mop_rate_script_edit.html +0 -0
  221. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mtc.html +0 -0
  222. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mtc_llfc.html +0 -0
  223. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mtc_llfc_ssc.html +0 -0
  224. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mtc_llfc_ssc_pc.html +0 -0
  225. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mtc_llfc_ssc_pcs.html +0 -0
  226. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mtc_llfc_sscs.html +0 -0
  227. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mtc_llfcs.html +0 -0
  228. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mtc_participant.html +0 -0
  229. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mtc_participants.html +0 -0
  230. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mtc_ssc.html +0 -0
  231. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mtc_sscs.html +0 -0
  232. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/mtcs.html +0 -0
  233. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/ods_monthly_duration.html +0 -0
  234. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/participant.html +0 -0
  235. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/participants.html +0 -0
  236. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/parties.html +0 -0
  237. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/party.html +0 -0
  238. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/pc.html +0 -0
  239. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/pcs.html +0 -0
  240. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/read_add.html +0 -0
  241. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/read_edit.html +0 -0
  242. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/read_type.html +0 -0
  243. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/read_types.html +0 -0
  244. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/scenario.html +0 -0
  245. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/scenario_add.html +0 -0
  246. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/scenario_docs.html +0 -0
  247. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/scenario_edit.html +0 -0
  248. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/scenarios.html +0 -0
  249. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/site_add_e_supply.html +0 -0
  250. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/site_add_e_supply_form.html +0 -0
  251. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/site_hh_data.html +0 -0
  252. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/site_site_snags.html +0 -0
  253. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/site_snag.html +0 -0
  254. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/site_snag_edit.html +0 -0
  255. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/site_snags.html +0 -0
  256. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/site_snags_edit.html +0 -0
  257. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/source.html +0 -0
  258. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/sources.html +0 -0
  259. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/ssc.html +0 -0
  260. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/sscs.html +0 -0
  261. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_batch.html +0 -0
  262. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_batch_add.html +0 -0
  263. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_batch_edit.html +0 -0
  264. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_batch_file.html +0 -0
  265. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_batch_file_add.html +0 -0
  266. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_batch_file_edit.html +0 -0
  267. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_batch_upload_file.html +0 -0
  268. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_batches.html +0 -0
  269. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_bill.html +0 -0
  270. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_bill_add.html +0 -0
  271. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_bill_edit.html +0 -0
  272. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_bill_import.html +0 -0
  273. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_bill_imports.html +0 -0
  274. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_contract.html +0 -0
  275. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_contract_add.html +0 -0
  276. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_contract_edit.html +0 -0
  277. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_contracts.html +0 -0
  278. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_rate_script.html +0 -0
  279. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_rate_script_add.html +0 -0
  280. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supplier_rate_script_edit.html +0 -0
  281. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supply.html +0 -0
  282. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supply_edit.html +0 -0
  283. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supply_eras.html +0 -0
  284. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supply_hh_data.html +0 -0
  285. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supply_months.html +0 -0
  286. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supply_note_add.html +0 -0
  287. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supply_note_edit.html +0 -0
  288. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supply_notes.html +0 -0
  289. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supply_post.html +0 -0
  290. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/supply_virtual_bill.html +0 -0
  291. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/tpr.html +0 -0
  292. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/e/tprs.html +0 -0
  293. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/edi_viewer.html +0 -0
  294. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/batch.html +0 -0
  295. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/batch_add.html +0 -0
  296. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/batch_edit.html +0 -0
  297. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/batches.html +0 -0
  298. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/bill.html +0 -0
  299. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/bill_add.html +0 -0
  300. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/bill_edit.html +0 -0
  301. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/bill_import.html +0 -0
  302. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/bill_imports.html +0 -0
  303. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/dn.html +0 -0
  304. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/dns.html +0 -0
  305. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/era_edit.html +0 -0
  306. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/exit_zone.html +0 -0
  307. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/industry_auto_importer.html +0 -0
  308. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/industry_contract.html +0 -0
  309. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/industry_contract_add.html +0 -0
  310. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/industry_contract_edit.html +0 -0
  311. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/industry_contracts.html +0 -0
  312. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/industry_rate_script.html +0 -0
  313. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/industry_rate_script_add.html +0 -0
  314. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/industry_rate_script_edit.html +0 -0
  315. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/ldz.html +0 -0
  316. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/read_add.html +0 -0
  317. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/read_edit.html +0 -0
  318. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/read_type.html +0 -0
  319. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/read_types.html +0 -0
  320. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/reading_frequencies.html +0 -0
  321. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/reading_frequency.html +0 -0
  322. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/reports.html +0 -0
  323. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/supplier_contract.html +0 -0
  324. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/supplier_contract_add.html +0 -0
  325. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/supplier_contracts.html +0 -0
  326. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/supplier_rate_script.html +0 -0
  327. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/supplier_rate_script_add.html +0 -0
  328. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/supplier_rate_script_edit.html +0 -0
  329. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/supplies.html +0 -0
  330. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/supply.html +0 -0
  331. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/supply_edit.html +0 -0
  332. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/supply_note_add.html +0 -0
  333. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/supply_note_edit.html +0 -0
  334. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/supply_notes.html +0 -0
  335. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/unit.html +0 -0
  336. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/g/units.html +0 -0
  337. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/general_import.html +0 -0
  338. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/general_imports.html +0 -0
  339. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/input_date.html +0 -0
  340. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/local_report.html +0 -0
  341. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/local_reports.html +0 -0
  342. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/macros.html +0 -0
  343. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/national_grid.html +0 -0
  344. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/non_core_auto_importer.html +0 -0
  345. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/non_core_contract.html +0 -0
  346. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/non_core_contract_edit.html +0 -0
  347. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/non_core_contracts.html +0 -0
  348. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/non_core_rate_script.html +0 -0
  349. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/non_core_rate_script_add.html +0 -0
  350. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/non_core_rate_script_edit.html +0 -0
  351. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/object_summary.html +0 -0
  352. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/rate_server.html +0 -0
  353. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/report_run.html +0 -0
  354. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/report_run_asset_comparison.html +0 -0
  355. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/report_run_bill_check.html +0 -0
  356. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/report_run_ecoes_comparison.html +0 -0
  357. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/report_run_row.html +0 -0
  358. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/report_run_row_bill_check.html +0 -0
  359. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/report_run_supply_contacts.html +0 -0
  360. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/report_runs.html +0 -0
  361. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/site.html +0 -0
  362. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/site_add.html +0 -0
  363. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/site_edit.html +0 -0
  364. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/site_gen_graph.html +0 -0
  365. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/site_hh_data.html +0 -0
  366. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/site_months.html +0 -0
  367. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/site_used_graph.html +0 -0
  368. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/sites.html +0 -0
  369. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/supplies.html +0 -0
  370. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/system.html +0 -0
  371. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/tester.html +0 -0
  372. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/user.html +0 -0
  373. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/user_roles.html +0 -0
  374. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/templates/users.html +0 -0
  375. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/testing.py +0 -0
  376. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/chellow/utils.py +0 -0
  377. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/gpl.txt +0 -0
  378. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/pyproject.toml +0 -0
  379. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/requirements.txt +0 -0
  380. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/setup.cfg +0 -0
  381. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/systemd/chellow.service +0 -0
  382. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/systemd/chellow_upgrader.service +0 -0
  383. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/systemd/chellow_upgrader.timer +0 -0
  384. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/conftest.py +0 -0
  385. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_activity_mop_stark_xlsx.py +0 -0
  386. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_annual_mop_stark_xlsx.py +0 -0
  387. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_csv.py +0 -0
  388. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_engie_edi.py +0 -0
  389. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_engie_xls.py +0 -0
  390. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_engie_xlsx.py +0 -0
  391. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_haven_csv.py +0 -0
  392. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_haven_edi.py +0 -0
  393. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_haven_edi_tprs.py +0 -0
  394. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_nonsettlement_dc_stark_xlsx/bills.nonsettlement.dc.stark.xlsx +0 -0
  395. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_nonsettlement_dc_stark_xlsx/bills_old.nonsettlement.dc.stark.xlsx +0 -0
  396. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_nonsettlement_dc_stark_xlsx/test_bill_parser_nonsettlement_dc_stark_xlsx.py +0 -0
  397. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_settlement_dc_stark_xlsx/bills.settlement.dc.stark.xlsx +0 -0
  398. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_settlement_dc_stark_xlsx/test_bill_parser_settlement_dc_stark_xlsx.py +0 -0
  399. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_sse_edi.py +0 -0
  400. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/bill_parsers/test_bill_parser_sww_xls.py +0 -0
  401. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/system_price/prices.xls +0 -0
  402. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/system_price/test_system_price.py +0 -0
  403. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_aahedc.py +0 -0
  404. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_bill_importer.py +0 -0
  405. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_bsuos.py +0 -0
  406. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_ccl.py +0 -0
  407. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_computer.py +0 -0
  408. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_dno_rate_parser.py +0 -0
  409. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_duos.py +0 -0
  410. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_e_views.py +0 -0
  411. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_hh_importer.py +0 -0
  412. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_laf_importer.py +0 -0
  413. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_mdd_importer.py +0 -0
  414. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_rcrc_importer.py +0 -0
  415. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_ro.py +0 -0
  416. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_scenario.py +0 -0
  417. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_tlms.py +0 -0
  418. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_tnuos.py +0 -0
  419. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/e/test_triad.py +0 -0
  420. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/gas/bill_parsers/test_g_bill_parser_engie_edi.py +0 -0
  421. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/gas/test_dn_rate_parser.py +0 -0
  422. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/gas/test_engine.py +0 -0
  423. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/gas/test_g_cv.py +0 -0
  424. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/gas/test_transportation.py +0 -0
  425. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_g_monthly_duration.py +0 -0
  426. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_g_supplies_snapshot.py +0 -0
  427. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_g_supply_virtual_bill.py +0 -0
  428. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_g_virtual_bills_hh.py +0 -0
  429. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_109.py +0 -0
  430. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_111.py +0 -0
  431. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_169.py +0 -0
  432. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_181.py +0 -0
  433. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_183.py +0 -0
  434. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_187.py +0 -0
  435. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_219.py +0 -0
  436. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_231.py +0 -0
  437. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_247.py +0 -0
  438. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_29.py +0 -0
  439. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_291.py +0 -0
  440. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_33.py +0 -0
  441. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_387.py +0 -0
  442. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_41.py +0 -0
  443. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_429.py +0 -0
  444. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_59.py +0 -0
  445. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_81.py +0 -0
  446. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_87.py +0 -0
  447. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_asset_comparison.py +0 -0
  448. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_batches.py +0 -0
  449. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_bills.py +0 -0
  450. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_dno_vl_parser.py +0 -0
  451. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/reports/test_report_ecoes_comparison.py +0 -0
  452. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/test_chellow.py +0 -0
  453. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/test_edi_viewer.py +0 -0
  454. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/test_general_import.py +0 -0
  455. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/test_models.py +0 -0
  456. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/test_rate_server.py +0 -0
  457. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/test_testing.py +0 -0
  458. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/test_utils.py +0 -0
  459. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/test_views.py +0 -0
  460. {chellow-1704810179.0.0 → chellow-1705585731.0.0}/test/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: chellow
3
- Version: 1704810179.0.0
3
+ Version: 1705585731.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)
@@ -0,0 +1 @@
1
+ __version__ = "1705585731.0.0"
@@ -54,6 +54,7 @@ def get_importer_modules():
54
54
  chellow.e.bsuos,
55
55
  chellow.e.system_price,
56
56
  chellow.e.hh_importer,
57
+ chellow.e.lcc,
57
58
  chellow.testing,
58
59
  chellow.e.tlms,
59
60
  chellow.bank_holidays,
@@ -0,0 +1,305 @@
1
+ from datetime import datetime as Datetime
2
+
3
+ from dateutil.relativedelta import relativedelta
4
+ from sqlalchemy import null, or_, select
5
+
6
+ from chellow.e.lcc import api_search, api_sql
7
+ from chellow.models import Contract, RateScript
8
+ from chellow.utils import ct_datetime, hh_format, to_ct, to_utc
9
+
10
+
11
+ def hh(data_source):
12
+ try:
13
+ cfd_cache = data_source.caches["cfd"]
14
+ except KeyError:
15
+ cfd_cache = data_source.caches["cfd"] = {}
16
+
17
+ for h in data_source.hh_data:
18
+ try:
19
+ h["cfd-rate"] = cfd_cache[h["start-date"]]
20
+ except KeyError:
21
+ h_start = h["start-date"]
22
+ daily_contract = Contract.get_non_core_by_name(
23
+ data_source.sess, "cfd_reconciled_daily_levy_rates"
24
+ )
25
+ daily_rs = data_source.sess.scalars(
26
+ select(RateScript).where(
27
+ RateScript.contract == daily_contract,
28
+ RateScript.start_date <= h_start,
29
+ or_(
30
+ RateScript.finish_date == null(),
31
+ RateScript.finish_date >= h_start,
32
+ ),
33
+ )
34
+ ).one_or_none()
35
+ if daily_rs.finish_date is None and h_start >= to_utc(
36
+ to_ct(daily_rs.start_date) + relativedelta(months=3)
37
+ ):
38
+ base_rate = data_source.non_core_rate(
39
+ "cfd_in_period_tracking", h_start
40
+ )["rate_gbp_per_kwh"]
41
+ else:
42
+ base_rate = data_source.non_core_rate(
43
+ "cfd_reconciled_daily_levy_rates", h_start
44
+ )["rate_gbp_per_kwh"]
45
+
46
+ effective_ocl_rate = data_source.non_core_rate(
47
+ "cfd_operational_costs_levy", h["start-date"]
48
+ )["record"]["Effective_OCL_Rate_GBP_Per_MWh"]
49
+ if effective_ocl_rate == "":
50
+ levy_rate_str = data_source.non_core_rate(
51
+ "cfd_operational_costs_levy", h["start-date"]
52
+ )["record"]["OCL_Rate_GBP_Per_MWh"]
53
+ else:
54
+ levy_rate_str = effective_ocl_rate
55
+ levy_rate = float(levy_rate_str) / 1000
56
+ h["cfd-rate"] = cfd_cache[h["start-date"]] = float(base_rate) + levy_rate
57
+
58
+
59
+ def lcc_import(sess, log, set_progress, s):
60
+ import_in_period_tracking(sess, log, set_progress, s)
61
+ import_operational_costs_levy(sess, log, set_progress, s)
62
+ import_reconciled_daily_levy_rates(sess, log, set_progress, s)
63
+
64
+
65
+ def _quarters(s):
66
+ quarter = {}
67
+ res_j = api_search(
68
+ s, "2fc2fad9-ad57-4901-982a-f92d4ef6c622", sort="Settlement_Date"
69
+ )
70
+ for record in res_j["result"]["records"]:
71
+ settlement_date_str = record["Settlement_Date"]
72
+ settlement_date_ct = to_ct(
73
+ Datetime.strptime(settlement_date_str[:10], "%Y-%m-%d")
74
+ )
75
+ settlement_date = to_utc(settlement_date_ct)
76
+
77
+ quarter[settlement_date] = record
78
+ settlement_next_ct = settlement_date_ct + relativedelta(days=1)
79
+
80
+ if settlement_next_ct.month in (1, 4, 7, 10) and settlement_next_ct.day == 1:
81
+ yield quarter
82
+ quarter = {}
83
+
84
+
85
+ def _parse_number(num_str):
86
+ if num_str == "":
87
+ return 0
88
+ else:
89
+ return float(num_str)
90
+
91
+
92
+ def _parse_date(date_str):
93
+ return to_utc(to_ct(Datetime.strptime(date_str[:10], "%Y-%m-%d")))
94
+
95
+
96
+ def import_in_period_tracking(sess, log, set_progress, s):
97
+ log("Starting to check for new LCC CfD In-Period Tracking")
98
+
99
+ contract_name = "cfd_in_period_tracking"
100
+ contract = Contract.find_non_core_by_name(sess, contract_name)
101
+ if contract is None:
102
+ contract = Contract.insert_non_core(
103
+ sess, contract_name, "", {}, to_utc(ct_datetime(1996, 4, 1)), None, {}
104
+ )
105
+
106
+ for quarter in _quarters(s):
107
+ quarter_start = sorted(quarter.keys())[0]
108
+ rs = sess.execute(
109
+ select(RateScript).where(
110
+ RateScript.contract == contract,
111
+ RateScript.start_date == quarter_start,
112
+ )
113
+ ).scalar_one_or_none()
114
+ if rs is None:
115
+ rs = contract.insert_rate_script(sess, quarter_start, {"records": {}})
116
+
117
+ gbp = 0
118
+ kwh = 0
119
+ for record in quarter.values():
120
+ gbp += _parse_number(record["Actual_CFD_Payments_GBP"])
121
+ gbp += _parse_number(record["Expected_CFD_Payments_GBP"])
122
+ kwh += _parse_number(record["Actual_Eligible_Demand_MWh"]) * 1000
123
+ kwh += _parse_number(record["Expected_Eligible_Demand_MWh"]) * 1000
124
+
125
+ rate = gbp / kwh
126
+
127
+ rs_script = rs.make_script()
128
+ records = rs_script["records"]
129
+ for k, v in sorted(quarter.items()):
130
+ records[hh_format(k)] = v
131
+ rs_script["rate_gbp_per_kwh"] = rate
132
+ rs.update(rs_script)
133
+ sess.commit()
134
+ log("Finished LCC CfD In-Period Tracking")
135
+
136
+
137
+ def import_operational_costs_levy(sess, log, set_progress, s):
138
+ log("Starting to check for new LCC CfD Operational Costs Levy")
139
+
140
+ contract_name = "cfd_operational_costs_levy"
141
+ contract = Contract.find_non_core_by_name(sess, contract_name)
142
+ if contract is None:
143
+ contract = Contract.insert_non_core(
144
+ sess, contract_name, "", {}, to_utc(ct_datetime(1996, 4, 1)), None, {}
145
+ )
146
+
147
+ res_j = api_search(s, "44f41eac-61b3-4e8d-8c52-3eda7b8e8517", sort="Period_Start")
148
+ for record in res_j["result"]["records"][1:]: # skip title row
149
+ period_start_str = record["Period_Start"]
150
+ period_start = to_utc(
151
+ to_ct(Datetime.strptime(period_start_str[:10], "%Y-%m-%d"))
152
+ )
153
+
154
+ rs = sess.execute(
155
+ select(RateScript).where(
156
+ RateScript.contract == contract,
157
+ RateScript.start_date == period_start,
158
+ )
159
+ ).scalar_one_or_none()
160
+ if rs is None:
161
+ rs = contract.insert_rate_script(sess, period_start, {})
162
+
163
+ rs_script = rs.make_script()
164
+ rs_script["record"] = record
165
+ rs.update(rs_script)
166
+ sess.commit()
167
+
168
+
169
+ RUN_TYPES = ("II", "SF", "R1", "R2", "R3", "RF", "DF")
170
+
171
+
172
+ def _reconciled_days(s, search_from):
173
+ runs = {}
174
+ res_j = api_sql(
175
+ s,
176
+ f"""SELECT * from "e0e163cb-ba36-416d-83fe-976992d61516"
177
+ WHERE "Settlement_Date" > '{search_from}' ORDER BY "Settlement_Date"
178
+ """,
179
+ )
180
+
181
+ records = res_j["result"]["records"]
182
+ if len(records) > 0:
183
+ prev_settlement_date = _parse_date(records[0]["Settlement_Date"])
184
+ runs = {}
185
+ for record in records:
186
+ settlement_date = _parse_date(record["Settlement_Date"])
187
+ if settlement_date != prev_settlement_date:
188
+ yield prev_settlement_date, runs
189
+ runs = {}
190
+
191
+ settlement_run_type = record["Settlement_Run_Type"]
192
+ runs[settlement_run_type] = record
193
+ prev_settlement_date = settlement_date
194
+
195
+ yield settlement_date, runs
196
+
197
+
198
+ def _reconciled_daily_quarters(s, search_from):
199
+ quarter = {}
200
+ for settlement_date, lcc_runs in _reconciled_days(s, search_from):
201
+ try:
202
+ runs = quarter[settlement_date]
203
+ except KeyError:
204
+ runs = quarter[settlement_date] = {}
205
+
206
+ for run_type, record in lcc_runs.items():
207
+ runs[run_type] = record
208
+
209
+ settlement_next_ct = to_ct(settlement_date) + relativedelta(days=1)
210
+
211
+ if settlement_next_ct.month in (1, 4, 7, 10) and settlement_next_ct.day == 1:
212
+ yield quarter
213
+ quarter = {}
214
+
215
+
216
+ def import_reconciled_daily_levy_rates(sess, log, set_progress, s):
217
+ log("Starting to check for new LCC CfD Reconciled Daily Levy Rates")
218
+
219
+ contract_name = "cfd_reconciled_daily_levy_rates"
220
+ contract = Contract.find_non_core_by_name(sess, contract_name)
221
+ if contract is None:
222
+ contract = Contract.insert_non_core(
223
+ sess, contract_name, "", {}, to_utc(ct_datetime(1996, 4, 1)), None, {}
224
+ )
225
+
226
+ search_from = "1996-04-01"
227
+ for rs in sess.scalars(
228
+ select(RateScript)
229
+ .where(RateScript.contract == contract)
230
+ .order_by(RateScript.start_date.desc())
231
+ ):
232
+ script = rs.make_script()
233
+ try:
234
+ records = script["records"]
235
+ except KeyError:
236
+ break
237
+
238
+ complete = True
239
+ rs_start_ct = to_ct(rs.start_date)
240
+ quarter_finish_ct = (
241
+ rs_start_ct + relativedelta(months=3) - relativedelta(days=1)
242
+ )
243
+ day_ct = rs_start_ct
244
+ while day_ct <= quarter_finish_ct:
245
+ try:
246
+ records[hh_format(to_utc(day_ct))]["DF"]
247
+ except KeyError:
248
+ complete = False
249
+ break
250
+
251
+ day_ct += relativedelta(days=1)
252
+
253
+ if complete:
254
+ search_from = quarter_finish_ct.strftime("%Y-%m-%d")
255
+ else:
256
+ break
257
+
258
+ for quarter in _reconciled_daily_quarters(s, search_from):
259
+ quarter_start = sorted(quarter.keys())[0]
260
+ rs = sess.execute(
261
+ select(RateScript).where(
262
+ RateScript.contract == contract,
263
+ RateScript.start_date == quarter_start,
264
+ )
265
+ ).scalar_one_or_none()
266
+ if rs is None:
267
+ rs = contract.insert_rate_script(sess, quarter_start, {"records": {}})
268
+
269
+ gbp = 0
270
+ kwh = 0
271
+ run_types_reverse = list(reversed(RUN_TYPES))
272
+ for runs in quarter.values():
273
+ top_run = None
274
+ for run_type in run_types_reverse:
275
+ if run_type in runs:
276
+ top_run = runs[run_type]
277
+ break
278
+
279
+ eligible_mwh = _parse_number(top_run["Reconciled_Eligible_Demand_MWh"])
280
+ gbp += (
281
+ _parse_number(top_run["Reconciled_Daily_Levy_Rate_GBP_Per_MWh"])
282
+ * eligible_mwh
283
+ )
284
+ kwh += eligible_mwh * 1000
285
+
286
+ rate = gbp / kwh
287
+
288
+ rs_script = rs.make_script()
289
+ records = rs_script["records"]
290
+ for dt, runs in sorted(quarter.items()):
291
+ date_str = hh_format(dt)
292
+ try:
293
+ rs_runs = records[date_str]
294
+ except KeyError:
295
+ rs_runs = records[date_str] = {}
296
+
297
+ for run_type, record in runs.items():
298
+ rs_runs[run_type] = record
299
+
300
+ rs_script["rate_gbp_per_kwh"] = rate
301
+ rs.update(rs_script)
302
+ sess.commit()
303
+
304
+ log("Finished LCC CfD Reconciled Daily Levy Rates")
305
+ sess.commit()
@@ -0,0 +1,164 @@
1
+ import atexit
2
+ import collections
3
+ import threading
4
+ import traceback
5
+ from datetime import timedelta
6
+ from importlib import import_module
7
+
8
+ import requests
9
+
10
+ from werkzeug.exceptions import BadRequest
11
+
12
+ from chellow.models import (
13
+ Contract,
14
+ Session,
15
+ )
16
+ from chellow.utils import ct_datetime_now, hh_format, utc_datetime_now
17
+
18
+
19
+ importer = None
20
+
21
+
22
+ def api_sql(s, sql):
23
+ url = "https://dp.lowcarboncontracts.uk/api/3/action/datastore_search_sql"
24
+ params = {"sql": sql}
25
+ res = s.get(url, params=params)
26
+ try:
27
+ res_j = res.json()
28
+ except requests.exceptions.JSONDecodeError as e:
29
+ raise BadRequest(
30
+ f"Couldn't parse as JSON the content from {url} with error {e}: "
31
+ f"{res.text}"
32
+ )
33
+
34
+ if "success" in res_j and not res_j["success"]:
35
+ raise BadRequest(res_j)
36
+
37
+ return res_j
38
+
39
+
40
+ def api_search(s, resource_id, sort=None):
41
+ url = "https://dp.lowcarboncontracts.uk/api/3/action/datastore_search"
42
+ params = {"resource_id": resource_id}
43
+ if sort is not None:
44
+ params["sort"] = sort
45
+ res = s.get(url, params=params)
46
+ try:
47
+ res_j = res.json()
48
+ except requests.exceptions.JSONDecodeError as e:
49
+ raise BadRequest(
50
+ f"Couldn't parse as JSON the content from {url} with error {e}: "
51
+ f"{res.text}"
52
+ )
53
+
54
+ if "success" in res_j and not res_j["success"]:
55
+ raise BadRequest(res_j)
56
+
57
+ return res_j
58
+
59
+
60
+ def run_import(sess, log, set_progress):
61
+ log("Starting to import data from the Low Carbon Contracts Company")
62
+ s = requests.Session()
63
+ s.verify = False
64
+
65
+ for mod_name in ("chellow.e.cfd",):
66
+ mod = import_module(mod_name)
67
+ mod.lcc_import(sess, log, set_progress, s)
68
+
69
+
70
+ LAST_RUN_KEY = "last_run"
71
+ GLOBAL_ALERT = (
72
+ "There's a problem with a <a href='/lcc'>Low Carbon Contracts import</a>."
73
+ )
74
+ LCC_STATE_KEY = "lcc"
75
+
76
+
77
+ class LowCarbonContracts(threading.Thread):
78
+ def __init__(self):
79
+ super().__init__(name="Low Carbon Contracts")
80
+ self.messages = collections.deque(maxlen=500)
81
+ self.progress = ""
82
+ self.stopped = threading.Event()
83
+ self.going = threading.Event()
84
+ self.global_alert = None
85
+
86
+ def stop(self):
87
+ self.stopped.set()
88
+ self.going.set()
89
+ self.join()
90
+
91
+ def go(self):
92
+ self.going.set()
93
+
94
+ def log(self, message):
95
+ self.messages.appendleft(
96
+ f"{ct_datetime_now().strftime('%Y-%m-%d %H:%M:%S')} - {message}"
97
+ )
98
+
99
+ def set_progress(self, progress):
100
+ self.progress = progress
101
+
102
+ def run(self):
103
+ while not self.stopped.is_set():
104
+ with Session() as sess:
105
+ try:
106
+ config = Contract.get_non_core_by_name(sess, "configuration")
107
+ state = config.make_state()
108
+ lcc_state = state.get(LCC_STATE_KEY, {})
109
+ except BaseException as e:
110
+ msg = f"{e.description} " if isinstance(e, BadRequest) else ""
111
+ self.log(f"{msg}{traceback.format_exc()}")
112
+ self.global_alert = GLOBAL_ALERT
113
+ sess.rollback()
114
+
115
+ last_run = lcc_state.get(LAST_RUN_KEY)
116
+ if last_run is None or utc_datetime_now() - last_run > timedelta(days=1):
117
+ self.going.set()
118
+
119
+ if self.going.is_set():
120
+ self.global_alert = None
121
+ with Session() as sess:
122
+ try:
123
+ config = Contract.get_non_core_by_name(sess, "configuration")
124
+ state = config.make_state()
125
+ try:
126
+ lcc_state = state[LCC_STATE_KEY]
127
+ except KeyError:
128
+ lcc_state = state[LCC_STATE_KEY] = {}
129
+
130
+ lcc_state[LAST_RUN_KEY] = utc_datetime_now()
131
+ config.update_state(state)
132
+ sess.commit()
133
+ run_import(sess, self.log, self.set_progress)
134
+ except BaseException as e:
135
+ msg = f"{e.description} " if isinstance(e, BadRequest) else ""
136
+ self.log(f"{msg}{traceback.format_exc()}")
137
+ self.global_alert = GLOBAL_ALERT
138
+ sess.rollback()
139
+ finally:
140
+ self.going.clear()
141
+ self.log("Finished importing Low Carbon Contracts data.")
142
+
143
+ else:
144
+ self.log(
145
+ f"The importer was last run at {hh_format(last_run)}. There will "
146
+ f"be another import when 24 hours have elapsed since the last run."
147
+ )
148
+ self.going.wait(60 * 60)
149
+
150
+
151
+ def get_importer():
152
+ return importer
153
+
154
+
155
+ def startup():
156
+ global importer
157
+ importer = LowCarbonContracts()
158
+ importer.start()
159
+
160
+
161
+ @atexit.register
162
+ def shutdown():
163
+ if importer is not None:
164
+ importer.stop()
@@ -29,6 +29,7 @@ from werkzeug.exceptions import BadRequest
29
29
  from zish import dumps, loads
30
30
 
31
31
  import chellow.e.dno_rate_parser
32
+ import chellow.e.lcc
32
33
  from chellow.e.computer import SupplySource, contract_func, forecast_date
33
34
  from chellow.e.energy_management import totals_runner
34
35
  from chellow.models import (
@@ -2330,6 +2331,23 @@ def lafs_get():
2330
2331
  return render_template("lafs.html", dno=dno, llfc=llfc, lafs=lafs)
2331
2332
 
2332
2333
 
2334
+ @e.route("/lcc")
2335
+ def lcc_get():
2336
+ importer = chellow.e.lcc.importer
2337
+
2338
+ return render_template(
2339
+ "lcc.html",
2340
+ importer=importer,
2341
+ )
2342
+
2343
+
2344
+ @e.route("/lcc", methods=["POST"])
2345
+ def lcc_post():
2346
+ importer = chellow.e.lcc.importer
2347
+ importer.go()
2348
+ return chellow_redirect("/lcc", 303)
2349
+
2350
+
2333
2351
  @e.route("/llfcs")
2334
2352
  def llfcs_get():
2335
2353
  dno_id = req_int("dno_id")
@@ -1534,17 +1534,27 @@ def supplier_contract_edit_get(g_contract_id):
1534
1534
  def supplier_contract_edit_post(g_contract_id):
1535
1535
  try:
1536
1536
  g_contract = GContract.get_by_id(g.sess, g_contract_id)
1537
- if "delete" in request.values:
1538
- g_contract.delete(g.sess)
1539
- g.sess.commit()
1540
- return chellow_redirect("/supplier_contracts", 303)
1541
- else:
1542
- name = req_str("name")
1543
- charge_script = req_str("charge_script")
1544
- properties = req_zish("properties")
1545
- g_contract.update(name, charge_script, properties)
1546
- g.sess.commit()
1547
- return chellow_redirect(f"/supplier_contracts/{g_contract.id}", 303)
1537
+ name = req_str("name")
1538
+ charge_script = req_str("charge_script")
1539
+ properties = req_zish("properties")
1540
+ g_contract.update(name, charge_script, properties)
1541
+ g.sess.commit()
1542
+ return chellow_redirect(f"/supplier_contracts/{g_contract.id}", 303)
1543
+ except BadRequest as e:
1544
+ flash(e.description)
1545
+ g.sess.rollback()
1546
+ return make_response(
1547
+ render_template("supplier_contract_edit.html", g_contract=g_contract), 400
1548
+ )
1549
+
1550
+
1551
+ @gas.route("/supplier_contracts/<int:g_contract_id>/edit", methods=["DELETE"])
1552
+ def supplier_contract_edit_delete(g_contract_id):
1553
+ try:
1554
+ g_contract = GContract.get_by_id(g.sess, g_contract_id)
1555
+ g_contract.delete(g.sess)
1556
+ g.sess.commit()
1557
+ return hx_redirect("/supplier_contracts", 303)
1548
1558
  except BadRequest as e:
1549
1559
  flash(e.description)
1550
1560
  g.sess.rollback()
@@ -0,0 +1,55 @@
1
+ {% extends "base.html" %}
2
+
3
+ {% block title %}
4
+ &raquo; Low Carbon Contracts Importer
5
+ {% endblock %}
6
+
7
+ {% block nav %}
8
+ Low Carbon Contracts Importer
9
+ {% endblock %}
10
+
11
+ {% block content %}
12
+ {% if importer %}
13
+ <ul>
14
+ <li><a href="#controls">Controls</a></li>
15
+ <li><a href="#log">Log</a></li>
16
+ </ul>
17
+
18
+ <h4 id="controls">Controls</h4>
19
+
20
+ <table>
21
+ <tr>
22
+ <th>Is Going?</th>
23
+ <td>{{importer.going.is_set()}}</td>
24
+ </tr>
25
+ <tr>
26
+ <th>Import Now</th>
27
+ <td>
28
+ <form method="post" action="/e/lcc">
29
+ <fieldset {% if importer.going.is_set() %}disabled{% endif %}>
30
+ <input type="submit" value="Import" name="import">
31
+ </fieldset>
32
+ </form>
33
+ </td>
34
+ </tr>
35
+ {% if importer.going.is_set() %}
36
+ <tr>
37
+ <th>Progress</th>
38
+ <td>{{importer.progress}}</td>
39
+ </tr>
40
+ {% endif %}
41
+ </table>
42
+
43
+
44
+ <h4 id="log">Log</h4>
45
+
46
+ <ul>
47
+ {% for message in importer.messages %}
48
+ <li>{{message}}</li>
49
+ {% endfor %}
50
+ </ul>
51
+
52
+ {% else %}
53
+ <p>Importer not present.</p>
54
+ {% endif %}
55
+ {% endblock %}
@@ -0,0 +1,40 @@
1
+ {% extends "base.html" %}
2
+
3
+ {% block title %}
4
+ Gas Contracts &raquo; {{g_contract.name}}
5
+ {% endblock %}
6
+
7
+ {% block nav %}
8
+ <a href="/g/supplier_contracts">Gas Contracts</a> &raquo;
9
+ <a href="/g/supplier_contracts/{{g_contract.id}}">{{g_contract.name}}</a> &raquo; Edit
10
+ {% endblock %}
11
+
12
+ {% block content %}
13
+
14
+ <form action="/g/supplier_contracts/{{g_contract.id}}/edit" method="post">
15
+ <fieldset>
16
+ <legend>Update Contract</legend>
17
+ <label>Name</label>
18
+ {{input_text('name', g_contract.name)}}
19
+ <label>Charge script</label>
20
+ {{input_textarea('charge_script', g_contract.charge_script, 40, 80)}}
21
+ <label>Properties</label>
22
+ {{input_textarea('properties', g_contract.properties, 20, 80)}}
23
+ <input type="submit" name="update" value="Update">
24
+ </fieldset>
25
+ </form>
26
+
27
+ <h3>Example Properties</h3>
28
+
29
+ <pre>{
30
+ "default_bill_parser": "csv",
31
+ }</pre>
32
+
33
+ <form hx-delete="/g/supplier_contracts/{{g_contract.id}}/edit"
34
+ hx-confirm="Are you sure you want to delete this supplier contract?">
35
+ <fieldset>
36
+ <legend>Delete this contract</legend>
37
+ <input type="submit" value="Delete">
38
+ </fieldset>
39
+ </form>
40
+ {% endblock %}
@@ -213,6 +213,7 @@
213
213
  <li><a href="/api/v1" >API</a></li>
214
214
  <li><a href="/rate_server">Automatic Importer: Rate Server</a></li>
215
215
  <li><a href="/national_grid">Automatic Importer: National Grid</a></li>
216
+ <li><a href="/e/lcc">Automatic Importer: Low Carbon Contracts</a></li>
216
217
  </ul>
217
218
 
218
219
  <ul>
@@ -61,6 +61,7 @@ import chellow.e.bsuos
61
61
  import chellow.e.computer
62
62
  import chellow.e.hh_importer
63
63
  import chellow.e.laf_import
64
+ import chellow.e.lcc
64
65
  import chellow.e.mdd_importer
65
66
  import chellow.e.rcrc
66
67
  import chellow.e.system_price
@@ -137,7 +138,6 @@ def chellow_redirect(path, code=None):
137
138
  else:
138
139
  res = redirect(location, code)
139
140
 
140
- res.headers["HX-Redirect"] = location
141
141
  return res
142
142
 
143
143