Initial Travis test
parent
f292ba3bff
commit
88a404d2ab
|
@ -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
|
|
@ -58,8 +58,7 @@ def generate_file_list(configs, sensor):
|
||||||
if 'TYPES' in configs[sensor_cap]:
|
if 'TYPES' in configs[sensor_cap]:
|
||||||
for each in configs[sensor_cap]['TYPES']:
|
for each in configs[sensor_cap]['TYPES']:
|
||||||
sensor_type.append(each+'_')
|
sensor_type.append(each+'_')
|
||||||
|
|
||||||
|
|
||||||
act_file_list = expand(act_str,pid=configs["PIDS"],
|
act_file_list = expand(act_str,pid=configs["PIDS"],
|
||||||
sensor = sensor,
|
sensor = sensor,
|
||||||
sensor_type = sensor_type,
|
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,
|
# Go through the configs and select those sensors with DAY_SEGMENTS,
|
||||||
# optionally TYPES then create expected files Return dictionary with
|
# optionally TYPES then create expected files Return dictionary with
|
||||||
# list of file paths of expected and actual files for each sensor
|
# 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
|
# Initialize string of file path for both expected and actual metric values
|
||||||
act_str = "data/processed/{pid}/{sensor}_{sensor_type}{day_segment}.csv"
|
act_str = "data/processed/{pid}/{sensor}_{sensor_type}{day_segment}.csv"
|
||||||
|
|
Loading…
Reference in New Issue