flextool 4.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.
Files changed (322) hide show
  1. flextool/__init__.py +41 -0
  2. flextool/_mem_sampler.py +193 -0
  3. flextool/_resources.py +43 -0
  4. flextool/calibrate/__init__.py +51 -0
  5. flextool/calibrate/__main__.py +11 -0
  6. flextool/calibrate/_cli.py +316 -0
  7. flextool/calibrate/_db_alt.py +166 -0
  8. flextool/calibrate/_final_outputs.py +110 -0
  9. flextool/calibrate/_guard.py +151 -0
  10. flextool/calibrate/_loop.py +558 -0
  11. flextool/calibrate/_readers.py +223 -0
  12. flextool/calibrate/_report.py +263 -0
  13. flextool/calibrate/_sizing.py +699 -0
  14. flextool/calibrate/_solve.py +134 -0
  15. flextool/calibrate/_solve_status.py +495 -0
  16. flextool/cli/__init__.py +9 -0
  17. flextool/cli/_console.py +51 -0
  18. flextool/cli/_timing.py +147 -0
  19. flextool/cli/cmd_execute_flextool_workflow.py +187 -0
  20. flextool/cli/cmd_export_to_tabular.py +56 -0
  21. flextool/cli/cmd_import_sensitivities.py +75 -0
  22. flextool/cli/cmd_migrate_database.py +13 -0
  23. flextool/cli/cmd_open_results_db.py +269 -0
  24. flextool/cli/cmd_read_matpower.py +66 -0
  25. flextool/cli/cmd_read_old_flextool.py +63 -0
  26. flextool/cli/cmd_read_self_describing_tabular_input.py +50 -0
  27. flextool/cli/cmd_read_tabular_input.py +81 -0
  28. flextool/cli/cmd_run_flextool.py +1095 -0
  29. flextool/cli/cmd_scenario_results.py +284 -0
  30. flextool/cli/cmd_solve_mps.py +169 -0
  31. flextool/cli/cmd_update_flextool.py +17 -0
  32. flextool/cli/cmd_write_outputs.py +125 -0
  33. flextool/common_utils/__init__.py +1 -0
  34. flextool/common_utils/plot_mem_shape.py +77 -0
  35. flextool/common_utils/precision.py +451 -0
  36. flextool/decomposition/__init__.py +0 -0
  37. flextool/decomposition/region_decomposition.py +128 -0
  38. flextool/decomposition/region_filter.py +1261 -0
  39. flextool/engine_polars/__init__.py +110 -0
  40. flextool/engine_polars/_axis_enums.py +742 -0
  41. flextool/engine_polars/_benders.py +3462 -0
  42. flextool/engine_polars/_block_layout.py +1479 -0
  43. flextool/engine_polars/_blocks.py +1515 -0
  44. flextool/engine_polars/_commodity_ladder.py +660 -0
  45. flextool/engine_polars/_cumulative_invest.py +1165 -0
  46. flextool/engine_polars/_db_loader.py +153 -0
  47. flextool/engine_polars/_db_reader.py +127 -0
  48. flextool/engine_polars/_dc_power_flow.py +445 -0
  49. flextool/engine_polars/_delay.py +442 -0
  50. flextool/engine_polars/_derived_arithmetic.py +432 -0
  51. flextool/engine_polars/_derived_block.py +990 -0
  52. flextool/engine_polars/_derived_branch.py +769 -0
  53. flextool/engine_polars/_derived_existing.py +1353 -0
  54. flextool/engine_polars/_derived_npv.py +1297 -0
  55. flextool/engine_polars/_derived_params.py +9850 -0
  56. flextool/engine_polars/_derived_profile.py +881 -0
  57. flextool/engine_polars/_derived_walks.py +276 -0
  58. flextool/engine_polars/_determinism.py +70 -0
  59. flextool/engine_polars/_direct_params.py +2186 -0
  60. flextool/engine_polars/_dump_csvs.py +1009 -0
  61. flextool/engine_polars/_emit_arc_unions.py +1631 -0
  62. flextool/engine_polars/_emit_calc_params.py +729 -0
  63. flextool/engine_polars/_emit_chain_params.py +709 -0
  64. flextool/engine_polars/_emit_co2_accumulators.py +400 -0
  65. flextool/engine_polars/_emit_dispatchers.py +690 -0
  66. flextool/engine_polars/_emit_energy_margin.py +125 -0
  67. flextool/engine_polars/_emit_energy_margin_adder.py +290 -0
  68. flextool/engine_polars/_emit_entity_annual.py +428 -0
  69. flextool/engine_polars/_emit_inflow_scaling.py +1420 -0
  70. flextool/engine_polars/_emit_leaf_sets.py +550 -0
  71. flextool/engine_polars/_emit_lp_scaling.py +665 -0
  72. flextool/engine_polars/_emit_mid_sets.py +859 -0
  73. flextool/engine_polars/_emit_pdt_params.py +759 -0
  74. flextool/engine_polars/_emit_per_solve.py +774 -0
  75. flextool/engine_polars/_emit_period_calc.py +504 -0
  76. flextool/engine_polars/_emit_period_params.py +2398 -0
  77. flextool/engine_polars/_emit_provider_io.py +141 -0
  78. flextool/engine_polars/_emit_reserve.py +574 -0
  79. flextool/engine_polars/_emit_solve_time.py +311 -0
  80. flextool/engine_polars/_emit_solve_writers.py +1249 -0
  81. flextool/engine_polars/_flex_data_accumulator.py +388 -0
  82. flextool/engine_polars/_flex_data_provider.py +478 -0
  83. flextool/engine_polars/_group_slack.py +1253 -0
  84. flextool/engine_polars/_inmemory_reader.py +140 -0
  85. flextool/engine_polars/_input_source.py +336 -0
  86. flextool/engine_polars/_invest_seeds.py +191 -0
  87. flextool/engine_polars/_native_input_writer.py +100 -0
  88. flextool/engine_polars/_native_run_model.py +1348 -0
  89. flextool/engine_polars/_orchestration.py +4314 -0
  90. flextool/engine_polars/_output_writer.py +439 -0
  91. flextool/engine_polars/_param_shapes.py +1595 -0
  92. flextool/engine_polars/_parquet_bundle.py +723 -0
  93. flextool/engine_polars/_pdt_join.py +167 -0
  94. flextool/engine_polars/_pdt_lookup.py +547 -0
  95. flextool/engine_polars/_per_solve_sets.py +335 -0
  96. flextool/engine_polars/_projection_params.py +2056 -0
  97. flextool/engine_polars/_provider_keys.py +173 -0
  98. flextool/engine_polars/_provider_translators.py +225 -0
  99. flextool/engine_polars/_recursive_solve.py +703 -0
  100. flextool/engine_polars/_region_filter.py +2508 -0
  101. flextool/engine_polars/_reserve.py +649 -0
  102. flextool/engine_polars/_solve_acceptance.py +331 -0
  103. flextool/engine_polars/_solve_config.py +1001 -0
  104. flextool/engine_polars/_solve_context.py +885 -0
  105. flextool/engine_polars/_solve_handoff.py +164 -0
  106. flextool/engine_polars/_solve_state.py +232 -0
  107. flextool/engine_polars/_solver_base.py +36 -0
  108. flextool/engine_polars/_solver_dispatch.py +511 -0
  109. flextool/engine_polars/_spinedb_reader.py +1165 -0
  110. flextool/engine_polars/_stochastic.py +593 -0
  111. flextool/engine_polars/_subprocess_solve.py +1838 -0
  112. flextool/engine_polars/_timeline.py +1416 -0
  113. flextool/engine_polars/_vectorize.py +438 -0
  114. flextool/engine_polars/_warm.py +858 -0
  115. flextool/engine_polars/autoscale/__init__.py +107 -0
  116. flextool/engine_polars/autoscale/_config.py +218 -0
  117. flextool/engine_polars/autoscale/_layer2.py +1253 -0
  118. flextool/engine_polars/autoscale/_layer2_types.py +584 -0
  119. flextool/engine_polars/autoscale/_quantity_types.py +621 -0
  120. flextool/engine_polars/autoscale/_report.py +336 -0
  121. flextool/engine_polars/chain.py +259 -0
  122. flextool/engine_polars/input.py +6638 -0
  123. flextool/engine_polars/model.py +4754 -0
  124. flextool/env_check.py +388 -0
  125. flextool/export_to_tabular/__init__.py +5 -0
  126. flextool/export_to_tabular/db_reader.py +224 -0
  127. flextool/export_to_tabular/excel_writer.py +3559 -0
  128. flextool/export_to_tabular/export_settings.yaml +377 -0
  129. flextool/export_to_tabular/export_to_excel.py +227 -0
  130. flextool/export_to_tabular/formatting.py +543 -0
  131. flextool/export_to_tabular/sheet_config.py +876 -0
  132. flextool/gui/__init__.py +0 -0
  133. flextool/gui/__main__.py +118 -0
  134. flextool/gui/calibrate_commands.py +184 -0
  135. flextool/gui/calibrate_jobs.py +424 -0
  136. flextool/gui/check_tree.py +142 -0
  137. flextool/gui/cli_format.py +83 -0
  138. flextool/gui/config_parser.py +68 -0
  139. flextool/gui/data_models.py +362 -0
  140. flextool/gui/db_editor_integration.py +202 -0
  141. flextool/gui/db_version_check.py +269 -0
  142. flextool/gui/dialogs/__init__.py +0 -0
  143. flextool/gui/dialogs/add_dialog.py +1098 -0
  144. flextool/gui/dialogs/calibrate_dialog.py +1259 -0
  145. flextool/gui/dialogs/file_picker.py +473 -0
  146. flextool/gui/dialogs/group_picker.py +299 -0
  147. flextool/gui/dialogs/migration_consent_dialog.py +106 -0
  148. flextool/gui/dialogs/migration_progress_dialog.py +237 -0
  149. flextool/gui/dialogs/plot_dialog.py +459 -0
  150. flextool/gui/dialogs/plot_settings_picker.py +2184 -0
  151. flextool/gui/dialogs/project_dialog.py +426 -0
  152. flextool/gui/dialogs/update_dialog.py +212 -0
  153. flextool/gui/downsampling.py +88 -0
  154. flextool/gui/error_handling.py +50 -0
  155. flextool/gui/execution_manager.py +1715 -0
  156. flextool/gui/execution_window.py +1377 -0
  157. flextool/gui/hover_tooltip.py +111 -0
  158. flextool/gui/input_sources.py +730 -0
  159. flextool/gui/main_window.py +6181 -0
  160. flextool/gui/network_graph.py +215 -0
  161. flextool/gui/output_actions.py +393 -0
  162. flextool/gui/output_log_window.py +159 -0
  163. flextool/gui/platform_utils.py +421 -0
  164. flextool/gui/plot_cache.py +88 -0
  165. flextool/gui/plot_canvas.py +543 -0
  166. flextool/gui/plot_config_reader.py +272 -0
  167. flextool/gui/project_utils.py +100 -0
  168. flextool/gui/result_viewer.py +4394 -0
  169. flextool/gui/scenario_key.py +162 -0
  170. flextool/gui/scenario_lists.py +516 -0
  171. flextool/gui/settings_io.py +360 -0
  172. flextool/gui/solve_reader.py +103 -0
  173. flextool/gui/tree_reorder.py +88 -0
  174. flextool/gui/ui_metrics.py +420 -0
  175. flextool/input_derivation/__init__.py +281 -0
  176. flextool/input_derivation/_commodity_ladder.py +375 -0
  177. flextool/input_derivation/_commodity_ladder_sets.py +70 -0
  178. flextool/input_derivation/_dc_power_flow.py +377 -0
  179. flextool/input_derivation/_method_constants.py +77 -0
  180. flextool/input_derivation/_process_method.py +258 -0
  181. flextool/input_derivation/_specs.py +1026 -0
  182. flextool/input_derivation/_validators.py +321 -0
  183. flextool/lean_parquet.py +159 -0
  184. flextool/model_builder/__init__.py +5 -0
  185. flextool/model_builder/build_model.py +589 -0
  186. flextool/model_builder/encoding.py +67 -0
  187. flextool/model_builder/names.py +34 -0
  188. flextool/model_builder/profiles.py +129 -0
  189. flextool/plot_outputs/__init__.py +14 -0
  190. flextool/plot_outputs/axis_helpers.py +355 -0
  191. flextool/plot_outputs/color_template.py +888 -0
  192. flextool/plot_outputs/config.py +171 -0
  193. flextool/plot_outputs/format_helpers.py +345 -0
  194. flextool/plot_outputs/legend_helpers.py +143 -0
  195. flextool/plot_outputs/orchestrator.py +1141 -0
  196. flextool/plot_outputs/perf.py +37 -0
  197. flextool/plot_outputs/plan.py +1787 -0
  198. flextool/plot_outputs/plot_bars.py +1510 -0
  199. flextool/plot_outputs/plot_bars_detail.py +753 -0
  200. flextool/plot_outputs/plot_lines.py +951 -0
  201. flextool/plot_outputs/shared_manifest.py +564 -0
  202. flextool/plot_outputs/subplot_helpers.py +137 -0
  203. flextool/process_inputs/__init__.py +188 -0
  204. flextool/process_inputs/import_old_excel_input.json +4159 -0
  205. flextool/process_inputs/read_matpower.py +451 -0
  206. flextool/process_inputs/read_old_flextool.py +1288 -0
  207. flextool/process_inputs/read_self_describing_excel.py +1423 -0
  208. flextool/process_inputs/read_tabular_with_specification.py +1114 -0
  209. flextool/process_inputs/write_old_flextool_to_db.py +3077 -0
  210. flextool/process_inputs/write_self_describing_to_db.py +977 -0
  211. flextool/process_inputs/write_to_input_db.py +269 -0
  212. flextool/process_outputs/__init__.py +7 -0
  213. flextool/process_outputs/_annualize.py +55 -0
  214. flextool/process_outputs/_inmemory_helpers.py +292 -0
  215. flextool/process_outputs/_output_meta.py +672 -0
  216. flextool/process_outputs/calc_capacity_flows.py +107 -0
  217. flextool/process_outputs/calc_connections.py +136 -0
  218. flextool/process_outputs/calc_costs.py +260 -0
  219. flextool/process_outputs/calc_group_flows.py +192 -0
  220. flextool/process_outputs/calc_slacks.py +103 -0
  221. flextool/process_outputs/calc_storage_vre.py +160 -0
  222. flextool/process_outputs/drop_levels.py +208 -0
  223. flextool/process_outputs/handoff_writers.py +1315 -0
  224. flextool/process_outputs/out_ancillary.py +544 -0
  225. flextool/process_outputs/out_capacity.py +179 -0
  226. flextool/process_outputs/out_costs.py +334 -0
  227. flextool/process_outputs/out_flowgroup.py +189 -0
  228. flextool/process_outputs/out_flows.py +301 -0
  229. flextool/process_outputs/out_group.py +475 -0
  230. flextool/process_outputs/out_node.py +190 -0
  231. flextool/process_outputs/persist_realized_slice.py +601 -0
  232. flextool/process_outputs/process_results.py +24 -0
  233. flextool/process_outputs/read_highs_solution.py +2256 -0
  234. flextool/process_outputs/read_parameters.py +1799 -0
  235. flextool/process_outputs/read_sets.py +1095 -0
  236. flextool/process_outputs/read_variables.py +553 -0
  237. flextool/process_outputs/solve_order.py +81 -0
  238. flextool/process_outputs/spinedb_replay.py +412 -0
  239. flextool/process_outputs/union_realized_slice.py +224 -0
  240. flextool/process_outputs/write_outputs.py +1286 -0
  241. flextool/process_outputs/write_spinedb.py +1267 -0
  242. flextool/representative_periods/__init__.py +5 -0
  243. flextool/representative_periods/clustering.py +165 -0
  244. flextool/representative_periods/force_include.py +563 -0
  245. flextool/representative_periods/netload.py +365 -0
  246. flextool/representative_periods/netload_inputs.py +345 -0
  247. flextool/representative_periods/netload_iterate.py +722 -0
  248. flextool/representative_periods/preprocess.py +948 -0
  249. flextool/representative_periods/scenario_stack.py +195 -0
  250. flextool/representative_periods/weights.py +124 -0
  251. flextool/scenario_comparison/__init__.py +13 -0
  252. flextool/scenario_comparison/config_builder.py +158 -0
  253. flextool/scenario_comparison/constants.py +20 -0
  254. flextool/scenario_comparison/data_models.py +222 -0
  255. flextool/scenario_comparison/db_reader.py +399 -0
  256. flextool/scenario_comparison/dispatch_data.py +1002 -0
  257. flextool/scenario_comparison/dispatch_mappings.py +205 -0
  258. flextool/scenario_comparison/dispatch_plots.py +691 -0
  259. flextool/scenario_comparison/input_entity_colors.py +319 -0
  260. flextool/scenario_comparison/orchestrator.py +453 -0
  261. flextool/scenario_comparison/plan_union.py +244 -0
  262. flextool/scenario_comparison/plot_settings_seed.py +205 -0
  263. flextool/schemas/AXIS_CONTRACT.md +71 -0
  264. flextool/schemas/canonical_databases/howto_aggregate_output.json +6225 -0
  265. flextool/schemas/canonical_databases/howto_connections.json +5606 -0
  266. flextool/schemas/canonical_databases/howto_demand.json +5518 -0
  267. flextool/schemas/canonical_databases/howto_hydro_reservoir.json +6239 -0
  268. flextool/schemas/canonical_databases/howto_hydro_reservoir_with_pump.json +5933 -0
  269. flextool/schemas/canonical_databases/howto_non_sync_and_curtailment.json +5794 -0
  270. flextool/schemas/canonical_databases/howto_ramp_and_start_up.json +5707 -0
  271. flextool/schemas/canonical_databases/howto_stochastics.json +6032 -0
  272. flextool/schemas/canonical_databases/templates_examples.json +13532 -0
  273. flextool/schemas/canonical_databases/templates_time_settings_only.json +5340 -0
  274. flextool/schemas/comparison_settings_template.json +197 -0
  275. flextool/schemas/default_plot_settings.yaml +260 -0
  276. flextool/schemas/default_plots.yaml +2293 -0
  277. flextool/schemas/flextool_axis_contract.json +303 -0
  278. flextool/schemas/flextool_axis_contract.schema.json +247 -0
  279. flextool/schemas/old_flextool_import_template.json +4443 -0
  280. flextool/schemas/output_info_template.json +48 -0
  281. flextool/schemas/output_settings_template.json +256 -0
  282. flextool/schemas/pre_v26/flextool_template_constant_default.json +2105 -0
  283. flextool/schemas/pre_v26/flextool_template_default_optional_output.json +2152 -0
  284. flextool/schemas/pre_v26/flextool_template_default_value.json +2094 -0
  285. flextool/schemas/pre_v26/flextool_template_drop_down.json +2080 -0
  286. flextool/schemas/pre_v26/flextool_template_lifetime_method.json +1990 -0
  287. flextool/schemas/pre_v26/flextool_template_optional_outputs.json +2094 -0
  288. flextool/schemas/pre_v26/flextool_template_output_node_flows.json +2105 -0
  289. flextool/schemas/pre_v26/flextool_template_results_master.json +493 -0
  290. flextool/schemas/pre_v26/flextool_template_rolling_start_remove.json +2087 -0
  291. flextool/schemas/pre_v26/flextool_template_rolling_window.json +2059 -0
  292. flextool/schemas/pre_v26/flextool_template_storage_binding_defaults.json +46 -0
  293. flextool/schemas/pre_v26/flextool_template_v2.json +1990 -0
  294. flextool/schemas/pre_v26/flextool_template_v25.json +3864 -0
  295. flextool/schemas/spinedb_results_schema.json +581 -0
  296. flextool/schemas/spinedb_schema.json +4636 -0
  297. flextool/solver_config/copt.opt.template +18 -0
  298. flextool/solver_config/cplex.opt.template +25 -0
  299. flextool/solver_config/gurobi.opt.template +18 -0
  300. flextool/solver_config/highs.opt.template +18 -0
  301. flextool/solver_config/xpress.opt.template +26 -0
  302. flextool/spinedb_backend/__init__.py +26 -0
  303. flextool/spinedb_backend/_axis_enums.py +1119 -0
  304. flextool/spinedb_backend/_backend.py +1139 -0
  305. flextool/update_flextool/__init__.py +12 -0
  306. flextool/update_flextool/canonical_databases.py +251 -0
  307. flextool/update_flextool/db_migration.py +7108 -0
  308. flextool/update_flextool/ensure_settings_db.py +138 -0
  309. flextool/update_flextool/export_database.py +103 -0
  310. flextool/update_flextool/extend_tests_fixture.py +772 -0
  311. flextool/update_flextool/generate_canonical.py +274 -0
  312. flextool/update_flextool/initialize_database.py +42 -0
  313. flextool/update_flextool/install_info.py +225 -0
  314. flextool/update_flextool/self_update.py +464 -0
  315. flextool/update_flextool/sync_master_json_template.py +125 -0
  316. flextool/update_flextool/test_fixtures.py +187 -0
  317. flextool-4.0.0.dist-info/METADATA +217 -0
  318. flextool-4.0.0.dist-info/RECORD +322 -0
  319. flextool-4.0.0.dist-info/WHEEL +5 -0
  320. flextool-4.0.0.dist-info/entry_points.txt +17 -0
  321. flextool-4.0.0.dist-info/licenses/LICENSE.txt +19 -0
  322. flextool-4.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,388 @@
