Modularise config for download and readable datetime rules

replace/4136f6d689073e601079617903d533c2642a8e75
JulioV 2019-10-24 17:27:00 -04:00
parent 3d2557a595
commit 202b881f34
2 changed files with 10 additions and 2 deletions

View File

@ -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]

View File

@ -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: