<commit_before>sudo: false  # use new container infrastructure on Travis CI

before_install:
  # Install miniconda
  - wget http://repo.continuum.io/miniconda/Miniconda-3.7.3-Linux-x86_64.sh -O miniconda.sh;
  - bash miniconda.sh -b -p $HOME/miniconda
  - export PATH="$HOME/miniconda/bin:$PATH"
  - hash -r
  - conda config --set always_yes yes --set changeps1 no
  - conda info -a  # Useful for debugging any issues with conda
  
  # Install conda-env
  - conda install -c conda conda-env

install:
  # create and activate env using NILMTK's environment.yml
  - conda env create 
  - source activate nilmtk-env

  # Install nilm_metadata (can't yet install using pip / conda)
  - git clone https://github.com/nilmtk/nilm_metadata/
  - cd nilm_metadata; python setup.py develop; cd ..

  # Finally, install nilmtk...
  - pip install -e 'git+https://github.com/nilmtk/nilmtk.git#egg=nilmtk'

script:
  - python -c 'from nilmtk.utils import show_versions; show_versions()'
  - nosetests --with-coverage

after_success:
  - coveralls

after_script:
  - source deactivate<commit_msg>try using travis' cache for pip and miniconda<commit_after>sudo: false  # use new container infrastructure on Travis CI

language: python

python: 2.7

before_install:
  # Install miniconda.  First check if it exists in the cache
  - if [ ! -d "$HOME/miniconda" ]; then
      wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
      bash miniconda.sh -b -p $HOME/miniconda
      rm miniconda.sh
      conda install -c conda conda-env
    fi
  - export PATH="$HOME/miniconda/bin:$PATH"
  - hash -r
  - conda config --set always_yes yes --set changeps1 no
  - conda update conda
  - conda info -a  # Useful for debugging any issues with conda

install:
  # create and activate env using NILMTK's environment.yml
  - conda env create 
  - source activate nilmtk-env

  # Install nilm_metadata (can't yet install using pip / conda)
  - git clone https://github.com/nilmtk/nilm_metadata/
  - cd nilm_metadata; python setup.py develop; cd ..

  # Finally, install nilmtk...
  - pip install -e 'git+https://github.com/nilmtk/nilmtk.git#egg=nilmtk'

script:
  - python -c 'from nilmtk.utils import show_versions; show_versions()'
  - nosetests --with-coverage

after_success:
  - coveralls

after_script:
  - source deactivate

cache:
  directories:
    - $HOME/.cache/pip
    - $HOME/miniconda
{'fraction_non_alphanumeric': 0.10473815461346633, 'fraction_numerical': 0.006234413965087282, 'mean_word_length': 3.1145299145299146, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1714136', 'n_tokens_mistral': 866, 'n_tokens_neox': 829, 'n_words': 236}