<commit_before>#!/bin/bash
set -e
set -x

HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

src=$(mktemp -d --tmpdir trackhub-XXXX)
rm -f $HERE/../.git/shallow
cp -r $HERE/.. $src
cd $src

# extract version
VERSION=$(python -c 'exec(open("trackhub/version.py").read());print(version)')
conda create -y -n trackhub-env python=2 --file requirements.txt
set +x; source activate trackhub-env; set -x
python setup.py clean sdist
pip install dist/trackhub-${VERSION}.tar.gz
conda install -y nose
nosetests trackhub/test/test.py
<commit_msg>proper conda env creation<commit_after>#!/bin/bash
set -e
set -x

HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

src=$(mktemp -d --tmpdir trackhub-XXXX)
rm -f $HERE/../.git/shallow
cp -r $HERE/.. $src
cd $src

CONDA_ENV=trackhub-test-env

conda config --add channels conda-forge
conda config --add channels defaults
conda config --add channels r
conda config --add channels bioconda

conda env list | grep -q $CONDA_ENV && conda env remove -y -n $CONDA_ENV

# extract version
VERSION=$(python -c 'exec(open("trackhub/version.py").read());print(version)')
conda create -y -n $CONDA_ENV python=3 --file requirements.txt --file test-requirements.txt
set +x; source activate $CONDA_ENV; set -x
python setup.py clean sdist
pip install dist/trackhub-${VERSION}.tar.gz
conda install -y nose
nosetests trackhub/test/test.py

{'fraction_non_alphanumeric': 0.16070124178232287, 'fraction_numerical': 0.0029218407596785976, 'mean_word_length': 4.111940298507463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '5482986', 'n_tokens_mistral': 500, 'n_tokens_neox': 486, 'n_words': 150}