<commit_before>#!/bin/sh
# Run ipython notebook tests

testfail=0
curl -OLk http://www.dropbox.com/s/1x4ny0c93gvu54n/toy_mstis_1k_OPS1.nc
curl -OLk http://www.dropbox.com/s/qaeczkugwxkrdfy/toy_mistis_1k_OPS1.nc
ls *nc
#python ipynbtest.py "sliced_sequential_ensembles.ipynb" || testfail=1
cd toy_model_mstis/
date
ipynbtest.py "toy_mstis_1_setup.ipynb" || testfail=1<commit_msg>Start cleaning up ipynbtests.sh for all versions<commit_after>#!/bin/sh
# Run ipython notebook tests

testfail=0

PYTHON_VERSION=`python -V 2>&1 | awk '{print $2}' | awk 'BEGIN { FS="." } { print $1 "." $2}'`
echo "Running tests for Python version: $PYTHON_VERSION"

dropbox_base_url="http://www.dropbox.com/s"

# TODO: slowly build this up as I get tests working for various test
# notebooks. Eventually, we get rid of the ipynbtests3 script and the
# version checking in devtools/ci/ipythontests.sh
case $PYTHON_VERSION in
    "2.7")
        mstis=$dropbox_base_url/1x4ny0c93gvu54n/toy_mstis_1k_OPS1.nc
        mistis=$dropbox_base_url/qaeczkugwxkrdfy/toy_mistis_1k_OPS1.nc
        ;;
    "3.5")
        echo "No tests for Python 3.5 yet"
        ;;
    "3.6")
        mstis=$dropbox_base_url/1ulzssv5p4lr61f/toy_mstis_1k_OPS1_py36.nc
        ;;

curl -OLk $mstis
curl -OLk $mistis
cp `basename $mstis` toy_mstis_1k_OPS1.nc
cp `basename $mistis` toy_mistis_1k_OPS1.nc

# from here should be the same for all versions
ls *nc
cd toy_model_mstis/
date
ipynbtest.py "toy_mstis_1_setup.ipynb" || testfail=1
{'fraction_non_alphanumeric': 0.11141120864280891, 'fraction_numerical': 0.03781228899392303, 'mean_word_length': 4.236749116607774, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 3, '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': '2721251', 'n_tokens_mistral': 669, 'n_tokens_neox': 633, 'n_words': 130}