feat: expose prediction setup id in prediction responses (CLIM-1110) - #607
edvinstava wants to merge 6 commits into
Conversation
|
Reviewed the diff. No live correctness bug: every production path returns an ORM row with the FK loaded, so Worth fixing before merge1. The FK has no
2. Two copies with two different descriptions, so OpenAPI documents one column two ways. 3. It is the only default on any Test coverage4. The only test that proves a setup-triggered run populates the field on the wire is skipped ( 5. Two of the four serialization paths have no assertion on the new field: Test cost6. The 2x2 parametrize seeds the full database four times ( 7. Third verbatim copy of the create-setup-and-link-prediction block ( Process: the PR is not in draft, which the repo convention expects until it is ready for review. |
Move prediction_setup_id onto PredictionBase so the column and the read view share one declaration instead of two with diverging descriptions. The mapped column is unchanged, so no migration is needed. Collapse the 2x2 parametrize on the new test to a single run per endpoint that asserts null, links a setup, then asserts the id. Add assertions on the two remaining serialization paths (jobs prediction_result and PredictionSetupReadWithPredictions.predictions) and pin the prediction_setup_id kwarg passed from /run to queue_db.
…ub.com/dhis2-chap/chap-core into eas/feat/clim-1110-prediction-setup-id
Adds
predictionSetupIdto prediction responses so dashboard widgets can link to the prediction in the modeling app. Returnsnullwhen no setup is attached.