samba-core 5.3.1__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.
Files changed (400) hide show
  1. samba_core-5.3.1/.dockerignore +23 -0
  2. samba_core-5.3.1/.env.example +23 -0
  3. samba_core-5.3.1/.github/ISSUE_TEMPLATE/bug_report.yml +61 -0
  4. samba_core-5.3.1/.github/ISSUE_TEMPLATE/config.yml +8 -0
  5. samba_core-5.3.1/.github/ISSUE_TEMPLATE/feature_request.yml +25 -0
  6. samba_core-5.3.1/.github/PULL_REQUEST_TEMPLATE.md +19 -0
  7. samba_core-5.3.1/.github/workflows/ci.yml +85 -0
  8. samba_core-5.3.1/.github/workflows/goldens.yml +43 -0
  9. samba_core-5.3.1/.github/workflows/release.yml +86 -0
  10. samba_core-5.3.1/.gitignore +230 -0
  11. samba_core-5.3.1/.markdownlint.json +11 -0
  12. samba_core-5.3.1/.markdownlintignore +4 -0
  13. samba_core-5.3.1/.pre-commit-config.yaml +14 -0
  14. samba_core-5.3.1/CHANGELOG.md +396 -0
  15. samba_core-5.3.1/CITATION.cff +15 -0
  16. samba_core-5.3.1/CONTRIBUTING.md +59 -0
  17. samba_core-5.3.1/Dockerfile +35 -0
  18. samba_core-5.3.1/LICENSE +373 -0
  19. samba_core-5.3.1/PKG-INFO +496 -0
  20. samba_core-5.3.1/README.md +88 -0
  21. samba_core-5.3.1/SECURITY.md +46 -0
  22. samba_core-5.3.1/docs/README.md +3 -0
  23. samba_core-5.3.1/docs/about.md +96 -0
  24. samba_core-5.3.1/docs/acknowledgements.md +5 -0
  25. samba_core-5.3.1/docs/api-reference.md +190 -0
  26. samba_core-5.3.1/docs/assets/samba-logo-black.png +0 -0
  27. samba_core-5.3.1/docs/assets/samba-logo-black.svg +22 -0
  28. samba_core-5.3.1/docs/assets/samba-logo-white.png +0 -0
  29. samba_core-5.3.1/docs/assets/samba-logo-white.svg +22 -0
  30. samba_core-5.3.1/docs/assets/samba-logo.svg +30 -0
  31. samba_core-5.3.1/docs/cli-reference.md +252 -0
  32. samba_core-5.3.1/docs/deployment.md +66 -0
  33. samba_core-5.3.1/docs/developer/architecture.md +98 -0
  34. samba_core-5.3.1/docs/developer/domain-model.md +433 -0
  35. samba_core-5.3.1/docs/developer/results-contract.md +150 -0
  36. samba_core-5.3.1/docs/getting-started.md +160 -0
  37. samba_core-5.3.1/docs/index.md +78 -0
  38. samba_core-5.3.1/docs/known-limitations.md +96 -0
  39. samba_core-5.3.1/docs/scenario-reference.md +811 -0
  40. samba_core-5.3.1/docs/thermal-components.md +440 -0
  41. samba_core-5.3.1/examples/base_scenario.yaml +222 -0
  42. samba_core-5.3.1/examples/commercial_demand_nem.yaml +68 -0
  43. samba_core-5.3.1/examples/content/cop_ashp_reference.csv +25 -0
  44. samba_core-5.3.1/examples/content/load_residential_8760.csv +8760 -0
  45. samba_core-5.3.1/examples/content/weather_sf_2019.csv +8763 -0
  46. samba_core-5.3.1/examples/grid_pv_heat_pump.yaml +149 -0
  47. samba_core-5.3.1/examples/grid_pv_heat_pump_dataset.yaml +131 -0
  48. samba_core-5.3.1/examples/pv_battery_ev.yaml +182 -0
  49. samba_core-5.3.1/justfile +51 -0
  50. samba_core-5.3.1/pyproject.toml +104 -0
  51. samba_core-5.3.1/renovate.json +4 -0
  52. samba_core-5.3.1/samba/__init__.py +69 -0
  53. samba_core-5.3.1/samba/__main__.py +12 -0
  54. samba_core-5.3.1/samba/_kpi_contract.py +29 -0
  55. samba_core-5.3.1/samba/_pipeline.py +310 -0
  56. samba_core-5.3.1/samba/_version.py +5 -0
  57. samba_core-5.3.1/samba/batteries/__init__.py +25 -0
  58. samba_core-5.3.1/samba/batteries/degradation.py +52 -0
  59. samba_core-5.3.1/samba/batteries/factory.py +72 -0
  60. samba_core-5.3.1/samba/batteries/kibam.py +364 -0
  61. samba_core-5.3.1/samba/compiler/__init__.py +19 -0
  62. samba_core-5.3.1/samba/compiler/annualize.py +113 -0
  63. samba_core-5.3.1/samba/compiler/builders/__init__.py +24 -0
  64. samba_core-5.3.1/samba/compiler/builders/battery.py +108 -0
  65. samba_core-5.3.1/samba/compiler/builders/diesel.py +176 -0
  66. samba_core-5.3.1/samba/compiler/builders/ev.py +192 -0
  67. samba_core-5.3.1/samba/compiler/builders/gas_supply.py +128 -0
  68. samba_core-5.3.1/samba/compiler/builders/grid.py +107 -0
  69. samba_core-5.3.1/samba/compiler/builders/heat_pump.py +178 -0
  70. samba_core-5.3.1/samba/compiler/builders/inverter.py +94 -0
  71. samba_core-5.3.1/samba/compiler/builders/pv.py +87 -0
  72. samba_core-5.3.1/samba/compiler/builders/thermal_load.py +151 -0
  73. samba_core-5.3.1/samba/compiler/builders/thermal_storage.py +182 -0
  74. samba_core-5.3.1/samba/compiler/builders/wind.py +218 -0
  75. samba_core-5.3.1/samba/compiler/buses.py +116 -0
  76. samba_core-5.3.1/samba/compiler/compiler.py +647 -0
  77. samba_core-5.3.1/samba/compiler/constraints.py +436 -0
  78. samba_core-5.3.1/samba/economics/__init__.py +58 -0
  79. samba_core-5.3.1/samba/economics/cashflow.py +716 -0
  80. samba_core-5.3.1/samba/economics/emissions.py +178 -0
  81. samba_core-5.3.1/samba/economics/npc.py +151 -0
  82. samba_core-5.3.1/samba/economics/replacement.py +111 -0
  83. samba_core-5.3.1/samba/economics/salvage.py +103 -0
  84. samba_core-5.3.1/samba/input_resolver.py +145 -0
  85. samba_core-5.3.1/samba/load_profiles/__init__.py +31 -0
  86. samba_core-5.3.1/samba/load_profiles/ev_presence.py +217 -0
  87. samba_core-5.3.1/samba/load_profiles/expander.py +245 -0
  88. samba_core-5.3.1/samba/load_profiles/generic.py +114 -0
  89. samba_core-5.3.1/samba/load_profiles/templates.py +104 -0
  90. samba_core-5.3.1/samba/load_profiles/thermal.py +238 -0
  91. samba_core-5.3.1/samba/pareto/__init__.py +30 -0
  92. samba_core-5.3.1/samba/pareto/sweep.py +400 -0
  93. samba_core-5.3.1/samba/run_result/__init__.py +33 -0
  94. samba_core-5.3.1/samba/run_result/contracts.py +205 -0
  95. samba_core-5.3.1/samba/run_result/kpis.py +562 -0
  96. samba_core-5.3.1/samba/run_result/reader.py +207 -0
  97. samba_core-5.3.1/samba/run_result/writer.py +360 -0
  98. samba_core-5.3.1/samba/scenario/__init__.py +15 -0
  99. samba_core-5.3.1/samba/scenario/loader.py +131 -0
  100. samba_core-5.3.1/samba/scenario/models/__init__.py +103 -0
  101. samba_core-5.3.1/samba/scenario/models/_components.py +750 -0
  102. samba_core-5.3.1/samba/scenario/models/_scenario.py +366 -0
  103. samba_core-5.3.1/samba/scenario/models/_tariff.py +316 -0
  104. samba_core-5.3.1/samba/solver/__init__.py +55 -0
  105. samba_core-5.3.1/samba/solver/_extract_helpers.py +108 -0
  106. samba_core-5.3.1/samba/solver/component_extractors/__init__.py +36 -0
  107. samba_core-5.3.1/samba/solver/component_extractors/electrical.py +275 -0
  108. samba_core-5.3.1/samba/solver/component_extractors/thermal.py +168 -0
  109. samba_core-5.3.1/samba/solver/extract.py +289 -0
  110. samba_core-5.3.1/samba/solver/runner.py +357 -0
  111. samba_core-5.3.1/samba/tariff/__init__.py +26 -0
  112. samba_core-5.3.1/samba/tariff/demand.py +121 -0
  113. samba_core-5.3.1/samba/tariff/endogenous.py +359 -0
  114. samba_core-5.3.1/samba/tariff/flat.py +19 -0
  115. samba_core-5.3.1/samba/tariff/gas.py +78 -0
  116. samba_core-5.3.1/samba/tariff/monthly.py +45 -0
  117. samba_core-5.3.1/samba/tariff/monthly_tiered.py +63 -0
  118. samba_core-5.3.1/samba/tariff/resolver.py +134 -0
  119. samba_core-5.3.1/samba/tariff/seasonal.py +49 -0
  120. samba_core-5.3.1/samba/tariff/seasonal_tiered.py +66 -0
  121. samba_core-5.3.1/samba/tariff/service_charge.py +76 -0
  122. samba_core-5.3.1/samba/tariff/tiered.py +70 -0
  123. samba_core-5.3.1/samba/tariff/tou.py +91 -0
  124. samba_core-5.3.1/samba/tariff/ultra_low_tou.py +87 -0
  125. samba_core-5.3.1/samba/thermal/__init__.py +56 -0
  126. samba_core-5.3.1/samba/thermal/buses.py +98 -0
  127. samba_core-5.3.1/samba/thermal/constants.py +86 -0
  128. samba_core-5.3.1/samba/thermal/cop.py +387 -0
  129. samba_core-5.3.1/samba/thermal/cop_dataset.py +152 -0
  130. samba_core-5.3.1/samba/thermal/cop_fetch.py +212 -0
  131. samba_core-5.3.1/samba/thermal/gas_constants.py +58 -0
  132. samba_core-5.3.1/samba/thermal/hp_catalog.py +113 -0
  133. samba_core-5.3.1/samba/weather/__init__.py +19 -0
  134. samba_core-5.3.1/samba/weather/fetch.py +140 -0
  135. samba_core-5.3.1/samba/weather/models.py +90 -0
  136. samba_core-5.3.1/samba/weather/nsrdb.py +116 -0
  137. samba_core-5.3.1/samba/weather/poa.py +150 -0
  138. samba_core-5.3.1/samba_cli/__init__.py +4 -0
  139. samba_core-5.3.1/samba_cli/__main__.py +8 -0
  140. samba_core-5.3.1/samba_cli/formatting.py +156 -0
  141. samba_core-5.3.1/samba_cli/handlers.py +517 -0
  142. samba_core-5.3.1/samba_cli/main.py +236 -0
  143. samba_core-5.3.1/samba_service/__init__.py +4 -0
  144. samba_core-5.3.1/samba_service/app.py +419 -0
  145. samba_core-5.3.1/samba_service/auth.py +59 -0
  146. samba_core-5.3.1/samba_service/config.py +114 -0
  147. samba_core-5.3.1/samba_service/jobs.py +465 -0
  148. samba_core-5.3.1/samba_service/models.py +177 -0
  149. samba_core-5.3.1/samba_service/persistent_jobs.py +191 -0
  150. samba_core-5.3.1/schemas/dispatch.schema.json +29 -0
  151. samba_core-5.3.1/schemas/economics.schema.json +149 -0
  152. samba_core-5.3.1/schemas/health.schema.json +35 -0
  153. samba_core-5.3.1/schemas/job.schema.json +124 -0
  154. samba_core-5.3.1/schemas/kpis.schema.json +309 -0
  155. samba_core-5.3.1/schemas/scenario.schema.json +2175 -0
  156. samba_core-5.3.1/schemas/sizing.schema.json +35 -0
  157. samba_core-5.3.1/schemas/validate.schema.json +22 -0
  158. samba_core-5.3.1/scripts/analyze_test_timings.py +788 -0
  159. samba_core-5.3.1/scripts/build_sidecar.py +99 -0
  160. samba_core-5.3.1/scripts/capture_v2_goldens.py +86 -0
  161. samba_core-5.3.1/scripts/capture_v4_goldens.py +97 -0
  162. samba_core-5.3.1/scripts/check_mpl_headers.py +168 -0
  163. samba_core-5.3.1/scripts/detect_unicode.py +320 -0
  164. samba_core-5.3.1/scripts/diag_pv_sweep.py +222 -0
  165. samba_core-5.3.1/scripts/diag_pv_sweep_out.txt +34 -0
  166. samba_core-5.3.1/scripts/export_schemas.py +74 -0
  167. samba_core-5.3.1/scripts/gen_logo_assets.py +162 -0
  168. samba_core-5.3.1/scripts/generate_sample_data.py +39 -0
  169. samba_core-5.3.1/scripts/normalize_unicode.py +400 -0
  170. samba_core-5.3.1/scripts/run_test_profiling.ps1 +70 -0
  171. samba_core-5.3.1/scripts/run_test_profiling.sh +63 -0
  172. samba_core-5.3.1/scripts/sidecar_entry.py +21 -0
  173. samba_core-5.3.1/tests/__init__.py +1 -0
  174. samba_core-5.3.1/tests/benchmarks/__init__.py +1 -0
  175. samba_core-5.3.1/tests/goldens/__init__.py +4 -0
  176. samba_core-5.3.1/tests/goldens/conftest.py +177 -0
  177. samba_core-5.3.1/tests/goldens/g01_grid_pv_batt/reference.json +60 -0
  178. samba_core-5.3.1/tests/goldens/g01_grid_pv_batt/scenario.yaml +146 -0
  179. samba_core-5.3.1/tests/goldens/g02_offgrid_pv_batt_dg/reference.json +60 -0
  180. samba_core-5.3.1/tests/goldens/g02_offgrid_pv_batt_dg/scenario.yaml +104 -0
  181. samba_core-5.3.1/tests/goldens/g03_grid_pv_batt_tou/reference.json +60 -0
  182. samba_core-5.3.1/tests/goldens/g03_grid_pv_batt_tou/scenario.yaml +109 -0
  183. samba_core-5.3.1/tests/goldens/g04_offgrid_pv_wind_batt/reference.json +60 -0
  184. samba_core-5.3.1/tests/goldens/g04_offgrid_pv_wind_batt/scenario.yaml +100 -0
  185. samba_core-5.3.1/tests/goldens/g05_grid_only_baseline/reference.json +59 -0
  186. samba_core-5.3.1/tests/goldens/g05_grid_only_baseline/scenario.yaml +79 -0
  187. samba_core-5.3.1/tests/goldens/g06_grid_pv_tou/reference.json +61 -0
  188. samba_core-5.3.1/tests/goldens/g06_grid_pv_tou/scenario.yaml +159 -0
  189. samba_core-5.3.1/tests/goldens/g07_multi_objective/reference.json +78 -0
  190. samba_core-5.3.1/tests/goldens/g07_multi_objective/scenario.yaml +105 -0
  191. samba_core-5.3.1/tests/goldens/g08_dg_unit_commitment/reference.json +78 -0
  192. samba_core-5.3.1/tests/goldens/g08_dg_unit_commitment/scenario.yaml +109 -0
  193. samba_core-5.3.1/tests/goldens/g09_ev_smart_charge/reference.json +90 -0
  194. samba_core-5.3.1/tests/goldens/g09_ev_smart_charge/scenario.yaml +92 -0
  195. samba_core-5.3.1/tests/goldens/g10_ev_v2g/reference.json +90 -0
  196. samba_core-5.3.1/tests/goldens/g10_ev_v2g/scenario.yaml +102 -0
  197. samba_core-5.3.1/tests/goldens/g11_kibam_battery/reference.json +72 -0
  198. samba_core-5.3.1/tests/goldens/g11_kibam_battery/scenario.yaml +90 -0
  199. samba_core-5.3.1/tests/goldens/g12_tiered_tariff_endogenous/reference.json +88 -0
  200. samba_core-5.3.1/tests/goldens/g12_tiered_tariff_endogenous/scenario.yaml +110 -0
  201. samba_core-5.3.1/tests/goldens/g13_heat_pump_heating_only/heating_5kw.csv +8761 -0
  202. samba_core-5.3.1/tests/goldens/g13_heat_pump_heating_only/reference.json +84 -0
  203. samba_core-5.3.1/tests/goldens/g13_heat_pump_heating_only/scenario.yaml +89 -0
  204. samba_core-5.3.1/tests/goldens/g14_heat_pump_cooling_only/cooling_4kw.csv +8761 -0
  205. samba_core-5.3.1/tests/goldens/g14_heat_pump_cooling_only/reference.json +84 -0
  206. samba_core-5.3.1/tests/goldens/g14_heat_pump_cooling_only/scenario.yaml +89 -0
  207. samba_core-5.3.1/tests/goldens/g15_hp_thermal_storage_tou/heating_5kw.csv +8761 -0
  208. samba_core-5.3.1/tests/goldens/g15_hp_thermal_storage_tou/reference.json +96 -0
  209. samba_core-5.3.1/tests/goldens/g15_hp_thermal_storage_tou/scenario.yaml +121 -0
  210. samba_core-5.3.1/tests/goldens/g16_gas_vs_hp/heating_5kw.csv +8761 -0
  211. samba_core-5.3.1/tests/goldens/g16_gas_vs_hp/reference.json +96 -0
  212. samba_core-5.3.1/tests/goldens/g16_gas_vs_hp/scenario.yaml +107 -0
  213. samba_core-5.3.1/tests/goldens/g17_degree_day_loads/reference.json +102 -0
  214. samba_core-5.3.1/tests/goldens/g17_degree_day_loads/scenario.yaml +95 -0
  215. samba_core-5.3.1/tests/goldens/g18_full_coupled_pv_hp_gas/reference.json +126 -0
  216. samba_core-5.3.1/tests/goldens/g18_full_coupled_pv_hp_gas/scenario.yaml +152 -0
  217. samba_core-5.3.1/tests/goldens/g19_heat_pump/reference.json +101 -0
  218. samba_core-5.3.1/tests/goldens/g19_heat_pump/scenario.yaml +87 -0
  219. samba_core-5.3.1/tests/goldens/g20_demand_charge/reference.json +101 -0
  220. samba_core-5.3.1/tests/goldens/g20_demand_charge/scenario.yaml +42 -0
  221. samba_core-5.3.1/tests/goldens/g21_nem_net_billing/reference.json +101 -0
  222. samba_core-5.3.1/tests/goldens/g21_nem_net_billing/scenario.yaml +38 -0
  223. samba_core-5.3.1/tests/goldens/g22_bifacial_pv/reference.json +101 -0
  224. samba_core-5.3.1/tests/goldens/g22_bifacial_pv/scenario.yaml +39 -0
  225. samba_core-5.3.1/tests/goldens/test_golden.py +371 -0
  226. samba_core-5.3.1/tests/goldens/test_v2_goldens.py +347 -0
  227. samba_core-5.3.1/tests/goldens/test_v3_goldens.py +434 -0
  228. samba_core-5.3.1/tests/integration/__init__.py +1 -0
  229. samba_core-5.3.1/tests/integration/test_artifact_contracts.py +98 -0
  230. samba_core-5.3.1/tests/integration/test_cli_thermal_resolution.py +82 -0
  231. samba_core-5.3.1/tests/integration/test_cop_dataset_example.py +81 -0
  232. samba_core-5.3.1/tests/integration/test_data_pipeline.py +155 -0
  233. samba_core-5.3.1/tests/integration/test_demand_charge.py +104 -0
  234. samba_core-5.3.1/tests/integration/test_dg_milp.py +598 -0
  235. samba_core-5.3.1/tests/integration/test_ev_dispatch.py +271 -0
  236. samba_core-5.3.1/tests/integration/test_fidelity.py +112 -0
  237. samba_core-5.3.1/tests/integration/test_gas_boiler_dispatch.py +259 -0
  238. samba_core-5.3.1/tests/integration/test_heat_pump_dispatch.py +241 -0
  239. samba_core-5.3.1/tests/integration/test_kibam_dispatch.py +253 -0
  240. samba_core-5.3.1/tests/integration/test_pareto.py +243 -0
  241. samba_core-5.3.1/tests/integration/test_solve_roundtrip.py +329 -0
  242. samba_core-5.3.1/tests/integration/test_thermal_load_dispatch.py +303 -0
  243. samba_core-5.3.1/tests/integration/test_thermal_storage_dispatch.py +337 -0
  244. samba_core-5.3.1/tests/integration/test_thermal_topology.py +190 -0
  245. samba_core-5.3.1/tests/integration/test_tiered_tariff_dispatch.py +274 -0
  246. samba_core-5.3.1/tests/unit/__init__.py +1 -0
  247. samba_core-5.3.1/tests/unit/test_battery_factory.py +196 -0
  248. samba_core-5.3.1/tests/unit/test_bifacial.py +71 -0
  249. samba_core-5.3.1/tests/unit/test_cli.py +371 -0
  250. samba_core-5.3.1/tests/unit/test_compiler.py +473 -0
  251. samba_core-5.3.1/tests/unit/test_compiler_buses.py +221 -0
  252. samba_core-5.3.1/tests/unit/test_cop_arrays.py +171 -0
  253. samba_core-5.3.1/tests/unit/test_cop_dataset.py +147 -0
  254. samba_core-5.3.1/tests/unit/test_cop_fetch.py +75 -0
  255. samba_core-5.3.1/tests/unit/test_degradation.py +50 -0
  256. samba_core-5.3.1/tests/unit/test_demand_nem.py +125 -0
  257. samba_core-5.3.1/tests/unit/test_dg_unit_commitment.py +338 -0
  258. samba_core-5.3.1/tests/unit/test_economics.py +576 -0
  259. samba_core-5.3.1/tests/unit/test_endogenous_tariff.py +252 -0
  260. samba_core-5.3.1/tests/unit/test_ev_component.py +292 -0
  261. samba_core-5.3.1/tests/unit/test_ev_presence.py +223 -0
  262. samba_core-5.3.1/tests/unit/test_extractor_protocol.py +233 -0
  263. samba_core-5.3.1/tests/unit/test_gas_supply_builder.py +199 -0
  264. samba_core-5.3.1/tests/unit/test_gas_tariff.py +155 -0
  265. samba_core-5.3.1/tests/unit/test_hp_catalog.py +70 -0
  266. samba_core-5.3.1/tests/unit/test_kibam_approx.py +283 -0
  267. samba_core-5.3.1/tests/unit/test_kpi_contract.py +110 -0
  268. samba_core-5.3.1/tests/unit/test_load_profiles.py +200 -0
  269. samba_core-5.3.1/tests/unit/test_multiobjective.py +288 -0
  270. samba_core-5.3.1/tests/unit/test_persistent_jobs.py +116 -0
  271. samba_core-5.3.1/tests/unit/test_provenance_guard.py +141 -0
  272. samba_core-5.3.1/tests/unit/test_run_result.py +41 -0
  273. samba_core-5.3.1/tests/unit/test_scenario.py +458 -0
  274. samba_core-5.3.1/tests/unit/test_schema_export.py +35 -0
  275. samba_core-5.3.1/tests/unit/test_schema_version.py +153 -0
  276. samba_core-5.3.1/tests/unit/test_service.py +224 -0
  277. samba_core-5.3.1/tests/unit/test_service_v2.py +622 -0
  278. samba_core-5.3.1/tests/unit/test_solver.py +515 -0
  279. samba_core-5.3.1/tests/unit/test_tariff.py +386 -0
  280. samba_core-5.3.1/tests/unit/test_templates.py +71 -0
  281. samba_core-5.3.1/tests/unit/test_thermal_bus.py +196 -0
  282. samba_core-5.3.1/tests/unit/test_thermal_load_builder.py +198 -0
  283. samba_core-5.3.1/tests/unit/test_thermal_load_profile.py +399 -0
  284. samba_core-5.3.1/tests/unit/test_thermal_storage.py +322 -0
  285. samba_core-5.3.1/tests/unit/test_tier_decomposition.py +263 -0
  286. samba_core-5.3.1/tests/unit/test_weather.py +194 -0
  287. samba_core-5.3.1/tests/unit/test_weather_fetch.py +77 -0
  288. samba_core-5.3.1/ui/.gitignore +24 -0
  289. samba_core-5.3.1/ui/.vscode/extensions.json +7 -0
  290. samba_core-5.3.1/ui/README.md +50 -0
  291. samba_core-5.3.1/ui/eslint.config.js +29 -0
  292. samba_core-5.3.1/ui/index.html +15 -0
  293. samba_core-5.3.1/ui/package-lock.json +5929 -0
  294. samba_core-5.3.1/ui/package.json +57 -0
  295. samba_core-5.3.1/ui/playwright.config.ts +17 -0
  296. samba_core-5.3.1/ui/public/favicon.ico +0 -0
  297. samba_core-5.3.1/ui/public/samba-logo.svg +30 -0
  298. samba_core-5.3.1/ui/public/tauri.svg +6 -0
  299. samba_core-5.3.1/ui/scripts/gen-types.mjs +37 -0
  300. samba_core-5.3.1/ui/src/App.vue +7 -0
  301. samba_core-5.3.1/ui/src/api/artifacts.ts +12 -0
  302. samba_core-5.3.1/ui/src/api/client.ts +62 -0
  303. samba_core-5.3.1/ui/src/api/generated/dispatch.ts +23 -0
  304. samba_core-5.3.1/ui/src/api/generated/economics.ts +78 -0
  305. samba_core-5.3.1/ui/src/api/generated/health.ts +35 -0
  306. samba_core-5.3.1/ui/src/api/generated/job.ts +64 -0
  307. samba_core-5.3.1/ui/src/api/generated/kpis.ts +133 -0
  308. samba_core-5.3.1/ui/src/api/generated/scenario.ts +763 -0
  309. samba_core-5.3.1/ui/src/api/generated/sizing.ts +22 -0
  310. samba_core-5.3.1/ui/src/api/generated/validate.ts +24 -0
  311. samba_core-5.3.1/ui/src/api/health.ts +6 -0
  312. samba_core-5.3.1/ui/src/api/jobs.ts +18 -0
  313. samba_core-5.3.1/ui/src/api/types.ts +94 -0
  314. samba_core-5.3.1/ui/src/api/validate.ts +6 -0
  315. samba_core-5.3.1/ui/src/assets/vue.svg +1 -0
  316. samba_core-5.3.1/ui/src/components/layout/AppShell.vue +29 -0
  317. samba_core-5.3.1/ui/src/components/layout/ConnectionBadge.vue +20 -0
  318. samba_core-5.3.1/ui/src/components/layout/NavSidebar.vue +25 -0
  319. samba_core-5.3.1/ui/src/components/results/ArtifactList.vue +52 -0
  320. samba_core-5.3.1/ui/src/components/results/CashflowTable.vue +48 -0
  321. samba_core-5.3.1/ui/src/components/results/CostBreakdownPie.vue +55 -0
  322. samba_core-5.3.1/ui/src/components/results/DispatchChart.vue +100 -0
  323. samba_core-5.3.1/ui/src/components/results/DispatchControls.vue +51 -0
  324. samba_core-5.3.1/ui/src/components/results/KpiCard.vue +18 -0
  325. samba_core-5.3.1/ui/src/components/results/KpiGrid.vue +53 -0
  326. samba_core-5.3.1/ui/src/components/results/MonthlyBarChart.vue +50 -0
  327. samba_core-5.3.1/ui/src/components/results/NpvChart.vue +43 -0
  328. samba_core-5.3.1/ui/src/components/results/SizingTable.vue +40 -0
  329. samba_core-5.3.1/ui/src/components/scenario/ComponentCard.vue +75 -0
  330. samba_core-5.3.1/ui/src/components/scenario/ComponentsForm.vue +15 -0
  331. samba_core-5.3.1/ui/src/components/scenario/ConstraintsForm.vue +68 -0
  332. samba_core-5.3.1/ui/src/components/scenario/LoadForm.vue +138 -0
  333. samba_core-5.3.1/ui/src/components/scenario/LocationForm.vue +86 -0
  334. samba_core-5.3.1/ui/src/components/scenario/ObjectiveForm.vue +30 -0
  335. samba_core-5.3.1/ui/src/components/scenario/ProjectForm.vue +124 -0
  336. samba_core-5.3.1/ui/src/components/scenario/SectionNav.vue +48 -0
  337. samba_core-5.3.1/ui/src/components/scenario/TariffForm.vue +122 -0
  338. samba_core-5.3.1/ui/src/components/scenario/ValidationSummary.vue +61 -0
  339. samba_core-5.3.1/ui/src/components/scenario/componentFields.ts +103 -0
  340. samba_core-5.3.1/ui/src/main.ts +47 -0
  341. samba_core-5.3.1/ui/src/router/index.ts +38 -0
  342. samba_core-5.3.1/ui/src/stores/connection.ts +54 -0
  343. samba_core-5.3.1/ui/src/stores/jobs.ts +35 -0
  344. samba_core-5.3.1/ui/src/stores/results.ts +113 -0
  345. samba_core-5.3.1/ui/src/stores/scenario.ts +415 -0
  346. samba_core-5.3.1/ui/src/styles.css +44 -0
  347. samba_core-5.3.1/ui/src/utils/forms.ts +11 -0
  348. samba_core-5.3.1/ui/src/utils/parseCsv.ts +75 -0
  349. samba_core-5.3.1/ui/src/utils/parseEconomics.ts +37 -0
  350. samba_core-5.3.1/ui/src/utils/parseSizing.ts +19 -0
  351. samba_core-5.3.1/ui/src/views/EditorView.vue +150 -0
  352. samba_core-5.3.1/ui/src/views/HomeView.vue +39 -0
  353. samba_core-5.3.1/ui/src/views/JobsView.vue +108 -0
  354. samba_core-5.3.1/ui/src/views/NotFoundView.vue +6 -0
  355. samba_core-5.3.1/ui/src/views/ResultsView.vue +113 -0
  356. samba_core-5.3.1/ui/src/views/SettingsView.vue +40 -0
  357. samba_core-5.3.1/ui/src/vite-env.d.ts +9 -0
  358. samba_core-5.3.1/ui/src-tauri/.gitignore +11 -0
  359. samba_core-5.3.1/ui/src-tauri/Cargo.lock +5218 -0
  360. samba_core-5.3.1/ui/src-tauri/Cargo.toml +25 -0
  361. samba_core-5.3.1/ui/src-tauri/build.rs +3 -0
  362. samba_core-5.3.1/ui/src-tauri/capabilities/default.json +10 -0
  363. samba_core-5.3.1/ui/src-tauri/icons/128x128.png +0 -0
  364. samba_core-5.3.1/ui/src-tauri/icons/128x128@2x.png +0 -0
  365. samba_core-5.3.1/ui/src-tauri/icons/32x32.png +0 -0
  366. samba_core-5.3.1/ui/src-tauri/icons/64x64.png +0 -0
  367. samba_core-5.3.1/ui/src-tauri/icons/Square107x107Logo.png +0 -0
  368. samba_core-5.3.1/ui/src-tauri/icons/Square142x142Logo.png +0 -0
  369. samba_core-5.3.1/ui/src-tauri/icons/Square150x150Logo.png +0 -0
  370. samba_core-5.3.1/ui/src-tauri/icons/Square284x284Logo.png +0 -0
  371. samba_core-5.3.1/ui/src-tauri/icons/Square30x30Logo.png +0 -0
  372. samba_core-5.3.1/ui/src-tauri/icons/Square310x310Logo.png +0 -0
  373. samba_core-5.3.1/ui/src-tauri/icons/Square44x44Logo.png +0 -0
  374. samba_core-5.3.1/ui/src-tauri/icons/Square71x71Logo.png +0 -0
  375. samba_core-5.3.1/ui/src-tauri/icons/Square89x89Logo.png +0 -0
  376. samba_core-5.3.1/ui/src-tauri/icons/StoreLogo.png +0 -0
  377. samba_core-5.3.1/ui/src-tauri/icons/icon.icns +0 -0
  378. samba_core-5.3.1/ui/src-tauri/icons/icon.ico +0 -0
  379. samba_core-5.3.1/ui/src-tauri/icons/icon.png +0 -0
  380. samba_core-5.3.1/ui/src-tauri/src/lib.rs +64 -0
  381. samba_core-5.3.1/ui/src-tauri/src/main.rs +6 -0
  382. samba_core-5.3.1/ui/src-tauri/src/samba_process.rs +81 -0
  383. samba_core-5.3.1/ui/src-tauri/tauri.conf.json +35 -0
  384. samba_core-5.3.1/ui/tests/e2e/home.spec.ts +6 -0
  385. samba_core-5.3.1/ui/tests/e2e/results-dispatch-zoom.spec.ts +72 -0
  386. samba_core-5.3.1/ui/tests/e2e/results-smoke.spec.ts +100 -0
  387. samba_core-5.3.1/ui/tests/unit/client.test.ts +43 -0
  388. samba_core-5.3.1/ui/tests/unit/componentCard.test.ts +46 -0
  389. samba_core-5.3.1/ui/tests/unit/connectionStore.test.ts +40 -0
  390. samba_core-5.3.1/ui/tests/unit/health.test.ts +31 -0
  391. samba_core-5.3.1/ui/tests/unit/parseCsv.test.ts +40 -0
  392. samba_core-5.3.1/ui/tests/unit/parseEconomics.test.ts +29 -0
  393. samba_core-5.3.1/ui/tests/unit/resultsStore.test.ts +78 -0
  394. samba_core-5.3.1/ui/tests/unit/scenarioStore.test.ts +43 -0
  395. samba_core-5.3.1/ui/tests/unit/tariffForm.test.ts +31 -0
  396. samba_core-5.3.1/ui/tsconfig.json +29 -0
  397. samba_core-5.3.1/ui/tsconfig.node.json +10 -0
  398. samba_core-5.3.1/ui/vite.config.ts +46 -0
  399. samba_core-5.3.1/ui/vitest.config.ts +22 -0
  400. samba_core-5.3.1/uv.lock +1914 -0
@@ -0,0 +1,23 @@
1
+ # Keep the build context small and reproducible.
2
+ .git
3
+ .github
4
+ .venv
5
+ __pycache__/
6
+ *.pyc
7
+ .mypy_cache
8
+ .pytest_cache
9
+ .ruff_cache
10
+
11
+ # Not needed in the service image
12
+ tests
13
+ planning
14
+ docs
15
+ examples
16
+ ui
17
+ scripts
18
+ working
19
+ artifacts
20
+ results
21
+ _reference
22
+ *.md
23
+ !README.md
@@ -0,0 +1,23 @@
1
+ # SAMBA environment variables — copy to `.env` and fill in your values.
2
+ # cp .env.example .env # then edit .env (it is git-ignored; never commit it)
3
+ #
4
+ # SAMBA's CLI auto-loads a local `.env` (values already in your shell win).
5
+
6
+ # --- NREL NSRDB weather fetch (weather.source: "nsrdb" / `samba fetch-weather`) ---
7
+ # Get a free key at https://developer.nlr.gov/signup/
8
+ NREL_API_KEY=your-nrel-api-key-here
9
+ NREL_API_EMAIL=you@example.com
10
+
11
+ # Optional: override the on-disk weather cache directory (default ~/.cache/samba/weather)
12
+ # SAMBA_WEATHER_CACHE=/path/to/weather/cache
13
+
14
+ # --- REST service (samba serve / Docker) — all optional; see docs/deployment.md ---
15
+ # SAMBA_HOST=127.0.0.1
16
+ # SAMBA_PORT=8000
17
+ # SAMBA_RUN_DIR=results
18
+ # SAMBA_DATA_DIR=.
19
+ # SAMBA_API_KEY= # set to require an X-API-Key header on the API
20
+ # SAMBA_CORS_ORIGINS=*
21
+ # SAMBA_MAX_CONCURRENT=4
22
+ # SAMBA_JOB_TTL_HOURS=24
23
+ # SAMBA_PERSIST_JOBS=0 # 1 = SQLite-backed job store that survives restart
@@ -0,0 +1,61 @@
1
+ name: Bug report
2
+ description: Report something that isn't working as expected
3
+ labels: ["bug"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Thanks for filing a bug. Please search existing issues first, and do
9
+ not report security issues here — see the security policy.
10
+ - type: textarea
11
+ id: what-happened
12
+ attributes:
13
+ label: What happened?
14
+ description: A clear description of the bug, including what you expected instead.
15
+ validations:
16
+ required: true
17
+ - type: textarea
18
+ id: repro
19
+ attributes:
20
+ label: Steps to reproduce
21
+ description: Minimal steps — ideally a small scenario YAML and the command or API call used.
22
+ placeholder: |
23
+ 1. ...
24
+ 2. ...
25
+ render: shell
26
+ validations:
27
+ required: true
28
+ - type: dropdown
29
+ id: interface
30
+ attributes:
31
+ label: Interface
32
+ description: Which way were you using SAMBA?
33
+ options:
34
+ - CLI
35
+ - Python API
36
+ - REST service (samba serve)
37
+ - Desktop / Web UI
38
+ validations:
39
+ required: true
40
+ - type: input
41
+ id: version
42
+ attributes:
43
+ label: SAMBA version / commit
44
+ description: Output of `samba info`, a release version, or a commit SHA.
45
+ validations:
46
+ required: true
47
+ - type: input
48
+ id: environment
49
+ attributes:
50
+ label: Environment
51
+ description: OS, install method (pip / uv / source), and Python/Node versions if relevant.
52
+ validations:
53
+ required: false
54
+ - type: textarea
55
+ id: logs
56
+ attributes:
57
+ label: Logs / output
58
+ description: Solver output, traceback, or a relevant `kpis.json` snippet.
59
+ render: shell
60
+ validations:
61
+ required: false
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Documentation
4
+ url: https://github.com/sambaenergies/samba/tree/main/docs
5
+ about: Getting started, scenario reference, and CLI/API guides.
6
+ - name: Security vulnerability
7
+ url: https://github.com/sambaenergies/samba/security/advisories/new
8
+ about: Report security issues privately — do not open a public issue.
@@ -0,0 +1,25 @@
1
+ name: Feature request
2
+ description: Suggest a capability or improvement
3
+ labels: ["enhancement"]
4
+ body:
5
+ - type: textarea
6
+ id: problem
7
+ attributes:
8
+ label: Problem / motivation
9
+ description: What are you trying to do that SAMBA doesn't support today?
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: proposal
14
+ attributes:
15
+ label: Proposed solution
16
+ description: What you'd like to see — a new component, tariff type, KPI, CLI/API option, etc.
17
+ validations:
18
+ required: false
19
+ - type: textarea
20
+ id: alternatives
21
+ attributes:
22
+ label: Alternatives & context
23
+ description: Workarounds you've tried, other approaches, references (papers, other tools), or example scenarios.
24
+ validations:
25
+ required: false
@@ -0,0 +1,19 @@
1
+ ## Summary
2
+
3
+ - What changed and why.
4
+
5
+ ## Validation
6
+
7
+ - [ ] `just check` (ruff + mypy + schema drift gate)
8
+ - [ ] Relevant `pytest` scope run and passed
9
+ - [ ] For UI changes: `just ui-check` (gen:types drift + lint + vue-tsc + vitest)
10
+
11
+ ## UI/UX Checklist (for UI-affecting PRs)
12
+
13
+ - [ ] Loading/empty/error states implemented for new async UI panels
14
+ - [ ] Keyboard accessibility verified for new controls
15
+ - [ ] Screenshots/GIFs added for UI changes
16
+
17
+ ## Notes
18
+
19
+ - Risks, trade-offs, follow-ups.
@@ -0,0 +1,85 @@
1
+ name: CI
2
+
3
+ # Unified gate: CI runs the exact same `just` recipes developers run locally, so
4
+ # the pipeline cannot drift from `just check` / `just ui-check` / `just test`.
5
+ # `just` is installed via uv (the `rust-just` distribution) — no extra toolchain.
6
+
7
+ on:
8
+ push:
9
+ branches: [main]
10
+ pull_request:
11
+ branches: [main]
12
+
13
+ jobs:
14
+ check:
15
+ name: Check (ruff + mypy + schema drift)
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v7
19
+
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v8.2.0
22
+ with:
23
+ enable-cache: true
24
+ python-version: "3.12"
25
+
26
+ - name: Install dependencies
27
+ run: uv sync --all-extras
28
+
29
+ - name: just check
30
+ run: uvx --from rust-just just check
31
+
32
+ test:
33
+ name: Test (Python ${{ matrix.python-version }}, ${{ matrix.os }})
34
+ runs-on: ${{ matrix.os }}
35
+ strategy:
36
+ fail-fast: false
37
+ matrix:
38
+ os: [ubuntu-latest, windows-latest]
39
+ python-version: ["3.11", "3.12", "3.13"]
40
+ exclude:
41
+ - os: windows-latest
42
+ python-version: "3.13"
43
+
44
+ steps:
45
+ - uses: actions/checkout@v7
46
+
47
+ - name: Install uv
48
+ uses: astral-sh/setup-uv@v8.2.0
49
+ with:
50
+ enable-cache: true
51
+ python-version: "${{ matrix.python-version }}"
52
+
53
+ - name: Install dependencies
54
+ run: uv sync --all-extras
55
+
56
+ # `just test` body, run directly to stay portable on the Windows runner
57
+ # (avoids relying on a POSIX shell for the recipe).
58
+ - name: Test
59
+ run: uv run pytest
60
+
61
+ ui:
62
+ name: UI (just ui-check)
63
+ runs-on: ubuntu-latest
64
+ steps:
65
+ - uses: actions/checkout@v7
66
+
67
+ - name: Install Node.js
68
+ uses: actions/setup-node@v6
69
+ with:
70
+ node-version: "22"
71
+ cache: npm
72
+ cache-dependency-path: ui/package-lock.json
73
+
74
+ - name: Install UI dependencies
75
+ run: npm ci
76
+ working-directory: ui
77
+
78
+ - name: Install uv (for just)
79
+ uses: astral-sh/setup-uv@v8.2.0
80
+ with:
81
+ enable-cache: true
82
+
83
+ # just ui-check: gen:types drift gate + eslint + vue-tsc + vitest
84
+ - name: just ui-check
85
+ run: uvx --from rust-just just ui-check
@@ -0,0 +1,43 @@
1
+ name: Golden Scenarios
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 3 * * *" # 03:00 UTC nightly
6
+ push:
7
+ branches: [main]
8
+ paths:
9
+ - "samba/**"
10
+ - "tests/goldens/**"
11
+ workflow_dispatch:
12
+
13
+ jobs:
14
+ goldens:
15
+ name: Goldens (Python ${{ matrix.python-version }})
16
+ runs-on: ubuntu-latest
17
+ strategy:
18
+ fail-fast: false
19
+ matrix:
20
+ python-version: ["3.11", "3.12"]
21
+
22
+ steps:
23
+ - uses: actions/checkout@v7
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v8.2.0
27
+ with:
28
+ enable-cache: true
29
+ python-version: "${{ matrix.python-version }}"
30
+
31
+ - name: Install SAMBA and dev dependencies
32
+ run: uv sync --extra cli
33
+
34
+ - name: Run golden scenarios
35
+ run: uv run pytest tests/goldens/ -m benchmark --tb=short -q
36
+
37
+ - name: Upload golden output on failure
38
+ if: failure()
39
+ uses: actions/upload-artifact@v7
40
+ with:
41
+ name: golden-failure-py${{ matrix.python-version }}
42
+ path: tests/goldens/**/output/
43
+ if-no-files-found: ignore
@@ -0,0 +1,86 @@
1
+ name: Release
2
+
3
+ # Tag a release (`git tag vX.Y.Z && git push --tags`) to build and publish
4
+ # `samba-core` to PyPI via OIDC Trusted Publishing (no API token). Manually
5
+ # dispatching the workflow instead publishes to TestPyPI for a dry run.
6
+
7
+ on:
8
+ push:
9
+ tags:
10
+ - "v*.*.*"
11
+ workflow_dispatch: {}
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ build:
18
+ name: Build distribution
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v7
22
+
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v8.2.0
25
+ with:
26
+ enable-cache: true
27
+
28
+ - name: Build sdist + wheel
29
+ run: uv build
30
+
31
+ - name: Check distribution metadata
32
+ run: uvx twine check dist/*
33
+
34
+ - uses: actions/upload-artifact@v7
35
+ with:
36
+ name: dist
37
+ path: dist/
38
+
39
+ publish-testpypi:
40
+ name: Publish to TestPyPI (dry run)
41
+ if: github.event_name == 'workflow_dispatch'
42
+ needs: build
43
+ runs-on: ubuntu-latest
44
+ environment: testpypi
45
+ permissions:
46
+ id-token: write # OIDC for Trusted Publishing
47
+ steps:
48
+ - uses: actions/download-artifact@v8
49
+ with:
50
+ name: dist
51
+ path: dist/
52
+ - uses: pypa/gh-action-pypi-publish@release/v1
53
+ with:
54
+ repository-url: https://test.pypi.org/legacy/
55
+
56
+ publish-pypi:
57
+ name: Publish to PyPI
58
+ if: startsWith(github.ref, 'refs/tags/v')
59
+ needs: build
60
+ runs-on: ubuntu-latest
61
+ environment: pypi
62
+ permissions:
63
+ id-token: write # OIDC for Trusted Publishing
64
+ steps:
65
+ - uses: actions/download-artifact@v8
66
+ with:
67
+ name: dist
68
+ path: dist/
69
+ - uses: pypa/gh-action-pypi-publish@release/v1
70
+
71
+ github-release:
72
+ name: Create GitHub release
73
+ if: startsWith(github.ref, 'refs/tags/v')
74
+ needs: publish-pypi
75
+ runs-on: ubuntu-latest
76
+ permissions:
77
+ contents: write # create the release + upload assets
78
+ steps:
79
+ - uses: actions/download-artifact@v8
80
+ with:
81
+ name: dist
82
+ path: dist/
83
+ - uses: softprops/action-gh-release@v3
84
+ with:
85
+ files: dist/*
86
+ generate_release_notes: true
@@ -0,0 +1,230 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .env.*
140
+ !.env.example
141
+ .envrc
142
+ .venv
143
+ env/
144
+ venv/
145
+ ENV/
146
+ env.bak/
147
+ venv.bak/
148
+
149
+ # Spyder project settings
150
+ .spyderproject
151
+ .spyproject
152
+
153
+ # Rope project settings
154
+ .ropeproject
155
+
156
+ # mkdocs documentation
157
+ /site
158
+
159
+ # mypy
160
+ .mypy_cache/
161
+ .dmypy.json
162
+ dmypy.json
163
+
164
+ # Pyre type checker
165
+ .pyre/
166
+
167
+ # pytype static type analyzer
168
+ .pytype/
169
+
170
+ # Cython debug symbols
171
+ cython_debug/
172
+
173
+ # PyCharm
174
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
175
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
176
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
177
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
178
+ #.idea/
179
+
180
+ # Abstra
181
+ # Abstra is an AI-powered process automation framework.
182
+ # Ignore directories containing user credentials, local state, and settings.
183
+ # Learn more at https://abstra.io/docs
184
+ .abstra/
185
+
186
+ # Visual Studio Code
187
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
188
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
189
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
190
+ # you could uncomment the following to ignore the entire vscode folder
191
+ # .vscode/
192
+
193
+ # Ruff stuff:
194
+ .ruff_cache/
195
+
196
+ # PyPI configuration file
197
+ .pypirc
198
+
199
+ # Cursor
200
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
201
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
202
+ # refer to https://docs.cursor.com/context/ignore-files
203
+ .cursorignore
204
+ .cursorindexingignore
205
+
206
+ # Marimo
207
+ marimo/_static/
208
+ marimo/_lsp/
209
+ __marimo__/
210
+
211
+ # SAMBA run outputs (root-level only; does not affect samba/run_result/ source package)
212
+ /results/
213
+
214
+ # SAMBA scratch / debug dumps
215
+ test_after_*.txt
216
+
217
+ # ignore generated artifact from profiling, debug, and other experimental runs
218
+ artifacts/
219
+ # Local-only vendored upstream reference tree — kept locally for one-off
220
+ # comparison only, never tracked or shipped.
221
+ _reference/
222
+
223
+ # Internal working/design notes and roadmap — kept locally, not published.
224
+ planning/
225
+ working/
226
+
227
+ # COP dataset fetched from third-party sources (verify license before committing)
228
+ cop_dataset.csv
229
+ *.raw.csv
230
+ TODO.md
@@ -0,0 +1,11 @@
1
+ {
2
+ "default": true,
3
+ "MD013": false,
4
+ "MD004": { "style": "dash" },
5
+ "MD024": { "siblings_only": true },
6
+ "MD033": false,
7
+ "MD036": false,
8
+ "MD040": false,
9
+ "MD041": false,
10
+ "MD060": false
11
+ }
@@ -0,0 +1,4 @@
1
+ # Internal planning / historical scratch notes — local only, not published.
2
+ planning/
3
+ # Local-only vendored reference tree (git-ignored).
4
+ _reference/
@@ -0,0 +1,14 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.3.0
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - id: ruff-format
8
+ - repo: https://github.com/pre-commit/pre-commit-hooks
9
+ rev: v4.5.0
10
+ hooks:
11
+ - id: trailing-whitespace
12
+ - id: end-of-file-fixer
13
+ - id: check-yaml
14
+ - id: check-toml