<commit_before>language: python

python:
    - "2.7"

cache:
    directories:
        - $HOME/.cache

sudo: false

dist: trusty

compiler:
    - gcc

addons:
    apt:
        packages:
            # Pillow dependencies (see
            # https://pillow.readthedocs.org/en/latest/installation.html)
            - libtiff4-dev
            - libjpeg8-dev
            - zlib1g-dev
            - libfreetype6-dev
            - liblcms2-dev
            - libwebp-dev
            - tcl8.5-dev
            - tk8.5-dev
            - python-tk
            # isic_archive dependencies
            - p7zip-full

before_install:
    - GIRDER_VERSION=v1.7.0
    - WORKER_VERSION=2cfb739c096c2373f8bbe00853e3709f433192a6
    - LARGE_IMAGE_VERSION=60c32b11abb4d5f0d1696221a7e81ab21c611980
    - export MONGO_VERSION=3.4.2
    - export PY_COVG="ON"

    - main_path=$PWD
    - build_path=$PWD/build
    - mkdir -p $build_path

    - girder_path=$build_path/girder
    - rm -fr $girder_path
    - git clone https://github.com/girder/girder.git $girder_path && git -C $girder_path checkout $GIRDER_VERSION
    - ln -s $main_path $girder_path/plugins/isic_archive
    # Backport a fix from https://github.com/girder/girder/pull/1596
    - sed -i 's/"grunt-shell":\ ">=0.2.1"/"grunt-shell":\ "1.3.1"/' $girder_path/package.json

    - git clone https://github.com/girder/large_image.git $girder_path/plugins/large_image && git -C $girder_path/plugins/large_image checkout $LARGE_IMAGE_VERSION

    - CACHE=$HOME/.cache CMAKE_VERSION=3.1.0 CMAKE_SHORT_VERSION=3.1 source $girder_path/scripts/install_cmake.sh
    - cmake --version

    - CACHE=$HOME/.cache source $girder_path/scripts/install_mongo.sh
    - mkdir /tmp/db
    - mongod --dbpath=/tmp/db >/dev/null 2>/dev/null &
    - mongod --version

    - wget -O $build_path/install_miniconda.sh https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
    - bash $build_path/install_miniconda.sh -b -p $build_path/miniconda
    - source $build_path/miniconda/bin/activate $build_path/miniconda
    - conda update --yes --all
    # Work around a change in 2.7.13 that we don't yet have in Girder upstream: https://github.com/girder/girder/pull/1733
    - conda install --yes python==2.7.12
    - pip install --no-cache-dir -U pip virtualenv

    - unset PREFIX
    - nvm install v2.3.3
    - npm install -g npm
    - node --version
    - npm --version

    - worker_path=$girder_path/plugins/girder_worker
    - git clone https://github.com/girder/girder_worker.git $worker_path && git -C $worker_path checkout $WORKER_VERSION
    # TODO: set up worker.local.cfg
#    - cp $PWD/plugin_tests/test_files/girder_worker.cfg $girder_worker_path/girder_worker/worker.local.cfg
    - pip install --no-cache-dir -r $worker_path/requirements.txt -r $worker_path/girder_worker/plugins/girder_io/requirements.txt

install:
    - cd $girder_path
    - conda install --yes pillow==3.2.0
    # https://github.com/pypa/pip/issues/2751
    - conda install --yes setuptools==19.4
    - pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt setuptools==19.4

    - conda install --yes libgfortran==1.0
    - conda install --yes numpy==1.10.2 # needed because libtiff doesn't install correctly without it.  This ensures we have the same version for libtiff as for the project.
    - conda install --yes scipy==0.16.0
    - conda install --yes scikit-image==0.12.3
    - conda install --yes opencv==2.4.10

    - pip install --no-cache-dir -r $girder_path/plugins/large_image/requirements.txt
    # We won't have all the system requirements for openslide
    - pip uninstall --yes openslide-python

    - npm install

script:
#    - cd $girder_worker_path
#    - python -m girder_worker &
    - mkdir -p $build_path/girder_testing_build
    - cd $build_path/girder_testing_build
    - cmake -DPYTHON_COVERAGE:BOOL=${PY_COVG} -DPYTHON_VERSION:STRING=${TRAVIS_PYTHON_VERSION} -DRUN_CORE_TESTS:BOOL=OFF -DTEST_PLUGINS:STRING="isic_archive" $girder_path
    - make
    # js_coverage_combine_report and py_coverage* fail due to an upstream bug
    - JASMINE_TIMEOUT=15000 ctest -VV -E '(py|js)_coverage'
<commit_msg>Remove workaround for a now-upgraded npm package<commit_after>language: python

python:
    - "2.7"

cache:
    directories:
        - $HOME/.cache

sudo: false

dist: trusty

compiler:
    - gcc

addons:
    apt:
        packages:
            # Pillow dependencies (see
            # https://pillow.readthedocs.org/en/latest/installation.html)
            - libtiff4-dev
            - libjpeg8-dev
            - zlib1g-dev
            - libfreetype6-dev
            - liblcms2-dev
            - libwebp-dev
            - tcl8.5-dev
            - tk8.5-dev
            - python-tk
            # isic_archive dependencies
            - p7zip-full

before_install:
    - GIRDER_VERSION=v1.7.0
    - WORKER_VERSION=2cfb739c096c2373f8bbe00853e3709f433192a6
    - LARGE_IMAGE_VERSION=60c32b11abb4d5f0d1696221a7e81ab21c611980
    - export MONGO_VERSION=3.4.2
    - export PY_COVG="ON"

    - main_path=$PWD
    - build_path=$PWD/build
    - mkdir -p $build_path

    - girder_path=$build_path/girder
    - rm -fr $girder_path
    - git clone https://github.com/girder/girder.git $girder_path && git -C $girder_path checkout $GIRDER_VERSION
    - ln -s $main_path $girder_path/plugins/isic_archive

    - git clone https://github.com/girder/large_image.git $girder_path/plugins/large_image && git -C $girder_path/plugins/large_image checkout $LARGE_IMAGE_VERSION

    - CACHE=$HOME/.cache CMAKE_VERSION=3.1.0 CMAKE_SHORT_VERSION=3.1 source $girder_path/scripts/install_cmake.sh
    - cmake --version

    - CACHE=$HOME/.cache source $girder_path/scripts/install_mongo.sh
    - mkdir /tmp/db
    - mongod --dbpath=/tmp/db >/dev/null 2>/dev/null &
    - mongod --version

    - wget -O $build_path/install_miniconda.sh https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
    - bash $build_path/install_miniconda.sh -b -p $build_path/miniconda
    - source $build_path/miniconda/bin/activate $build_path/miniconda
    - conda update --yes --all
    # Work around a change in 2.7.13 that we don't yet have in Girder upstream: https://github.com/girder/girder/pull/1733
    - conda install --yes python==2.7.12
    - pip install --no-cache-dir -U pip virtualenv

    - unset PREFIX
    - nvm install v2.3.3
    - npm install -g npm
    - node --version
    - npm --version

    - worker_path=$girder_path/plugins/girder_worker
    - git clone https://github.com/girder/girder_worker.git $worker_path && git -C $worker_path checkout $WORKER_VERSION
    # TODO: set up worker.local.cfg
#    - cp $PWD/plugin_tests/test_files/girder_worker.cfg $girder_worker_path/girder_worker/worker.local.cfg
    - pip install --no-cache-dir -r $worker_path/requirements.txt -r $worker_path/girder_worker/plugins/girder_io/requirements.txt

install:
    - cd $girder_path
    - conda install --yes pillow==3.2.0
    # https://github.com/pypa/pip/issues/2751
    - conda install --yes setuptools==19.4
    - pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt setuptools==19.4

    - conda install --yes libgfortran==1.0
    - conda install --yes numpy==1.10.2 # needed because libtiff doesn't install correctly without it.  This ensures we have the same version for libtiff as for the project.
    - conda install --yes scipy==0.16.0
    - conda install --yes scikit-image==0.12.3
    - conda install --yes opencv==2.4.10

    - pip install --no-cache-dir -r $girder_path/plugins/large_image/requirements.txt
    # We won't have all the system requirements for openslide
    - pip uninstall --yes openslide-python

    - npm install

script:
#    - cd $girder_worker_path
#    - python -m girder_worker &
    - mkdir -p $build_path/girder_testing_build
    - cd $build_path/girder_testing_build
    - cmake -DPYTHON_COVERAGE:BOOL=${PY_COVG} -DPYTHON_VERSION:STRING=${TRAVIS_PYTHON_VERSION} -DRUN_CORE_TESTS:BOOL=OFF -DTEST_PLUGINS:STRING="isic_archive" $girder_path
    - make
    # js_coverage_combine_report and py_coverage* fail due to an upstream bug
    - JASMINE_TIMEOUT=15000 ctest -VV -E '(py|js)_coverage'

{'fraction_non_alphanumeric': 0.11355849241311797, 'fraction_numerical': 0.03401860009789525, 'mean_word_length': 2.6405345211581293, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 15, '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': '5466715', 'n_tokens_mistral': 3178, 'n_tokens_neox': 2999, 'n_words': 577}