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

pip3 install --upgrade git+https://github.com/fmaussion/salem.git
pip3 install --upgrade coveralls coverage pytest-cov

[[ -n "$DO_COVERALLS" ]] && COV_OPTS="--cov-config .coveragerc --cov=oggm --cov-report term-missing --cov-append" || COV_OPTS=""

cd /root/oggm
pip3 install -e .

[[ -n "$DO_COVERALLS" ]] && coverage erase

pytest --mpl-upload $MPL $COV_OPTS --run-slow --run-test-env $OGGM_TEST_ENV oggm

if [[ -n "$DO_COVERALLS" ]]; then<commit_msg>Avoid using pytest-cov plugin to escape not measuring early imports. (#605)<commit_after>#!/bin/bash
set -x
set -e

pip3 install --upgrade git+https://github.com/fmaussion/salem.git
pip3 install --upgrade coveralls coverage

cd /root/oggm
pip3 install -e .

COV_OPTS=""
if [[ -n "$DO_COVERALLS" ]]; then
	coverage erase --rcfile=.coveragerc
	COV_OPTS="coverage run --rcfile=.coveragerc --source=./oggm --parallel-mode --module"
fi

$COV_OPTS pytest --mpl-upload $MPL --run-slow --run-test-env $OGGM_TEST_ENV oggm

if [[ -n "$DO_COVERALLS" ]]; then
	coverage combine --rcfile=.coveragerc
	coverage report --skip-covered --rcfile=.coveragerc
{'fraction_non_alphanumeric': 0.16387665198237886, 'fraction_numerical': 0.007929515418502203, 'mean_word_length': 3.773109243697479, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '7015038', 'n_tokens_mistral': 464, 'n_tokens_neox': 437, 'n_words': 107}