FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit b467d24e authored by Dr T. Mona's avatar Dr T. Mona
Browse files

Fix: folder creation and messaging fix.

- Always create ExportCSV folder if it is not exist to allow merging.
- Correcting messages to not have ODK as the default download.
- Add ProcessorSurveysWRT import.
parent 353efefb
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,7 @@ from source_gen.clustering import run_case ...@@ -18,6 +18,7 @@ from source_gen.clustering import run_case
from ProcessorSurveysODK import get_ODK_form_as_csv from ProcessorSurveysODK import get_ODK_form_as_csv
from ProcessorSurveyskobotoolbox import get_kobotoolbox_form_as_csv from ProcessorSurveyskobotoolbox import get_kobotoolbox_form_as_csv
from ProcessorSurveysWRSIS import get_WRSIS_form_as_csv from ProcessorSurveysWRSIS import get_WRSIS_form_as_csv
from ProcessorSurveysWRT import get_WRT_form_as_csv
from ProcessorUtils import ( from ProcessorUtils import (
subprocess_and_log, subprocess_and_log,
endJob, endJob,
...@@ -30,7 +31,8 @@ add_filters_to_sublogger(logger) ...@@ -30,7 +31,8 @@ add_filters_to_sublogger(logger)
GET_FORM_AS_CSV_DICT = { GET_FORM_AS_CSV_DICT = {
'ODK' : get_ODK_form_as_csv, 'ODK' : get_ODK_form_as_csv,
'kobotoolbox' : get_kobotoolbox_form_as_csv, 'kobotoolbox' : get_kobotoolbox_form_as_csv,
'WRSIS' : get_WRSIS_form_as_csv 'WRSIS' : get_WRSIS_form_as_csv,
'WRT' : get_WRT_form_as_csv
} }
def process_pre_job_survey(input_args): def process_pre_job_survey(input_args):
...@@ -154,13 +156,14 @@ def process_in_job_survey(jobPath,status,config,component): ...@@ -154,13 +156,14 @@ def process_in_job_survey(jobPath,status,config,component):
dfm = concat([dfm,dfi],axis='rows') dfm = concat([dfm,dfi],axis='rows')
# save the result # save the result
ODK_csv_path = f"{jobPath}/ExportCSV/" Export_csv_path = f"{jobPath}/ExportCSV/"
forms_fn = f"{ODK_csv_path}/Merged_SurveyData.csv" Path(Export_csv_path).mkdir(parents = True, exist_ok = True)
forms_fn = f"{Export_csv_path}/Merged_SurveyData.csv"
dfm.to_csv(forms_fn,index=False,quoting=csv.QUOTE_MINIMAL) dfm.to_csv(forms_fn,index=False,quoting=csv.QUOTE_MINIMAL)
logger.debug(f"Preparing to apply removals and additions to ODK survey data") logger.debug(f"Preparing to apply removals and additions to survey data")
processed_surveys_filepath = f"{ODK_csv_path}/Processed_SurveyData.csv" processed_surveys_filepath = f"{Export_csv_path}/Processed_SurveyData.csv"
survey_errors_to_remove_filepath = f"{config['ResourcesPath']}/coordinator/assets/SURVEYDATA_MANUAL/SurveyDataErrorsToRemove.csv" survey_errors_to_remove_filepath = f"{config['ResourcesPath']}/coordinator/assets/SURVEYDATA_MANUAL/SurveyDataErrorsToRemove.csv"
survey_additions_filepath = f"{config['ResourcesPath']}/coordinator/assets/SURVEYDATA_MANUAL/LIVE_SURVEYDATA_TOUSE.csv" survey_additions_filepath = f"{config['ResourcesPath']}/coordinator/assets/SURVEYDATA_MANUAL/LIVE_SURVEYDATA_TOUSE.csv"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment