Skip to content
Snippets Groups Projects
.travis.yml 1.90 KiB
sudo: false  # Use container-based infrastructure
language: python
python:
  - "2.7"
  - "3.4"
before_install:
  # Commands below copied from: http://conda.pydata.org/docs/travis.html
  # We do this conditionally because it saves us some downloading if the
  # version is the same.
  - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
      wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
    else
      wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
    fi
  - bash miniconda.sh -b -p $HOME/miniconda
  - export PATH="$HOME/miniconda/bin:$PATH"
  # reset the shell's lookup table for program name to path mappings
  - 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
addons:
  apt:
    packages:
    # install pandoc for use with pypandoc for converting the README
    # from markdown to RST
    - pandoc
install:
  - >
      conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
      numpy scipy nose pandas matplotlib h5py
  - source activate test-environment
  - pip install pypandoc
  - pip install -r requirements.txt
  - pip install .
  - pip install coveralls
script:
  # download training data
  - script/download-kim-2013-dataset.sh
  - script/download-iedb.sh
  # only install data for A*01:01 and A*02:01 for testing
  - script/create-iedb-class1-dataset.py --alleles HLA-A*01:01 HLA-A*02:01
  - script/create-combined-class1-dataset.py
  # only installing A0101 and A0201 for testing purposes and with very limited
  # training
  - >
      mhcflurry-train-class1-allele-specific-models.py
      --alleles HLA-A0101 HLA-A0201
      --embedding-size 10
      --hidden-layer-size 10
      --training-epochs 20
  # run tests
  - nosetests test --with-coverage --cover-package=mhcflurry  && ./lint.sh
after_success:
  coveralls