biocore / microsetta-private-api

A private microservice to support The Microsetta Initiative
BSD 3-Clause "New" or "Revised" License
6 stars 19 forks source link

migrating survey to updated structure #474

Closed charles-cowart closed 1 year ago

charles-cowart commented 1 year ago

Work in Progress. Triggers need to be added. Some remapped questions need to be remade into new questions due to constraints and new/changed/deleted options. Migraines category needs to be merged and removed. Basic testing w/UI needed.

wasade commented 1 year ago

Thanks!

On Nov 3, 2022, at 4:19 PM, Charles Cowart @.***> wrote:

@charles-cowart commented on this pull request.

In microsetta_private_api/api/_survey.py https://github.com/biocore/microsetta-private-api/pull/474#discussion_r1013480494:

@@ -42,8 +42,9 @@ def read_survey_templates(account_id, source_id, language_tag, token_info): SurveyTemplateRepo.VIOSCREEN_ID, SurveyTemplateRepo.MYFOODREPO_ID, SurveyTemplateRepo.POLYPHENOL_FFQ_ID,

  • SurveyTemplateRepo.SPAIN_FFQ_ID]
  • ]), 200
  • SurveyTemplateRepo.SPAIN_FFQ_ID,
  • 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, @wasade https://github.com/wasade Will do! Planning on doing it all at once, after the tests are fixed.

— Reply to this email directly, view it on GitHub https://github.com/biocore/microsetta-private-api/pull/474#discussion_r1013480494, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADTZMX7OGMXT3WIEC77HOLWGRB7NANCNFSM6AAAAAARRQ2QEI. You are receiving this because you were mentioned.

charles-cowart commented 1 year ago

Confirmed test_unlocalize_bug() is also fixed.

charles-cowart commented 1 year ago

Just confirmed that build_db.py installs all patches and completes migration successfully when using a fresh db instance on my working copy (cd28228a5ef23ca76ab85e2138980924514e9db5). Going to try running this one more time.

charles-cowart commented 1 year ago

Just confirmed that build_db.py installs all patches and completes migration successfully when using a fresh db instance on my working copy (cd28228). Going to try running this one more time.

Confirmed the errors are actually the five known test failures post-migration. The migration itself appears to have been successful in CI. Working on resolving these five errors.

cassidysymons commented 1 year ago

@charles-cowart can you please adjust this PR to be against master-overhaul rather than master? You'll need to move your DB patch to a different file name (0107.sql) and update the migration code accordingly. You might also need to update your local master-overhaul branch. Thanks!

sejsong commented 1 year ago

Thanks! Just responded

On Thu, Dec 1, 2022 at 3:35 PM Daniel McDonald @.***> wrote:

@.**** commented on this pull request.

In microsetta_private_api/db/patches/0105.sql https://github.com/biocore/microsetta-private-api/pull/474#discussion_r1037656365 :

+insert into ag.survey_question_response_type (survey_question_id, survey_response_type) values (498, 'SINGLE'); +insert into ag.survey_question_response_type (survey_question_id, survey_response_type) values (499, 'SINGLE'); +insert into ag.survey_question_response_type (survey_question_id, survey_response_type) values (500, 'SINGLE'); +insert into ag.survey_question_response_type (survey_question_id, survey_response_type) values (501, 'SINGLE'); +insert into ag.survey_question_response_type (survey_question_id, survey_response_type) values (502, 'SINGLE'); +insert into ag.survey_question_response_type (survey_question_id, survey_response_type) values (503, 'SINGLE'); +insert into ag.survey_question_response_type (survey_question_id, survey_response_type) values (504, 'SINGLE'); +insert into ag.survey_question_response_type (survey_question_id, survey_response_type) values (505, 'SINGLE'); +insert into ag.survey_question_response_type (survey_question_id, survey_response_type) values (506, 'SINGLE'); +insert into ag.survey_question_response_type (survey_question_id, survey_response_type) values (507, 'SINGLE'); + + +/ STEP 10 Add triggers for nested questions. / +insert into ag.survey_question_triggers (survey_question_id, triggering_response, triggered_question) values (149, 'Yes',150); +insert into ag.survey_question_triggers (survey_question_id, triggering_response, triggered_question) values (153, 'Self-diagnosed',154); +insert into ag.survey_question_triggers (survey_question_id, triggering_response, triggered_question) values (153, 'Yes, diagnosed by a licensed mental health professional', 154);

Just retagged you on the context

— Reply to this email directly, view it on GitHub https://github.com/biocore/microsetta-private-api/pull/474#discussion_r1037656365, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARD53OFR74MWEPSIVBBKX3WLEY4VANCNFSM6AAAAAARRQ2QEI . You are receiving this because you were mentioned.Message ID: @.***>

cassidysymons commented 1 year ago

Closing, superseded by #489