Modularise config for download and readable datetime rules
parent
3d2557a595
commit
202b881f34
|
@ -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]
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue