<commit_before>language: python
cache:
  directories:
    - $HOME/.cache/pip
    - $HOME/.pybel
python:
  - "2.7"
  - "3.5"
before_install:
  - sudo add-apt-repository --yes ppa:linuxuprising/java
  - sudo apt-get update
  - echo debconf shared/accepted-oracle-license-v1-2 select true | sudo debconf-set-selections
  - echo debconf shared/accepted-oracle-license-v1-2 seen true | sudo debconf-set-selections
  - pip install numpy scipy sympy cython nose lxml matplotlib==1.5.0 pandas
  - sudo pip2 install numpy
install:
  # INDRA dependencies
  - sudo apt-get install libstdc++6
  - sudo apt-get install graphviz
  - sudo apt-get install -y oracle-java11-installer || true
  # - cd /var/lib/dpkg/info
  # - sudo sed -i 's|JAVA_VERSION=8u171|JAVA_VERSION=XXXXX|' oracle-java11-installer.*
  # - sudo sed -i 's|JAVA_VERSION_2nd_PART=0.2|JAVA_VERSION_2nd_PART=X.X|' oracle-java11-installer.*
  # - sudo sed -i 's|JAVA_VERSION_MINOR=0.2|JAVA_VERSION_2nd_PART=X.X|' oracle-java11-installer.*
  # - sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u201-b09/e900624294a745ca9bb638528f13cb16/|' oracle-java8-installer.*
  # - sudo sed -i 's|SHA256SUM_TGZ="b6dd2837efaaec4109b36cfbb94a774db100029f98b0d78be68c27bec0275982"|SHA256SUM_TGZ="4ce13fa548631f288a232332f94db2f6f7ad155ee44236bb82ecbd59ff4836b9"|' oracle-java8-installer.*
  # - sudo sed -i 's|J_DIR=jdk1.8.0_171|J_DIR=jdk1.8.0_201|' oracle-java11-installer.*
  # - sudo apt-get update
  # - sudo apt-get install -y oracle-java11-installer
  - cd $TRAVIS_BUILD_DIR
  - readlink -f `which javac`
  - readlink -f `which java`
  - sudo apt-get install oracle-java11-set-default
  - readlink -f `which javac`
  - readlink -f `which java`
  - export JAVA_HOME="/usr/lib/jvm/java-11-oracle/"
  - sudo update-java-alternatives -s java-11-oracle
  - pip install pygraphviz pydot jsonschema coverage python-coveralls boto3 nose-timer flask nltk reportlab
  - pip install git+https://github.com/bgyori/paths_graph.git@networkx2
  - pip install doctest-ignore-unicode
  - pip install pybel
  - pip install awscli
  - mkdir -p $HOME/.pybel/data
  - aws s3 cp s3://bigmech/travis/pybel_cache.db $HOME/.pybel/data/ --no-sign-request  --source-region us-east-1
  - aws s3 cp s3://bigmech/travis/Phosphorylation_site_dataset.tsv indra/resources/ --no-sign-request  --source-region us-east-1
  # PySB and dependencies
  - wget "http://www.csb.pitt.edu/Faculty/Faeder/wp-content/uploads/2017/04/BioNetGen-2.2.6-stable_Linux.tar.gz" -O bionetgen.tar.gz -nv
  - tar xzf bionetgen.tar.gz
  - export BNGPATH=`pwd`/BioNetGen-2.2.6-stable
  - pip install git+https://github.com/pysb/pysb.git
  - pip install .[all]
  - cd indra/benchmarks/assembly_eval/batch4
  # Download a number of useful resource files for testing purposes
  - aws s3 cp s3://bigmech/travis/trips_reach_batch4.gz .  --no-sign-request  --source-region us-east-1
  - tar -xf trips_reach_batch4.gz
  - cd $TRAVIS_BUILD_DIR
  - aws s3 cp s3://bigmech/travis/reach-82631d-biores-e9ee36.jar . --no-sign-request  --source-region us-east-1
  - export REACHPATH=$TRAVIS_BUILD_DIR/reach-82631d-biores-e9ee36.jar
  # Get nose notify.
  - mkdir $HOME/.nose_notify;
  - git clone https://github.com/pagreene/nose-notify.git $HOME/.nose_notify;
  - export PYTHONPATH=$PYTHONPATH:$HOME/.nose_notify;
  # Get a daily updated Eidos jar for testing
  - aws s3 cp s3://bigmech/travis/eidos.jar . --no-sign-request --source-region us-east-1
  - export EIDOSPATH=$TRAVIS_BUILD_DIR/eidos.jar
  - pip install pycodestyle
  # TEES
  - |
    if [[ $TRAVIS_EVENT_TYPE == "cron" ]]; then
        export RUN_SLOW=true;
    fi
  - |
    if [[ $RUN_SLOW == "true" ]]; then
        sudo apt-get --yes install ruby;
        aws s3 cp s3://bigmech/travis/TEES.tar.bz2 . --no-sign-request --no-sign-request;
        tar xjf TEES.tar.bz2;
        mv TEES ~/TEES;
    fi
  - pip install -U networkx>=2
  - pip list
