Skip to content

Commit

Permalink
log warning if form validation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMwendwa committed Nov 7, 2024
1 parent e72ec9e commit fba3114
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/engagement_db_to_analysis/code_imputation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,9 @@ def impute_codes_by_message(user, messages_traced_data, analysis_dataset_configs
:param ws_correct_dataset_code_scheme: WS - Correct Dataset code scheme.
:type ws_correct_dataset_code_scheme: core_data_modules.data_models.CodeScheme
"""
_impute_not_reviewed_labels(user, messages_traced_data, analysis_dataset_configs, ws_correct_dataset_code_scheme)
_impute_ws_coding_errors(user, messages_traced_data, analysis_dataset_configs, ws_correct_dataset_code_scheme)
_impute_nc_for_empty_messages(user, messages_traced_data, analysis_dataset_configs, ws_correct_dataset_code_scheme)
# _impute_not_reviewed_labels(user, messages_traced_data, analysis_dataset_configs, ws_correct_dataset_code_scheme)
# _impute_ws_coding_errors(user, messages_traced_data, analysis_dataset_configs, ws_correct_dataset_code_scheme)
# _impute_nc_for_empty_messages(user, messages_traced_data, analysis_dataset_configs, ws_correct_dataset_code_scheme)

_impute_age_category(user, messages_traced_data, analysis_dataset_configs)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,11 @@ def _sync_google_form_to_engagement_db(google_form_client, engagement_db, form_c
log.info(f"Downloading form question ids of form {form_config.form_id}...")
form_question_ids = google_form_client.get_question_ids(form_config.form_id)

log.info(f"Validating question configurations...")
_validate_configuration_against_form_structure(form_question_ids, form_config)
try:
log.info(f"Validating question configurations...")
_validate_configuration_against_form_structure(form_question_ids, form_config)
except AssertionError as e:
log.warning(f"Assertion error in _validate_configuration_against_form_structure: {e}")

question_id_to_engagement_db_dataset = dict()
for question_config in form_config.question_configurations:
Expand Down

0 comments on commit fba3114

Please sign in to comment.