Modularise config for download and readable datetime rules
parent
3d2557a595
commit
202b881f34
|
@ -10,6 +10,14 @@ PIDS: [p01, p02]
|
||||||
DAY_SEGMENTS: &day_segments
|
DAY_SEGMENTS: &day_segments
|
||||||
[daily, morning, afternoon, evening, night]
|
[daily, morning, afternoon, evening, night]
|
||||||
|
|
||||||
|
# Download data config
|
||||||
|
DOWNLOAD_DATASET:
|
||||||
|
GROUP: AAPECS
|
||||||
|
|
||||||
|
# Readable datetime config
|
||||||
|
READABLE_DATETIME:
|
||||||
|
FIXED_TIMEZONE: EST
|
||||||
|
|
||||||
# Communication SMS features config
|
# Communication SMS features config
|
||||||
COM_SMS:
|
COM_SMS:
|
||||||
SMS_TYPES : [received, sent]
|
SMS_TYPES : [received, sent]
|
||||||
|
|
|
@ -2,7 +2,7 @@ rule download_dataset:
|
||||||
input:
|
input:
|
||||||
"data/external/{pid}"
|
"data/external/{pid}"
|
||||||
params:
|
params:
|
||||||
group = "AAPECS",
|
group = config["DOWNLOAD_DATASET"]["GROUP"],
|
||||||
table = "{sensor}"
|
table = "{sensor}"
|
||||||
output:
|
output:
|
||||||
"data/raw/{pid}/{sensor}_raw.csv"
|
"data/raw/{pid}/{sensor}_raw.csv"
|
||||||
|
@ -14,7 +14,7 @@ rule readable_datetime:
|
||||||
sensor_input = rules.download_dataset.output
|
sensor_input = rules.download_dataset.output
|
||||||
params:
|
params:
|
||||||
timezones = None,
|
timezones = None,
|
||||||
fixed_timezone = "EST"
|
fixed_timezone = config["READABLE_DATETIME"]["FIXED_TIMEZONE"]
|
||||||
output:
|
output:
|
||||||
"data/raw/{pid}/{sensor}_with_datetime.csv"
|
"data/raw/{pid}/{sensor}_with_datetime.csv"
|
||||||
script:
|
script:
|
||||||
|
|
Loading…
Reference in New Issue