before_script:
  # Enable plotting on fake display
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - sleep 3
script:
  # Credit: https://graysonkoonce.com/getting-the-current-branch-name-during-a-pull-request-in-travis-ci/
  - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
  - echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
  - echo "$TRAVIS_EVENT_TYPE"
  - export TEES_SETTINGS=~/TEES/tees_local_settings.py
  - export PYTHONPATH=$PYTHONPATH:$TRAVIS_BUILD_DIR
  - export _JAVA_OPTIONS="-Xmx4g -Xms1g"
  # Run standard unit tests
  - cd $TRAVIS_BUILD_DIR
  # These are files that are ignored so that doctests don't fail
  - export NOSE_IGNORE_FILES="find_full_text_sentence.py";
  # These files are ignored in Python 2 because they only work in Python 3 and
  # doctests on Travis would otherwise fail
  - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
        export NOSE_IGNORE_FILES=$NOSE_IGNORE_FILES,"_require_python3.py";
    fi
  - export NOSEATTR="";
  - if [[ $TRAVIS_PULL_REQUEST ]]; then
      export NOSEATTR="!nonpublic";
    fi
  - if [[ $RUN_SLOW != "true" ]]; then
      export NOSEATTR="!slow,$NOSEATTR";
    fi
  # First run TEES and Eidos tests separately for technical reasons
  - python -m nose_notify indra/tests/test_tees.py --slack_hook $SLACK_NOTIFY_HOOK
    --label "$TRAVIS_REPO_SLUG - $TRAVIS_BRANCH" -v -a $NOSEATTR --process-restartworker;
  - python -m nose_notify indra/tests/test_eidos.py --slack_hook $SLACK_NOTIFY_HOOK
    --label "$TRAVIS_REPO_SLUG - $TRAVIS_BRANCH" -v -a $NOSEATTR;
  # Now run all INDRA tests
  - python -m nose_notify --slack_hook $SLACK_NOTIFY_HOOK --label "$TRAVIS_REPO_SLUG - $TRAVIS_BRANCH"
    indra -v -a $NOSEATTR --exclude='.*tees.*' --exclude='.*eidos.*' --exclude='.*isi.*'
        --with-coverage --cover-inclusive --cover-package=indra
        --with-doctest --with-doctest-ignore-unicode --with-timer --timer-top-n 10
  # Run NL model examples only when the environmental variable
  # RUN_NL_MODELS is set to true in the Travis build
  # NOTE: if blocks in Travis DO NOT FAIL even if there is
  # and error in one of the commands inside. Therefore passing
  # alone does not mean that all the operations inside were
  # successful. Rather, the log needs to be inspected and compared
  # to desired behavior.
  - |
    if [[ $RUN_NL_MODELS == "true" ]]; then
        cd $TRAVIS_BUILD_DIR/models
        python hello_indra.py
        cd $TRAVIS_BUILD_DIR/models/p53_model
        python run_p53_model.py noplot
        cd $TRAVIS_BUILD_DIR/models/braf_model
        python assemble_model.py
        cd $TRAVIS_BUILD_DIR/models/ras_pathway
        python run_ras_pathway.py trips
     fi
  # Run assembly benchmarks
  - cd $TRAVIS_BUILD_DIR/indra/benchmarks/assembly_eval/batch4
  - |
    if [[ $TRAVIS_EVENT_TYPE == "cron" ]]; then
        python run_combined.py
    fi
  - cd $TRAVIS_BUILD_DIR
  # Run code style report on diff
  - git remote set-branches --add origin master
  - git fetch
  - git diff origin/master | pycodestyle --diff > pep8.txt; cat pep8.txt;
after_success:
  - coveralls
<commit_msg>Set LD_LIBRARY_PATH explicitly. Comment outputs<commit_after>language: python
cache:
  directories:
    - $HOME/.cache/pip
    - $HOME/.pybel
python:
  - "2.7"
  - "3.5"
before_install:
  - sudo add-apt-repository --yes ppa:linuxuprising/java
  - sudo apt-get update
  - echo debconf shared/accepted-oracle-license-v1-2 select true | sudo debconf-set-selections
  - echo debconf shared/accepted-oracle-license-v1-2 seen true | sudo debconf-set-selections
  - pip install numpy scipy sympy cython nose lxml matplotlib==1.5.0 pandas
  - sudo pip2 install numpy
install:
  # INDRA dependencies
  - sudo apt-get install libstdc++6
  - sudo apt-get install graphviz
  - sudo apt-get install -y oracle-java11-installer || true
  # - cd /var/lib/dpkg/info
  # - sudo sed -i 's|JAVA_VERSION=8u171|JAVA_VERSION=XXXXX|' oracle-java11-installer.*
  # - sudo sed -i 's|JAVA_VERSION_2nd_PART=0.2|JAVA_VERSION_2nd_PART=X.X|' oracle-java11-installer.*
  # - sudo sed -i 's|JAVA_VERSION_MINOR=0.2|JAVA_VERSION_2nd_PART=X.X|' oracle-java11-installer.*
  # - sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u201-b09/e900624294a745ca9bb638528f13cb16/|' oracle-java8-installer.*
  # - sudo sed -i 's|SHA256SUM_TGZ="b6dd2837efaaec4109b36cfbb94a774db100029f98b0d78be68c27bec0275982"|SHA256SUM_TGZ="4ce13fa548631f288a232332f94db2f6f7ad155ee44236bb82ecbd59ff4836b9"|' oracle-java8-installer.*
  # - sudo sed -i 's|J_DIR=jdk1.8.0_171|J_DIR=jdk1.8.0_201|' oracle-java11-installer.*
  # - sudo apt-get update
  # - sudo apt-get install -y oracle-java11-installer
  # - readlink -f `which javac`
  # - readlink -f `which java`
  - cd $TRAVIS_BUILD_DIR
  - export JAVA_HOME="/usr/lib/jvm/java-11-oracle/"
  - export LD_LIBRARY_PATH="`dirname $(locate '*java-11*libjvm.so')`:$LD_LIBRARY_PATH"
  - sudo update-java-alternatives -s java-11-oracle
  - pip install pygraphviz pydot jsonschema coverage python-coveralls boto3 nose-timer flask nltk reportlab
  - pip install git+https://github.com/bgyori/paths_graph.git@networkx2
  - pip install doctest-ignore-unicode
  - pip install pybel
  - pip install awscli
  - mkdir -p $HOME/.pybel/data
  - aws s3 cp s3://bigmech/travis/pybel_cache.db $HOME/.pybel/data/ --no-sign-request  --source-region us-east-1
  - aws s3 cp s3://bigmech/travis/Phosphorylation_site_dataset.tsv indra/resources/ --no-sign-request  --source-region us-east-1
  # PySB and dependencies
  - wget "http://www.csb.pitt.edu/Faculty/Faeder/wp-content/uploads/2017/04/BioNetGen-2.2.6-stable_Linux.tar.gz" -O bionetgen.tar.gz -nv
  - tar xzf bionetgen.tar.gz
  - export BNGPATH=`pwd`/BioNetGen-2.2.6-stable
  - pip install git+https://github.com/pysb/pysb.git
  - pip install .[all]
  - cd indra/benchmarks/assembly_eval/batch4
  # Download a number of useful resource files for testing purposes
  - aws s3 cp s3://bigmech/travis/trips_reach_batch4.gz .  --no-sign-request  --source-region us-east-1
  - tar -xf trips_reach_batch4.gz
  - cd $TRAVIS_BUILD_DIR
  - aws s3 cp s3://bigmech/travis/reach-82631d-biores-e9ee36.jar . --no-sign-request  --source-region us-east-1
  - export REACHPATH=$TRAVIS_BUILD_DIR/reach-82631d-biores-e9ee36.jar
  # Get nose notify.
  - mkdir $HOME/.nose_notify;
  - git clone https://github.com/pagreene/nose-notify.git $HOME/.nose_notify;
  - export PYTHONPATH=$PYTHONPATH:$HOME/.nose_notify;
  # Get a daily updated Eidos jar for testing
  - aws s3 cp s3://bigmech/travis/eidos.jar . --no-sign-request --source-region us-east-1
  - export EIDOSPATH=$TRAVIS_BUILD_DIR/eidos.jar
  - pip install pycodestyle
  # TEES
  - |
    if [[ $TRAVIS_EVENT_TYPE == "cron" ]]; then
        export RUN_SLOW=true;
    fi
  - |
    if [[ $RUN_SLOW == "true" ]]; then
        sudo apt-get --yes install ruby;
        aws s3 cp s3://bigmech/travis/TEES.tar.bz2 . --no-sign-request --no-sign-request;
        tar xjf TEES.tar.bz2;
        mv TEES ~/TEES;
    fi
  - pip install -U networkx>=2
  - pip list
before_script:
  # Enable plotting on fake display
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - sleep 3
script:
  # Credit: https://graysonkoonce.com/getting-the-current-branch-name-during-a-pull-request-in-travis-ci/
  - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
  - echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
  - echo "$TRAVIS_EVENT_TYPE"
  - export TEES_SETTINGS=~/TEES/tees_local_settings.py
  - export PYTHONPATH=$PYTHONPATH:$TRAVIS_BUILD_DIR
  - export _JAVA_OPTIONS="-Xmx4g -Xms1g"
  # Run standard unit tests
  - cd $TRAVIS_BUILD_DIR
  # These are files that are ignored so that doctests don't fail
  - export NOSE_IGNORE_FILES="find_full_text_sentence.py";
  # These files are ignored in Python 2 because they only work in Python 3 and
  # doctests on Travis would otherwise fail
  - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
        export NOSE_IGNORE_FILES=$NOSE_IGNORE_FILES,"_require_python3.py";
    fi
  - export NOSEATTR="";
  - if [[ $TRAVIS_PULL_REQUEST ]]; then
      export NOSEATTR="!nonpublic";
    fi
  - if [[ $RUN_SLOW != "true" ]]; then
      export NOSEATTR="!slow,$NOSEATTR";
    fi
  # First run TEES and Eidos tests separately for technical reasons
  - python -m nose_notify indra/tests/test_tees.py --slack_hook $SLACK_NOTIFY_HOOK
    --label "$TRAVIS_REPO_SLUG - $TRAVIS_BRANCH" -v -a $NOSEATTR --process-restartworker;
  - python -m nose_notify indra/tests/test_eidos.py --slack_hook $SLACK_NOTIFY_HOOK
    --label "$TRAVIS_REPO_SLUG - $TRAVIS_BRANCH" -v -a $NOSEATTR;
  # Now run all INDRA tests
  - python -m nose_notify --slack_hook $SLACK_NOTIFY_HOOK --label "$TRAVIS_REPO_SLUG - $TRAVIS_BRANCH"
    indra -v -a $NOSEATTR --exclude='.*tees.*' --exclude='.*eidos.*' --exclude='.*isi.*'
        --with-coverage --cover-inclusive --cover-package=indra
        --with-doctest --with-doctest-ignore-unicode --with-timer --timer-top-n 10
  # Run NL model examples only when the environmental variable
  # RUN_NL_MODELS is set to true in the Travis build
  # NOTE: if blocks in Travis DO NOT FAIL even if there is
  # and error in one of the commands inside. Therefore passing
  # alone does not mean that all the operations inside were
  # successful. Rather, the log needs to be inspected and compared
  # to desired behavior.
  - |
    if [[ $RUN_NL_MODELS == "true" ]]; then
        cd $TRAVIS_BUILD_DIR/models
        python hello_indra.py
        cd $TRAVIS_BUILD_DIR/models/p53_model
        python run_p53_model.py noplot
        cd $TRAVIS_BUILD_DIR/models/braf_model
        python assemble_model.py
        cd $TRAVIS_BUILD_DIR/models/ras_pathway
        python run_ras_pathway.py trips
     fi
  # Run assembly benchmarks
  - cd $TRAVIS_BUILD_DIR/indra/benchmarks/assembly_eval/batch4
  - |
    if [[ $TRAVIS_EVENT_TYPE == "cron" ]]; then
        python run_combined.py
    fi
  - cd $TRAVIS_BUILD_DIR
  # Run code style report on diff
  - git remote set-branches --add origin master
  - git fetch
  - git diff origin/master | pycodestyle --diff > pep8.txt; cat pep8.txt;
after_success:
  - coveralls

{'fraction_non_alphanumeric': 0.12255822036843934, 'fraction_numerical': 0.037261035801181785, 'mean_word_length': 3.2917661097852027, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2787590', 'n_tokens_mistral': 5912, 'n_tokens_neox': 5513, 'n_words': 1160}