From 202b881f34ed3a359cc86a852c246d0603d53551 Mon Sep 17 00:00:00 2001 From: JulioV Date: Thu, 24 Oct 2019 17:27:00 -0400 Subject: [PATCH] Modularise config for download and readable datetime rules --- config.yaml | 8 ++++++++ rules/preprocessing.snakefile | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/config.yaml b/config.yaml index 15433dd1..a2cc57c9 100644 --- a/config.yaml +++ b/config.yaml @@ -10,6 +10,14 @@ PIDS: [p01, p02] DAY_SEGMENTS: &day_segments [daily, morning, afternoon, evening, night] +# Download data config +DOWNLOAD_DATASET: + GROUP: AAPECS + +# Readable datetime config +READABLE_DATETIME: + FIXED_TIMEZONE: EST + # Communication SMS features config COM_SMS: SMS_TYPES : [received, sent] diff --git a/rules/preprocessing.snakefile b/rules/preprocessing.snakefile index cfeb76b7..987a8dad 100644 --- a/rules/preprocessing.snakefile +++ b/rules/preprocessing.snakefile @@ -2,7 +2,7 @@ rule download_dataset: input: "data/external/{pid}" params: - group = "AAPECS", + group = config["DOWNLOAD_DATASET"]["GROUP"], table = "{sensor}" output: "data/raw/{pid}/{sensor}_raw.csv" @@ -14,7 +14,7 @@ rule readable_datetime: sensor_input = rules.download_dataset.output params: timezones = None, - fixed_timezone = "EST" + fixed_timezone = config["READABLE_DATETIME"]["FIXED_TIMEZONE"] output: "data/raw/{pid}/{sensor}_with_datetime.csv" script: