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.
- samba_core-5.3.1/.dockerignore +23 -0
- samba_core-5.3.1/.env.example +23 -0
- samba_core-5.3.1/.github/ISSUE_TEMPLATE/bug_report.yml +61 -0
- samba_core-5.3.1/.github/ISSUE_TEMPLATE/config.yml +8 -0
- samba_core-5.3.1/.github/ISSUE_TEMPLATE/feature_request.yml +25 -0
- samba_core-5.3.1/.github/PULL_REQUEST_TEMPLATE.md +19 -0
- samba_core-5.3.1/.github/workflows/ci.yml +85 -0
- samba_core-5.3.1/.github/workflows/goldens.yml +43 -0
- samba_core-5.3.1/.github/workflows/release.yml +86 -0
- samba_core-5.3.1/.gitignore +230 -0
- samba_core-5.3.1/.markdownlint.json +11 -0
- samba_core-5.3.1/.markdownlintignore +4 -0
- samba_core-5.3.1/.pre-commit-config.yaml +14 -0
- samba_core-5.3.1/CHANGELOG.md +396 -0
- samba_core-5.3.1/CITATION.cff +15 -0
- samba_core-5.3.1/CONTRIBUTING.md +59 -0
- samba_core-5.3.1/Dockerfile +35 -0
- samba_core-5.3.1/LICENSE +373 -0
- samba_core-5.3.1/PKG-INFO +496 -0
- samba_core-5.3.1/README.md +88 -0
- samba_core-5.3.1/SECURITY.md +46 -0
- samba_core-5.3.1/docs/README.md +3 -0
- samba_core-5.3.1/docs/about.md +96 -0
- samba_core-5.3.1/docs/acknowledgements.md +5 -0
- samba_core-5.3.1/docs/api-reference.md +190 -0
- samba_core-5.3.1/docs/assets/samba-logo-black.png +0 -0
- samba_core-5.3.1/docs/assets/samba-logo-black.svg +22 -0
- samba_core-5.3.1/docs/assets/samba-logo-white.png +0 -0
- samba_core-5.3.1/docs/assets/samba-logo-white.svg +22 -0
- samba_core-5.3.1/docs/assets/samba-logo.svg +30 -0
- samba_core-5.3.1/docs/cli-reference.md +252 -0
- samba_core-5.3.1/docs/deployment.md +66 -0
- samba_core-5.3.1/docs/developer/architecture.md +98 -0
- samba_core-5.3.1/docs/developer/domain-model.md +433 -0
- samba_core-5.3.1/docs/developer/results-contract.md +150 -0
- samba_core-5.3.1/docs/getting-started.md +160 -0
- samba_core-5.3.1/docs/index.md +78 -0
- samba_core-5.3.1/docs/known-limitations.md +96 -0
- samba_core-5.3.1/docs/scenario-reference.md +811 -0
- samba_core-5.3.1/docs/thermal-components.md +440 -0
- samba_core-5.3.1/examples/base_scenario.yaml +222 -0
- samba_core-5.3.1/examples/commercial_demand_nem.yaml +68 -0
- samba_core-5.3.1/examples/content/cop_ashp_reference.csv +25 -0
- samba_core-5.3.1/examples/content/load_residential_8760.csv +8760 -0
- samba_core-5.3.1/examples/content/weather_sf_2019.csv +8763 -0
- samba_core-5.3.1/examples/grid_pv_heat_pump.yaml +149 -0
- samba_core-5.3.1/examples/grid_pv_heat_pump_dataset.yaml +131 -0
- samba_core-5.3.1/examples/pv_battery_ev.yaml +182 -0
- samba_core-5.3.1/justfile +51 -0
- samba_core-5.3.1/pyproject.toml +104 -0
- samba_core-5.3.1/renovate.json +4 -0
- samba_core-5.3.1/samba/__init__.py +69 -0
- samba_core-5.3.1/samba/__main__.py +12 -0
- samba_core-5.3.1/samba/_kpi_contract.py +29 -0
- samba_core-5.3.1/samba/_pipeline.py +310 -0
- samba_core-5.3.1/samba/_version.py +5 -0
- samba_core-5.3.1/samba/batteries/__init__.py +25 -0
- samba_core-5.3.1/samba/batteries/degradation.py +52 -0
- samba_core-5.3.1/samba/batteries/factory.py +72 -0
- samba_core-5.3.1/samba/batteries/kibam.py +364 -0
- samba_core-5.3.1/samba/compiler/__init__.py +19 -0
- samba_core-5.3.1/samba/compiler/annualize.py +113 -0
- samba_core-5.3.1/samba/compiler/builders/__init__.py +24 -0
- samba_core-5.3.1/samba/compiler/builders/battery.py +108 -0
- samba_core-5.3.1/samba/compiler/builders/diesel.py +176 -0
- samba_core-5.3.1/samba/compiler/builders/ev.py +192 -0
- samba_core-5.3.1/samba/compiler/builders/gas_supply.py +128 -0
- samba_core-5.3.1/samba/compiler/builders/grid.py +107 -0
- samba_core-5.3.1/samba/compiler/builders/heat_pump.py +178 -0
- samba_core-5.3.1/samba/compiler/builders/inverter.py +94 -0
- samba_core-5.3.1/samba/compiler/builders/pv.py +87 -0
- samba_core-5.3.1/samba/compiler/builders/thermal_load.py +151 -0
- samba_core-5.3.1/samba/compiler/builders/thermal_storage.py +182 -0
- samba_core-5.3.1/samba/compiler/builders/wind.py +218 -0
- samba_core-5.3.1/samba/compiler/buses.py +116 -0
- samba_core-5.3.1/samba/compiler/compiler.py +647 -0
- samba_core-5.3.1/samba/compiler/constraints.py +436 -0
- samba_core-5.3.1/samba/economics/__init__.py +58 -0
- samba_core-5.3.1/samba/economics/cashflow.py +716 -0
- samba_core-5.3.1/samba/economics/emissions.py +178 -0
- samba_core-5.3.1/samba/economics/npc.py +151 -0
- samba_core-5.3.1/samba/economics/replacement.py +111 -0
- samba_core-5.3.1/samba/economics/salvage.py +103 -0
- samba_core-5.3.1/samba/input_resolver.py +145 -0
- samba_core-5.3.1/samba/load_profiles/__init__.py +31 -0
- samba_core-5.3.1/samba/load_profiles/ev_presence.py +217 -0
- samba_core-5.3.1/samba/load_profiles/expander.py +245 -0
- samba_core-5.3.1/samba/load_profiles/generic.py +114 -0
- samba_core-5.3.1/samba/load_profiles/templates.py +104 -0
- samba_core-5.3.1/samba/load_profiles/thermal.py +238 -0
- samba_core-5.3.1/samba/pareto/__init__.py +30 -0
- samba_core-5.3.1/samba/pareto/sweep.py +400 -0
- samba_core-5.3.1/samba/run_result/__init__.py +33 -0
- samba_core-5.3.1/samba/run_result/contracts.py +205 -0
- samba_core-5.3.1/samba/run_result/kpis.py +562 -0
- samba_core-5.3.1/samba/run_result/reader.py +207 -0
- samba_core-5.3.1/samba/run_result/writer.py +360 -0
- samba_core-5.3.1/samba/scenario/__init__.py +15 -0
- samba_core-5.3.1/samba/scenario/loader.py +131 -0
- samba_core-5.3.1/samba/scenario/models/__init__.py +103 -0
- samba_core-5.3.1/samba/scenario/models/_components.py +750 -0
- samba_core-5.3.1/samba/scenario/models/_scenario.py +366 -0
- samba_core-5.3.1/samba/scenario/models/_tariff.py +316 -0
- samba_core-5.3.1/samba/solver/__init__.py +55 -0
- samba_core-5.3.1/samba/solver/_extract_helpers.py +108 -0
- samba_core-5.3.1/samba/solver/component_extractors/__init__.py +36 -0
- samba_core-5.3.1/samba/solver/component_extractors/electrical.py +275 -0
- samba_core-5.3.1/samba/solver/component_extractors/thermal.py +168 -0
- samba_core-5.3.1/samba/solver/extract.py +289 -0
- samba_core-5.3.1/samba/solver/runner.py +357 -0
- samba_core-5.3.1/samba/tariff/__init__.py +26 -0
- samba_core-5.3.1/samba/tariff/demand.py +121 -0
- samba_core-5.3.1/samba/tariff/endogenous.py +359 -0
- samba_core-5.3.1/samba/tariff/flat.py +19 -0
- samba_core-5.3.1/samba/tariff/gas.py +78 -0
- samba_core-5.3.1/samba/tariff/monthly.py +45 -0
- samba_core-5.3.1/samba/tariff/monthly_tiered.py +63 -0
- samba_core-5.3.1/samba/tariff/resolver.py +134 -0
- samba_core-5.3.1/samba/tariff/seasonal.py +49 -0
- samba_core-5.3.1/samba/tariff/seasonal_tiered.py +66 -0
- samba_core-5.3.1/samba/tariff/service_charge.py +76 -0
- samba_core-5.3.1/samba/tariff/tiered.py +70 -0
- samba_core-5.3.1/samba/tariff/tou.py +91 -0
- samba_core-5.3.1/samba/tariff/ultra_low_tou.py +87 -0
- samba_core-5.3.1/samba/thermal/__init__.py +56 -0
- samba_core-5.3.1/samba/thermal/buses.py +98 -0
- samba_core-5.3.1/samba/thermal/constants.py +86 -0
- samba_core-5.3.1/samba/thermal/cop.py +387 -0
- samba_core-5.3.1/samba/thermal/cop_dataset.py +152 -0
- samba_core-5.3.1/samba/thermal/cop_fetch.py +212 -0
- samba_core-5.3.1/samba/thermal/gas_constants.py +58 -0
- samba_core-5.3.1/samba/thermal/hp_catalog.py +113 -0
- samba_core-5.3.1/samba/weather/__init__.py +19 -0
- samba_core-5.3.1/samba/weather/fetch.py +140 -0
- samba_core-5.3.1/samba/weather/models.py +90 -0
- samba_core-5.3.1/samba/weather/nsrdb.py +116 -0
- samba_core-5.3.1/samba/weather/poa.py +150 -0
- samba_core-5.3.1/samba_cli/__init__.py +4 -0
- samba_core-5.3.1/samba_cli/__main__.py +8 -0
- samba_core-5.3.1/samba_cli/formatting.py +156 -0
- samba_core-5.3.1/samba_cli/handlers.py +517 -0
- samba_core-5.3.1/samba_cli/main.py +236 -0
- samba_core-5.3.1/samba_service/__init__.py +4 -0
- samba_core-5.3.1/samba_service/app.py +419 -0
- samba_core-5.3.1/samba_service/auth.py +59 -0
- samba_core-5.3.1/samba_service/config.py +114 -0
- samba_core-5.3.1/samba_service/jobs.py +465 -0
- samba_core-5.3.1/samba_service/models.py +177 -0
- samba_core-5.3.1/samba_service/persistent_jobs.py +191 -0
- samba_core-5.3.1/schemas/dispatch.schema.json +29 -0
- samba_core-5.3.1/schemas/economics.schema.json +149 -0
- samba_core-5.3.1/schemas/health.schema.json +35 -0
- samba_core-5.3.1/schemas/job.schema.json +124 -0
- samba_core-5.3.1/schemas/kpis.schema.json +309 -0
- samba_core-5.3.1/schemas/scenario.schema.json +2175 -0
- samba_core-5.3.1/schemas/sizing.schema.json +35 -0
- samba_core-5.3.1/schemas/validate.schema.json +22 -0
- samba_core-5.3.1/scripts/analyze_test_timings.py +788 -0
- samba_core-5.3.1/scripts/build_sidecar.py +99 -0
- samba_core-5.3.1/scripts/capture_v2_goldens.py +86 -0
- samba_core-5.3.1/scripts/capture_v4_goldens.py +97 -0
- samba_core-5.3.1/scripts/check_mpl_headers.py +168 -0
- samba_core-5.3.1/scripts/detect_unicode.py +320 -0
- samba_core-5.3.1/scripts/diag_pv_sweep.py +222 -0
- samba_core-5.3.1/scripts/diag_pv_sweep_out.txt +34 -0
- samba_core-5.3.1/scripts/export_schemas.py +74 -0
- samba_core-5.3.1/scripts/gen_logo_assets.py +162 -0
- samba_core-5.3.1/scripts/generate_sample_data.py +39 -0
- samba_core-5.3.1/scripts/normalize_unicode.py +400 -0
- samba_core-5.3.1/scripts/run_test_profiling.ps1 +70 -0
- samba_core-5.3.1/scripts/run_test_profiling.sh +63 -0
- samba_core-5.3.1/scripts/sidecar_entry.py +21 -0
- samba_core-5.3.1/tests/__init__.py +1 -0
- samba_core-5.3.1/tests/benchmarks/__init__.py +1 -0
- samba_core-5.3.1/tests/goldens/__init__.py +4 -0
- samba_core-5.3.1/tests/goldens/conftest.py +177 -0
- samba_core-5.3.1/tests/goldens/g01_grid_pv_batt/reference.json +60 -0
- samba_core-5.3.1/tests/goldens/g01_grid_pv_batt/scenario.yaml +146 -0
- samba_core-5.3.1/tests/goldens/g02_offgrid_pv_batt_dg/reference.json +60 -0
- samba_core-5.3.1/tests/goldens/g02_offgrid_pv_batt_dg/scenario.yaml +104 -0
- samba_core-5.3.1/tests/goldens/g03_grid_pv_batt_tou/reference.json +60 -0
- samba_core-5.3.1/tests/goldens/g03_grid_pv_batt_tou/scenario.yaml +109 -0
- samba_core-5.3.1/tests/goldens/g04_offgrid_pv_wind_batt/reference.json +60 -0
- samba_core-5.3.1/tests/goldens/g04_offgrid_pv_wind_batt/scenario.yaml +100 -0
- samba_core-5.3.1/tests/goldens/g05_grid_only_baseline/reference.json +59 -0
- samba_core-5.3.1/tests/goldens/g05_grid_only_baseline/scenario.yaml +79 -0
- samba_core-5.3.1/tests/goldens/g06_grid_pv_tou/reference.json +61 -0
- samba_core-5.3.1/tests/goldens/g06_grid_pv_tou/scenario.yaml +159 -0
- samba_core-5.3.1/tests/goldens/g07_multi_objective/reference.json +78 -0
- samba_core-5.3.1/tests/goldens/g07_multi_objective/scenario.yaml +105 -0
- samba_core-5.3.1/tests/goldens/g08_dg_unit_commitment/reference.json +78 -0
- samba_core-5.3.1/tests/goldens/g08_dg_unit_commitment/scenario.yaml +109 -0
- samba_core-5.3.1/tests/goldens/g09_ev_smart_charge/reference.json +90 -0
- samba_core-5.3.1/tests/goldens/g09_ev_smart_charge/scenario.yaml +92 -0
- samba_core-5.3.1/tests/goldens/g10_ev_v2g/reference.json +90 -0
- samba_core-5.3.1/tests/goldens/g10_ev_v2g/scenario.yaml +102 -0
- samba_core-5.3.1/tests/goldens/g11_kibam_battery/reference.json +72 -0
- samba_core-5.3.1/tests/goldens/g11_kibam_battery/scenario.yaml +90 -0
- samba_core-5.3.1/tests/goldens/g12_tiered_tariff_endogenous/reference.json +88 -0
- samba_core-5.3.1/tests/goldens/g12_tiered_tariff_endogenous/scenario.yaml +110 -0
- samba_core-5.3.1/tests/goldens/g13_heat_pump_heating_only/heating_5kw.csv +8761 -0
- samba_core-5.3.1/tests/goldens/g13_heat_pump_heating_only/reference.json +84 -0
- samba_core-5.3.1/tests/goldens/g13_heat_pump_heating_only/scenario.yaml +89 -0
- samba_core-5.3.1/tests/goldens/g14_heat_pump_cooling_only/cooling_4kw.csv +8761 -0
- samba_core-5.3.1/tests/goldens/g14_heat_pump_cooling_only/reference.json +84 -0
- samba_core-5.3.1/tests/goldens/g14_heat_pump_cooling_only/scenario.yaml +89 -0
- samba_core-5.3.1/tests/goldens/g15_hp_thermal_storage_tou/heating_5kw.csv +8761 -0
- samba_core-5.3.1/tests/goldens/g15_hp_thermal_storage_tou/reference.json +96 -0
- samba_core-5.3.1/tests/goldens/g15_hp_thermal_storage_tou/scenario.yaml +121 -0
- samba_core-5.3.1/tests/goldens/g16_gas_vs_hp/heating_5kw.csv +8761 -0
- samba_core-5.3.1/tests/goldens/g16_gas_vs_hp/reference.json +96 -0
- samba_core-5.3.1/tests/goldens/g16_gas_vs_hp/scenario.yaml +107 -0
- samba_core-5.3.1/tests/goldens/g17_degree_day_loads/reference.json +102 -0
- samba_core-5.3.1/tests/goldens/g17_degree_day_loads/scenario.yaml +95 -0
- samba_core-5.3.1/tests/goldens/g18_full_coupled_pv_hp_gas/reference.json +126 -0
- samba_core-5.3.1/tests/goldens/g18_full_coupled_pv_hp_gas/scenario.yaml +152 -0
- samba_core-5.3.1/tests/goldens/g19_heat_pump/reference.json +101 -0
- samba_core-5.3.1/tests/goldens/g19_heat_pump/scenario.yaml +87 -0
- samba_core-5.3.1/tests/goldens/g20_demand_charge/reference.json +101 -0
- samba_core-5.3.1/tests/goldens/g20_demand_charge/scenario.yaml +42 -0
- samba_core-5.3.1/tests/goldens/g21_nem_net_billing/reference.json +101 -0
- samba_core-5.3.1/tests/goldens/g21_nem_net_billing/scenario.yaml +38 -0
- samba_core-5.3.1/tests/goldens/g22_bifacial_pv/reference.json +101 -0
- samba_core-5.3.1/tests/goldens/g22_bifacial_pv/scenario.yaml +39 -0
- samba_core-5.3.1/tests/goldens/test_golden.py +371 -0
- samba_core-5.3.1/tests/goldens/test_v2_goldens.py +347 -0
- samba_core-5.3.1/tests/goldens/test_v3_goldens.py +434 -0
- samba_core-5.3.1/tests/integration/__init__.py +1 -0
- samba_core-5.3.1/tests/integration/test_artifact_contracts.py +98 -0
- samba_core-5.3.1/tests/integration/test_cli_thermal_resolution.py +82 -0
- samba_core-5.3.1/tests/integration/test_cop_dataset_example.py +81 -0
- samba_core-5.3.1/tests/integration/test_data_pipeline.py +155 -0
- samba_core-5.3.1/tests/integration/test_demand_charge.py +104 -0
- samba_core-5.3.1/tests/integration/test_dg_milp.py +598 -0
- samba_core-5.3.1/tests/integration/test_ev_dispatch.py +271 -0
- samba_core-5.3.1/tests/integration/test_fidelity.py +112 -0
- samba_core-5.3.1/tests/integration/test_gas_boiler_dispatch.py +259 -0
- samba_core-5.3.1/tests/integration/test_heat_pump_dispatch.py +241 -0
- samba_core-5.3.1/tests/integration/test_kibam_dispatch.py +253 -0
- samba_core-5.3.1/tests/integration/test_pareto.py +243 -0
- samba_core-5.3.1/tests/integration/test_solve_roundtrip.py +329 -0
- samba_core-5.3.1/tests/integration/test_thermal_load_dispatch.py +303 -0
- samba_core-5.3.1/tests/integration/test_thermal_storage_dispatch.py +337 -0
- samba_core-5.3.1/tests/integration/test_thermal_topology.py +190 -0
- samba_core-5.3.1/tests/integration/test_tiered_tariff_dispatch.py +274 -0
- samba_core-5.3.1/tests/unit/__init__.py +1 -0
- samba_core-5.3.1/tests/unit/test_battery_factory.py +196 -0
- samba_core-5.3.1/tests/unit/test_bifacial.py +71 -0
- samba_core-5.3.1/tests/unit/test_cli.py +371 -0
- samba_core-5.3.1/tests/unit/test_compiler.py +473 -0
- samba_core-5.3.1/tests/unit/test_compiler_buses.py +221 -0
- samba_core-5.3.1/tests/unit/test_cop_arrays.py +171 -0
- samba_core-5.3.1/tests/unit/test_cop_dataset.py +147 -0
- samba_core-5.3.1/tests/unit/test_cop_fetch.py +75 -0
- samba_core-5.3.1/tests/unit/test_degradation.py +50 -0
- samba_core-5.3.1/tests/unit/test_demand_nem.py +125 -0
- samba_core-5.3.1/tests/unit/test_dg_unit_commitment.py +338 -0
- samba_core-5.3.1/tests/unit/test_economics.py +576 -0
- samba_core-5.3.1/tests/unit/test_endogenous_tariff.py +252 -0
- samba_core-5.3.1/tests/unit/test_ev_component.py +292 -0
- samba_core-5.3.1/tests/unit/test_ev_presence.py +223 -0
- samba_core-5.3.1/tests/unit/test_extractor_protocol.py +233 -0
- samba_core-5.3.1/tests/unit/test_gas_supply_builder.py +199 -0
- samba_core-5.3.1/tests/unit/test_gas_tariff.py +155 -0
- samba_core-5.3.1/tests/unit/test_hp_catalog.py +70 -0
- samba_core-5.3.1/tests/unit/test_kibam_approx.py +283 -0
- samba_core-5.3.1/tests/unit/test_kpi_contract.py +110 -0
- samba_core-5.3.1/tests/unit/test_load_profiles.py +200 -0
- samba_core-5.3.1/tests/unit/test_multiobjective.py +288 -0
- samba_core-5.3.1/tests/unit/test_persistent_jobs.py +116 -0
- samba_core-5.3.1/tests/unit/test_provenance_guard.py +141 -0
- samba_core-5.3.1/tests/unit/test_run_result.py +41 -0
- samba_core-5.3.1/tests/unit/test_scenario.py +458 -0
- samba_core-5.3.1/tests/unit/test_schema_export.py +35 -0
- samba_core-5.3.1/tests/unit/test_schema_version.py +153 -0
- samba_core-5.3.1/tests/unit/test_service.py +224 -0
- samba_core-5.3.1/tests/unit/test_service_v2.py +622 -0
- samba_core-5.3.1/tests/unit/test_solver.py +515 -0
- samba_core-5.3.1/tests/unit/test_tariff.py +386 -0
- samba_core-5.3.1/tests/unit/test_templates.py +71 -0
- samba_core-5.3.1/tests/unit/test_thermal_bus.py +196 -0
- samba_core-5.3.1/tests/unit/test_thermal_load_builder.py +198 -0
- samba_core-5.3.1/tests/unit/test_thermal_load_profile.py +399 -0
- samba_core-5.3.1/tests/unit/test_thermal_storage.py +322 -0
- samba_core-5.3.1/tests/unit/test_tier_decomposition.py +263 -0
- samba_core-5.3.1/tests/unit/test_weather.py +194 -0
- samba_core-5.3.1/tests/unit/test_weather_fetch.py +77 -0
- samba_core-5.3.1/ui/.gitignore +24 -0
- samba_core-5.3.1/ui/.vscode/extensions.json +7 -0
- samba_core-5.3.1/ui/README.md +50 -0
- samba_core-5.3.1/ui/eslint.config.js +29 -0
- samba_core-5.3.1/ui/index.html +15 -0
- samba_core-5.3.1/ui/package-lock.json +5929 -0
- samba_core-5.3.1/ui/package.json +57 -0
- samba_core-5.3.1/ui/playwright.config.ts +17 -0
- samba_core-5.3.1/ui/public/favicon.ico +0 -0
- samba_core-5.3.1/ui/public/samba-logo.svg +30 -0
- samba_core-5.3.1/ui/public/tauri.svg +6 -0
- samba_core-5.3.1/ui/scripts/gen-types.mjs +37 -0
- samba_core-5.3.1/ui/src/App.vue +7 -0
- samba_core-5.3.1/ui/src/api/artifacts.ts +12 -0
- samba_core-5.3.1/ui/src/api/client.ts +62 -0
- samba_core-5.3.1/ui/src/api/generated/dispatch.ts +23 -0
- samba_core-5.3.1/ui/src/api/generated/economics.ts +78 -0
- samba_core-5.3.1/ui/src/api/generated/health.ts +35 -0
- samba_core-5.3.1/ui/src/api/generated/job.ts +64 -0
- samba_core-5.3.1/ui/src/api/generated/kpis.ts +133 -0
- samba_core-5.3.1/ui/src/api/generated/scenario.ts +763 -0
- samba_core-5.3.1/ui/src/api/generated/sizing.ts +22 -0
- samba_core-5.3.1/ui/src/api/generated/validate.ts +24 -0
- samba_core-5.3.1/ui/src/api/health.ts +6 -0
- samba_core-5.3.1/ui/src/api/jobs.ts +18 -0
- samba_core-5.3.1/ui/src/api/types.ts +94 -0
- samba_core-5.3.1/ui/src/api/validate.ts +6 -0
- samba_core-5.3.1/ui/src/assets/vue.svg +1 -0
- samba_core-5.3.1/ui/src/components/layout/AppShell.vue +29 -0
- samba_core-5.3.1/ui/src/components/layout/ConnectionBadge.vue +20 -0
- samba_core-5.3.1/ui/src/components/layout/NavSidebar.vue +25 -0
- samba_core-5.3.1/ui/src/components/results/ArtifactList.vue +52 -0
- samba_core-5.3.1/ui/src/components/results/CashflowTable.vue +48 -0
- samba_core-5.3.1/ui/src/components/results/CostBreakdownPie.vue +55 -0
- samba_core-5.3.1/ui/src/components/results/DispatchChart.vue +100 -0
- samba_core-5.3.1/ui/src/components/results/DispatchControls.vue +51 -0
- samba_core-5.3.1/ui/src/components/results/KpiCard.vue +18 -0
- samba_core-5.3.1/ui/src/components/results/KpiGrid.vue +53 -0
- samba_core-5.3.1/ui/src/components/results/MonthlyBarChart.vue +50 -0
- samba_core-5.3.1/ui/src/components/results/NpvChart.vue +43 -0
- samba_core-5.3.1/ui/src/components/results/SizingTable.vue +40 -0
- samba_core-5.3.1/ui/src/components/scenario/ComponentCard.vue +75 -0
- samba_core-5.3.1/ui/src/components/scenario/ComponentsForm.vue +15 -0
- samba_core-5.3.1/ui/src/components/scenario/ConstraintsForm.vue +68 -0
- samba_core-5.3.1/ui/src/components/scenario/LoadForm.vue +138 -0
- samba_core-5.3.1/ui/src/components/scenario/LocationForm.vue +86 -0
- samba_core-5.3.1/ui/src/components/scenario/ObjectiveForm.vue +30 -0
- samba_core-5.3.1/ui/src/components/scenario/ProjectForm.vue +124 -0
- samba_core-5.3.1/ui/src/components/scenario/SectionNav.vue +48 -0
- samba_core-5.3.1/ui/src/components/scenario/TariffForm.vue +122 -0
- samba_core-5.3.1/ui/src/components/scenario/ValidationSummary.vue +61 -0
- samba_core-5.3.1/ui/src/components/scenario/componentFields.ts +103 -0
- samba_core-5.3.1/ui/src/main.ts +47 -0
- samba_core-5.3.1/ui/src/router/index.ts +38 -0
- samba_core-5.3.1/ui/src/stores/connection.ts +54 -0
- samba_core-5.3.1/ui/src/stores/jobs.ts +35 -0
- samba_core-5.3.1/ui/src/stores/results.ts +113 -0
- samba_core-5.3.1/ui/src/stores/scenario.ts +415 -0
- samba_core-5.3.1/ui/src/styles.css +44 -0
- samba_core-5.3.1/ui/src/utils/forms.ts +11 -0
- samba_core-5.3.1/ui/src/utils/parseCsv.ts +75 -0
- samba_core-5.3.1/ui/src/utils/parseEconomics.ts +37 -0
- samba_core-5.3.1/ui/src/utils/parseSizing.ts +19 -0
- samba_core-5.3.1/ui/src/views/EditorView.vue +150 -0
- samba_core-5.3.1/ui/src/views/HomeView.vue +39 -0
- samba_core-5.3.1/ui/src/views/JobsView.vue +108 -0
- samba_core-5.3.1/ui/src/views/NotFoundView.vue +6 -0
- samba_core-5.3.1/ui/src/views/ResultsView.vue +113 -0
- samba_core-5.3.1/ui/src/views/SettingsView.vue +40 -0
- samba_core-5.3.1/ui/src/vite-env.d.ts +9 -0
- samba_core-5.3.1/ui/src-tauri/.gitignore +11 -0
- samba_core-5.3.1/ui/src-tauri/Cargo.lock +5218 -0
- samba_core-5.3.1/ui/src-tauri/Cargo.toml +25 -0
- samba_core-5.3.1/ui/src-tauri/build.rs +3 -0
- samba_core-5.3.1/ui/src-tauri/capabilities/default.json +10 -0
- samba_core-5.3.1/ui/src-tauri/icons/128x128.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/128x128@2x.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/32x32.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/64x64.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/Square107x107Logo.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/Square142x142Logo.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/Square150x150Logo.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/Square284x284Logo.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/Square30x30Logo.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/Square310x310Logo.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/Square44x44Logo.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/Square71x71Logo.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/Square89x89Logo.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/StoreLogo.png +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/icon.icns +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/icon.ico +0 -0
- samba_core-5.3.1/ui/src-tauri/icons/icon.png +0 -0
- samba_core-5.3.1/ui/src-tauri/src/lib.rs +64 -0
- samba_core-5.3.1/ui/src-tauri/src/main.rs +6 -0
- samba_core-5.3.1/ui/src-tauri/src/samba_process.rs +81 -0
- samba_core-5.3.1/ui/src-tauri/tauri.conf.json +35 -0
- samba_core-5.3.1/ui/tests/e2e/home.spec.ts +6 -0
- samba_core-5.3.1/ui/tests/e2e/results-dispatch-zoom.spec.ts +72 -0
- samba_core-5.3.1/ui/tests/e2e/results-smoke.spec.ts +100 -0
- samba_core-5.3.1/ui/tests/unit/client.test.ts +43 -0
- samba_core-5.3.1/ui/tests/unit/componentCard.test.ts +46 -0
- samba_core-5.3.1/ui/tests/unit/connectionStore.test.ts +40 -0
- samba_core-5.3.1/ui/tests/unit/health.test.ts +31 -0
- samba_core-5.3.1/ui/tests/unit/parseCsv.test.ts +40 -0
- samba_core-5.3.1/ui/tests/unit/parseEconomics.test.ts +29 -0
- samba_core-5.3.1/ui/tests/unit/resultsStore.test.ts +78 -0
- samba_core-5.3.1/ui/tests/unit/scenarioStore.test.ts +43 -0
- samba_core-5.3.1/ui/tests/unit/tariffForm.test.ts +31 -0
- samba_core-5.3.1/ui/tsconfig.json +29 -0
- samba_core-5.3.1/ui/tsconfig.node.json +10 -0
- samba_core-5.3.1/ui/vite.config.ts +46 -0
- samba_core-5.3.1/ui/vitest.config.ts +22 -0
- 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,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
|