Fix Travis testing on master

pull/95/head
kaguillera 2020-06-05 12:46:36 -04:00
parent aa1baaf948
commit bdcaf5a9c1
4 changed files with 19 additions and 5 deletions

View File

@ -58,9 +58,7 @@ install:
- snakemake renv_restore - snakemake renv_restore
script: script:
- cp -r tests/data/raw/* data/raw - bash tests/scripts/run_tests.sh
- snakemake --profile tests/settings
- python -m unittest discover tests/scripts/ -v
notifications: notifications:
email: false email: false

4
tests/data/external/test01 vendored 100644
View File

@ -0,0 +1,4 @@
wYESbVwI-4GfR-G5I6-7iKL-tOmCKs02MBun
android
test01 android
2020/01/01,2020/06/01

View File

@ -0,0 +1,9 @@
#!/bin/bash
# Commmands necessary to setup and run the tests for RAPIDS
cp -r tests/data/raw/* data/raw
cp tests/data/external/* data/external
sed -e '10,20 s/^/#/' -e 's/rules.download_dataset.output/"data\/raw\/\{pid\}\/\{sensor\}_raw\.csv"/' rules/preprocessing.snakefile > tmp
cp tmp rules/preprocessing.snakefile
snakemake --profile tests/settings
python -m unittest discover tests/scripts/ -v

View File

@ -90,7 +90,10 @@ def generate_sensor_file_lists(configs):
for sensor in sensors: for sensor in sensors:
if sensor == 'messages': if sensor == 'messages':
sensor = 'sms' sensor = 'sms'
sensor_cap = 'SMS' sensor_cap = sensor.upper()
elif sensor == 'calls':
sensor_cap = sensor.upper()
sensor = 'call'
else: else:
sensor_cap = sensor.upper() sensor_cap = sensor.upper()
if 'DAY_SEGMENTS' in configs[sensor_cap]: if 'DAY_SEGMENTS' in configs[sensor_cap]: