-
Notifications
You must be signed in to change notification settings - Fork 1
Contributing
Hoda Rezvanjoo edited this page May 28, 2026
·
1 revision
git clone https://github.com/Hoda834/digital-budget-optimisation-engine.git
cd digital-budget-optimisation-engine
pip install -r requirements.txt
pip install pytest
pytest -q # should print "141 passed"-
mainis what Streamlit Cloud serves. Don't push directly. - Feature branches:
feature/<short-description>orfix/<short-description>. - Open a PR against
main. CI runspytest -qon every push and PR.
-
Type hints required on public functions in
modules/andcore/.from __future__ import annotationsat the top of every module. -
Comments explain why, not what. README and
docs/carry long-form explanation; keep code comments terse. -
No new constants without a calibration entry. Every
hand-tuned numeric literal needs a row in
Calibration-Constants and
docs/CALIBRATION.md. -
Snapshots, not live state. Modules read from
Module4Result-style immutable snapshots, never reach back intoWizardStatemid-solve.
- Add the platform code to
ALLOWED_PLATFORMSandPLATFORMS(wizard_state.pyandmodule2.py). - Add the display name to
PLATFORM_NAMESinmodule7.py. - Add KPI rows to
KPI_CONFIGincore/kpi_config.py— one per(platform, goal, var). - If the platform has a standard CSV export, add a parser block
in
core/csv_import.pywith column mappings and composition rules. - Add a smoke test in
tests/smoke_test.pyand an edge-case entry intests/edge_cases.pyif the platform has unusual behaviour.
- Add the constraint inside
_solve_single_lpwith a namedLpConstraint. - The name will appear automatically in
binding_constraintsand the diagnostics panel. - If user-tunable, add the field to
WizardState, surface it inapp.py(Step 4 or "Refine and re-solve"), and snapshot it intoModule4Result.
- Add a defaulted field to
Module7Policy(the class isfrozen=True, so callers explicitly pass a new instance). - Reference it where a magic number would otherwise live.
- Add a row to Calibration-Constants documenting what changes when the value moves.
In scope — new constraints, new platforms, better diagnostics, better forecast-band heuristics, more scenario archetypes (recession, growth, brand pivot), UI polish that doesn't change behaviour, tests (especially edge cases).
Out of scope — platform API connectors (this is a planner, not an operator), continuous learning / Bayesian recalibration (different product), campaign / ad-set / creative-level optimisation (downstream of the channel split), attribution and incrementality modelling (would need a different data foundation).
MIT. By contributing you agree your contributions are licensed under the same terms.