Initial Travis test

pull/95/head
kaguillera 2020-04-29 18:27:39 -04:00
parent f292ba3bff
commit 88a404d2ab
2 changed files with 36 additions and 3 deletions

34
.travis.yml 100644
View File

@ -0,0 +1,34 @@
language: python
python:
- "3.7"
before_install:
- R -e 'install.packages(c( "rmarkdown"), repos = "http://cran.us.r-project.org")'
before_script:
# Install Packrat
- snakemake packrat_install
- snakemake packrat_init
- snakemake packrat_restore
install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- source "$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
# Replace dep1 dep2 ... with your dependencies
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION --file environment.yml
- conda activate test-environment
services:
- mysql
script:
- cp -r tests/data/raw/* data/raw
- snakemake --profile tests/settings -R sensor_features
- ./env/bin/python -m unittest discover tests/scripts/ -v

View File

@ -59,7 +59,6 @@ def generate_file_list(configs, sensor):
for each in configs[sensor_cap]['TYPES']:
sensor_type.append(each+'_')
act_file_list = expand(act_str,pid=configs["PIDS"],
sensor = sensor,
sensor_type = sensor_type,
@ -77,7 +76,7 @@ def generate_sensor_file_lists(configs):
# Go through the configs and select those sensors with DAY_SEGMENTS,
# optionally TYPES then create expected files Return dictionary with
# list of file paths of expected and actual files for each sensor
# listed in the config file.
# listed in the config file. Added for Travis.
# Initialize string of file path for both expected and actual metric values
act_str = "data/processed/{pid}/{sensor}_{sensor_type}{day_segment}.csv"