<commit_before>#!/usr/bin/env bash

export SETTINGS="config.DevelopmentConfig"
py.test --cov application tests/ --cov-report=term --cov-report=html --junit-xml=junit.xml<commit_msg>Report unit test coverage for Jenkins to pick up.<commit_after>#!/usr/bin/env bash

export SETTINGS="config.DevelopmentConfig"
if [ "$1" != "CI" ]; then
    py.test --cov application tests/ --cov-report=term --cov-report=html --junit-xml=junit.xml
else
    test="$(py.test --cov application tests/ --cov-report=term --cov-report=html --junit-xml=junit.xml)"
    echo "${test}"
    cov=`echo ${test} | perl -nle 'm/TOTAL\s+\d+\s+\d+\s+(\d+)%/; print $1'`

    if [[ $cov -lt 80 ]]; then
        echo "Coverage < 80%"
    else
        echo "Coverage OK!"
    fi
fi
{'fraction_non_alphanumeric': 0.18842530282637954, 'fraction_numerical': 0.008075370121130552, 'mean_word_length': 3.1564245810055866, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6102910', 'n_tokens_mistral': 278, 'n_tokens_neox': 254, 'n_words': 64}