1
+ """Per-sub-solve frame capture coverage manifest.
2
+
3
+ This module hosts :func:`expected_basenames` — the public-contract list
4
+ of CSV basenames the cascade's emit_* functions push into the
5
+ in-memory :class:`FlexDataProvider`. Tests cross-check this manifest
6
+ against the disk-resident frames produced by ``--csv-dump``.
7
+
8
+ Prior to the writer→emitter refactor this module also exposed a
9
+ ``capture_frames`` context manager that monkey-patched every
10
+ participating writer's ``_write(df, path)`` helper to redirect frames
11
+ into a Provider. Phase 3 of the refactor migrated every call site to
12
+ ``emit_*(..., provider=...)``; the monkey-patch (and the ``_PATCH_MODULES``
13
+ tuple it consumed) is gone. Only the basename manifest remains.
14
+ """
15
+ from __future__ import annotations
16
+
17
+
18
+ __all__ = [
19
+ "expected_basenames",
20
+ ]
21
+
22
+
23
+ # ---------------------------------------------------------------------------
24
+ # Coverage manifest
25
+ # ---------------------------------------------------------------------------
26
+ #
27
+ # Basenames of CSVs the cascade's emit_* functions push into the
28
+ # in-memory :class:`FlexDataProvider`. This list is the public contract
29
+ # Phase D / E-a consumers read against to know which solve_data/*.csv
30
+ # files the cascade captures.
31
+ #
32
+ # When a new emit_* lands that adds a previously-uncaptured frame, add
33
+ # its target basename below. The matching test in
34
+ # ``tests/engine_polars/test_phase_c_flex_data_accumulator.py`` cross-
35
+ # checks the in-Provider-vs-disk frames for each basename present in
36
+ # the cascade run.
37
+
38
+ _THIN_WRAPPER_BASENAMES: tuple[str, ...] = (
39
+ # _emit_leaf_sets — 27 thin writers
40
+ "period_group.csv",
41
+ "period_node.csv",
42
+ "period_commodity.csv",
43
+ "period_process.csv",
44
+ "entityInvest.csv",
45
+ "entityDivest.csv",
46
+ "group_invest.csv",
47
+ "group_divest.csv",
48
+ "group_co2_price.csv",
49
+ "group_co2_max_period.csv",
50
+ "group_co2_max_total.csv",
51
+ "optional_yes.csv",
52
+ "reserve__upDown__group.csv",
53
+ "group_loss_share.csv",
54
+ "def_optional_yes.csv",
55
+ "process_delayed.csv",
56
+ "period_solve.csv",
57
+ "time.csv",
58
+ "enable_optional_outputs.csv",
59
+ "nodeState_rp.csv",
60
+ "nodeStateBlock.csv",
61
+ "timeline.csv",
62
+ "commodity__tier_ann.csv",
63
+ "solve_period.csv",
64
+ # _emit_mid_sets — thin writers.
65
+ #
66
+ # Phase 4 audit (2026-05-21) corrected the spelling of seven
67
+ # entries below to match the actual emit keys produced by the
68
+ # cascade. The legacy single-underscore names
69
+ # (``entity_lifetime_method.csv`` etc.) had been stale in this
70
+ # manifest since pre-Phase-1; the corresponding writers have
71
+ # always emitted the double-underscore (or camelCase) variant.
72
+ # Tests never consulted this manifest until Phase 4 introduced
73
+ # ``test_csv_dump_post_refactor`` so the drift was undetected.
74
+ "group_entity.csv",
75
+ "process_delayed__duration.csv",
76
+ "process__sink_nonSync.csv",
77
+ "entity__lifetime_method.csv",
78
+ "process__ct_method.csv",
79
+ "process__startup_method.csv",
80
+ "node__inflow_method.csv",
81
+ "node__storage_binding_method.csv",
82
+ "node__storage_nested_fix_method.csv",
83
+ "node__penalty_method.csv",
84
+ "commodity_node_co2.csv",
85
+ "process__group_inside_group_nonSync.csv",
86
+ "process_source_coeff_zero.csv",
87
+ "process_sink_coeff_zero.csv",
88
+ # — invest_total_sets
89
+ "e_invest_total.csv",
90
+ "e_divest_total.csv",
91
+ "g_invest_total.csv",
92
+ "g_divest_total.csv",
93
+ "g_invest_cumulative.csv",
94
+ "ci_ladder_cumulative.csv",
95
+ # _emit_calc_params — thin writers
96
+ "process_VRE.csv",
97
+ "process_online_linear.csv",
98
+ "process_online_integer.csv",
99
+ "process__method_indirect.csv",
100
+ # _emit_arc_unions — thin writers + Phase E-b lifted streamed writers
101
+ "node__TimeParam_in_use.csv",
102
+ "process_source_delayed.csv",
103
+ "process_source_undelayed.csv",
104
+ "process__source__sink__profile__profile_method_connection.csv",
105
+ "ed_history_realized_first.csv",
106
+ "process_source_sink_coeff_zero.csv",
107
+ "process_source_sink_delayed.csv",
108
+ "process_source_sink_undelayed.csv",
109
+ "nodeGroupDispatch__process_fully_inside.csv",
110
+ # — ramp family (Phase E-b promoted)
111
+ "process_source_sink_ramp_limit_source_up.csv",
112
+ "process_source_sink_ramp_limit_sink_up.csv",
113
+ "process_source_sink_ramp_limit_source_down.csv",
114
+ "process_source_sink_ramp_limit_sink_down.csv",
115
+ "process_source_sink_ramp_cost.csv",
116
+ # — param_in_use family
117
+ "node__PeriodParam_in_use.csv",
118
+ "process__PeriodParam_in_use.csv",
119
+ "process_TimeParam_in_use.csv",
120
+ "process_source_sourceSinkTimeParam_in_use.csv",
121
+ "process_sink_sourceSinkTimeParam_in_use.csv",
122
+ # — Phase E-b lifted streamed writers
123
+ "peedt.csv",
124
+ "p_process_delay_weight.csv",
125
+ "p_flow_max.csv",
126
+ "p_storage_state_reference_price.csv",
127
+ "process__source__sink__profile__profile_method.csv",
128
+ # — 12-CSV nodeGroupDispatch family
129
+ "nodeGroupDispatch__process__unit__to_node_Not_in_aggregate.csv",
130
+ "nodeGroupDispatch__process__node__to_unit_Not_in_aggregate.csv",
131
+ "nodeGroupDispatch__group_aggregate__process__unit__to_node.csv",
132
+ "nodeGroupDispatch__group_aggregate__process__node__to_unit.csv",
133
+ "nodeGroupDispatch__process__node__to_connection_Not_in_aggregate.csv",
134
+ "nodeGroupDispatch__process__connection__to_node_Not_in_aggregate.csv",
135
+ "nodeGroupDispatch__connection_Not_in_aggregate.csv",
136
+ "nodeGroupDispatch__group_aggregate__process__connection__to_node.csv",
137
+ "nodeGroupDispatch__group_aggregate__process__node__to_connection.csv",
138
+ "nodeGroupDispatch__group_aggregate_Connection.csv",
139
+ "nodeGroupDispatch__group_aggregate_Unit_to_group.csv",
140
+ "nodeGroupDispatch__group_aggregate_Group_to_unit.csv",
141
+ # _emit_chain_params — Phase E-b lifted streamed writers
142
+ "p_entity_pre_existing.csv",
143
+ # — 2-CSV existing chain (count/integer_count/later_solves emits
144
+ # pruned — dead)
145
+ "p_entity_all_existing.csv",
146
+ "p_entity_previously_invested_capacity.csv",
147
+ # — 2-CSV capacity max chain (max_capacity/invest_cumulative_max pruned — dead)
148
+ "p_entity_max_units.csv",
149
+ "p_entity_dispatch_capacity_max.csv",
150
+ # _emit_co2_accumulators — Phase E-b lifted. ``co2_cum_realized_tonnes.csv``
151
+ # used to live here as a guaranteed empty-seed contract; Phase 1b of
152
+ # specs/provider_consolidation.md retired the empty seed. The
153
+ # post-solve accumulator computed by
154
+ # ``compute_co2_rolling_accumulator`` still flows through the
155
+ # handoff/Provider plumbing when it fires, but single-solve
156
+ # scenarios never run that path — so the basename is conditional,
157
+ # not part of the expected_basenames contract.
158
+ # _emit_pdt_params — Phase E-b lifted streamed writers
159
+ "pdtProcess.csv",
160
+ "pdtNode.csv",
161
+ "pdtProcess_source.csv",
162
+ "pdtProcess_sink.csv",
163
+ # _emit_period_params — Phase E-b lifted streamed writers
164
+ "pdtNodeInflow.csv",
165
+ "pdtProfile.csv",
166
+ "pdtProcess_section.csv",
167
+ "pdtProcess_slope.csv",
168
+ "pdGroup.csv",
169
+ "pdtGroup.csv",
170
+ "pdtCommodity.csv",
171
+ "p_positive_inflow.csv",
172
+ "p_negative_inflow.csv",
173
+ "pdtProcess__source__sink__dt_varCost.csv",
174
+ "pssdt_varCost_noEff.csv",
175
+ "pssdt_varCost_eff_unit_source.csv",
176
+ "pssdt_varCost_eff_unit_sink.csv",
177
+ "pssdt_varCost_eff_connection.csv",
178
+ "ed_invest_max_period.csv",
179
+ "ed_invest_min_period.csv",
180
+ "ed_divest_max_period.csv",
181
+ "ed_divest_min_period.csv",
182
+ "ed_cumulative_max_capacity.csv",
183
+ "ed_cumulative_min_capacity.csv",
184
+ # _emit_calc_params — Phase E-b lifted streamed writers
185
+ # — process_arc_method_joins (10 CSVs, methodgated arc joins)
186
+ "process_sink_toProcess.csv",
187
+ "process_process_toSource.csv",
188
+ "process_source_toSink.csv",
189
+ "process_source_toProcess_direct.csv",
190
+ "process_process_toSink_direct.csv",
191
+ "process_sink_toProcess_direct.csv",
192
+ "process_sink_toSource.csv",
193
+ "process_process_toSink_noConversion.csv",
194
+ "process_source_toProcess_noConversion.csv",
195
+ "process_process_toSource_direct.csv",
196
+ # — process_profile_method_joins (2 CSVs)
197
+ "process__profileProcess__toSink__profile__profile_method.csv",
198
+ "process__source__toProfileProcess__profile__profile_method.csv",
199
+ # _emit_dispatchers — Phase E-b lifted entity_period_calc_params
200
+ "pdProcess.csv",
201
+ "pdNode.csv",
202
+ "edEntity_lifetime.csv",
203
+ "ed_fixed_cost.csv",
204
+ "p_entity_unitsize.csv",
205
+ # _emit_dispatchers — Phase E-b lifted process_arc_unions monolith
206
+ "process_source_sink_eff.csv",
207
+ "process_source_sink_noEff.csv",
208
+ "process_online.csv",
209
+ "process_minload.csv",
210
+ "process_source_sink.csv",
211
+ "process_source_sink_alwaysProcess.csv",
212
+ "process__source__sink__profile__profile_method_direct.csv",
213
+ # _emit_entity_annual — Phase E-b lifted (6-CSV monolith)
214
+ "ed_entity_annual.csv",
215
+ "ed_entity_annual_discounted.csv",
216
+ "ed_entity_annual_divest.csv",
217
+ "ed_entity_annual_divest_discounted.csv",
218
+ "ed_lifetime_fixed_cost.csv",
219
+ "ed_lifetime_fixed_cost_divest.csv",
220
+ # _emit_inflow_scaling — only the 6 CONSUMED outputs are emitted; the 9
221
+ # internal middle parameters (orig_flow_sum, period_share_of_annual_flow,
222
+ # new_peak_sign, old_peak_max, old_peak_min, old_peak_sign,
223
+ # new_peak_divided_by_old_peak, new_peak_inflow_sum, new_old_multiplier)
224
+ # have no external consumer and are no longer written.
225
+ "ptNode_inflow.csv",
226
+ "_node_cap_inflow_fallback.csv",
227
+ "period_flow_annual_multiplier.csv",
228
+ "period_flow_proportional_multiplier.csv",
229
+ "new_old_slope.csv",
230
+ "new_old_section.csv",
231
+ # _emit_lp_scaling — only the 3 CONSUMED outputs are emitted; the 6
232
+ # stage-to-stage middle-products (_node_cap_unitsize_sum, _node_cap_raw,
233
+ # _node_cap_pow10, inv_node_cap, _group_cap_raw, _group_cap_pow10) have
234
+ # no functional reader and are no longer written.
235
+ "node_capacity_for_scaling.csv",
236
+ "group_capacity_for_scaling.csv",
237
+ "inv_group_cap.csv",
238
+ # _emit_solve_writers — Phase E-b7 (34 small per-solve CSVs)
239
+ "steps_in_timeline.csv",
240
+ "steps_in_use.csv",
241
+ "steps_complete_solve.csv",
242
+ "step_previous.csv",
243
+ "period_block_time.csv",
244
+ "period_block_succ.csv",
245
+ "p_years_represented.csv",
246
+ "period_with_history.csv",
247
+ "p_discount_years.csv",
248
+ "realized_invest_periods_of_current_solve.csv",
249
+ "period_last.csv",
250
+ "period_first_of_solve.csv",
251
+ "period_first.csv",
252
+ "p_model.csv",
253
+ "p_nested_model.csv",
254
+ "solve_current.csv",
255
+ "first_timesteps.csv",
256
+ "last_timesteps.csv",
257
+ "realized_dispatch.csv",
258
+ "fix_storage_timesteps.csv",
259
+ "period__branch.csv",
260
+ "solve_branch_weight.csv",
261
+ "solve_branch__time_branch.csv",
262
+ "p_entity_invested.csv",
263
+ "p_entity_divested.csv",
264
+ "p_entity_period_existing_capacity.csv",
265
+ # NB ladder_cum_realized_mwh.csv, ladder_cum_sim_hours.csv, and
266
+ # co2_cum_realized_tonnes.csv used to live here as header-only
267
+ # empty seeds emitted by ``emit_empty_cumulative_files``. Phase 1b
268
+ # of specs/provider_consolidation.md dropped the empty-seed writer
269
+ # — consumers fall through to ``_read_csv``'s empty-frame default
270
+ # on first-roll Provider miss, and subsequent rolls receive
271
+ # populated frames via ``_fan_out_ladder_accumulators`` /
272
+ # ``compute_co2_rolling_accumulator`` (via the handoff plumbing).
273
+ # Listing those basenames in ``expected_basenames`` would re-
274
+ # introduce the contract surface we just retired.
275
+ "fix_storage_price.csv",
276
+ "fix_storage_quantity.csv",
277
+ "fix_storage_usage.csv",
278
+ "p_roll_continue_state.csv",
279
+ "costs_discounted.csv",
280
+ "co2.csv",
281
+ "period_capacity.csv",
282
+ "timesets_in_use.csv",
283
+ "timesets__timeline.csv",
284
+ "p_use_row_scaling.csv",
285
+ "scale_the_objective.csv",
286
+ "delay_duration.csv",
287
+ "dtt__delay_duration.csv",
288
+ "rp_weights.csv",
289
+ "rp_base_chain.csv",
290
+ "rp_base_first.csv",
291
+ "rp_base_last.csv",
292
+ "rp_block_first.csv",
293
+ "rp_block_last.csv",
294
+ "rp_block_start_last.csv",
295
+ "timestep_weight.csv",
296
+ # _emit_period_calc — Phase E-b8 (12 + 2 CSVs)
297
+ "p_inflation_factor_operations_yearly.csv",
298
+ "complete_period_share_of_year_calc.csv",
299
+ "p_timeline_duration_in_years.csv",
300
+ "hours_in_period.csv",
301
+ "period_share_of_year.csv",
302
+ "p_years_d.csv",
303
+ "complete_hours_in_period.csv",
304
+ "p_years_until_invest.csv",
305
+ "p_years_until_dispatch.csv",
306
+ "p_inflation_factor_investment_yearly.csv",
307
+ "f_d_k.csv",
308
+ "pd_branch_weight.csv",
309
+ "pdt_branch_weight.csv",
310
+ # _emit_per_solve — Phase E-b8 (30 + 19 + 1 CSVs)
311
+ "branch_set.csv",
312
+ "year_set.csv",
313
+ "period_from_period_time_set.csv",
314
+ "period_in_use_set.csv",
315
+ "time_in_use_set.csv",
316
+ "complete_time_in_use_set.csv",
317
+ "rp_base_period_set.csv",
318
+ "rp_rep_period_set.csv",
319
+ "period_block_set.csv",
320
+ "dtt_set.csv",
321
+ "d_fix_storage_period_set.csv",
322
+ "period_set.csv",
323
+ "periodAll_set.csv",
324
+ "block_set.csv",
325
+ "period__timeline_set.csv",
326
+ "dt_realize_dispatch_set.csv",
327
+ "d_realized_period_set.csv",
328
+ "d_realize_dispatch_or_invest_set.csv",
329
+ "dt_non_anticipativity_set.csv",
330
+ "cnd_ladder_set.csv",
331
+ "cndi_ladder_cum_set.csv",
332
+ "cndi_ladder_ann_set.csv",
333
+ "cndi_ladder_set.csv",
334
+ "dtdt_next_set.csv",
335
+ "n_fix_storage_quantity_set.csv",
336
+ "n_fix_storage_price_set.csv",
337
+ "n_fix_storage_usage_set.csv",
338
+ "p_online_dt_set.csv",
339
+ "ed_invest.csv",
340
+ "ed_divest.csv",
341
+ "ed_invest_period.csv",
342
+ "ed_divest_period.csv",
343
+ "ed_invest_cumulative.csv",
344
+ "pd_invest.csv",
345
+ "nd_invest.csv",
346
+ "pd_divest.csv",
347
+ "nd_divest.csv",
348
+ "edd_history_choice.csv",
349
+ "edd_history_automatic.csv",
350
+ "edd_history_no_investment.csv",
351
+ "edd_history.csv",
352
+ "edd_history_invest.csv",
353
+ "edd_invest.csv",
354
+ "gd_invest.csv",
355
+ "gd_divest.csv",
356
+ "gd_invest_period.csv",
357
+ "gd_divest_period.csv",
358
+ "ed_invest_forbidden_no_investment.csv",
359
+ # _emit_reserve — Phase E-b8 (1 + 2 + 4 CSVs)
360
+ "pdtReserve_upDown_group.csv",
361
+ "process_reserve_upDown_node_active.csv",
362
+ "prundt.csv",
363
+ "p_process_reserve_upDown_node_reliability.csv",
364
+ "process_reserve_upDown_node_increase_reserve_ratio.csv",
365
+ "process_reserve_upDown_node_large_failure_ratio.csv",
366
+ "process_large_failure.csv",
367
+ # Per-solve block frames populated by emit_block_data into the
368
+ # Provider.
369
+ "entity_block.csv",
370
+ "process_side_block.csv",
371
+ "process_block.csv",
372
+ "block_step_duration.csv",
373
+ "overlap_set.csv",
374
+ "block_step_previous.csv",
375
+ "block_period_time_first.csv",
376
+ "block_period_time_last.csv",
377
+ )
378
+
379
+
380
+ def expected_basenames() -> tuple[str, ...]:
381
+ """Return the basenames the cascade is expected to capture.
382
+
383
+ The list comes from the Phase B writer audit (every ``OK_thin_wrapper``
384
+ entry, plus the streamed writers lifted into the canonical pattern by
385
+ Phase E-b). Tests use this to cross-check disk-vs-Provider parity
386
+ without re-enumerating the list inline.
387
+ """
388
+ return _THIN_WRAPPER_BASENAMES