<commit_before>#!/bin/bash

rm -rf venv_py3
rm -rf venv_py2

python3 -m venv venv_py3
source venv_py3/bin/activate
pip3 install -e .
python3 verification.py
ret=$?
if [ $ret -ne 0 ]; then
     echo 'Python 3 verification failed'
     return 1
fi
deactivate

virtualenv --python=/usr/bin/python2.7 venv_py2
source venv_py2/bin/activate
pip install -e .
python verification.py
ret=$?
if [ $ret -ne 0 ]; then
     echo 'Python 2.7 verification failed'
     return 1
fi
deactivate


echo '----------------------'
echo 'VERIFICATION COMPLETED'<commit_msg>Option to use package from pypi in verification<commit_after>#!/bin/bash

rm -rf venv_py3
rm -rf venv_py2

python3 -m venv venv_py3
source venv_py3/bin/activate
if [ "$1" = "pypi" ]; then
  python3 -m pip install ruuvitag_sensor
else
  python3 -m pip install -e .
fi
python3 verification.py
ret=$?
if [ $ret -ne 0 ]; then
  echo 'Python 3 verification failed'
  rm -rf venv_py3
  exit 1
fi
deactivate
rm -rf venv_py3

virtualenv --python=/usr/bin/python2.7 venv_py2
source venv_py2/bin/activate
if [ "$1" = "pypi" ]; then
  pip install ruuvitag_sensor
else
  pip install -e .
fi
python verification.py
ret=$?
if [ $ret -ne 0 ]; then
  echo 'Python 2.7 verification failed'
  rm -rf venv_py2
  exit 1
fi
deactivate
rm -rf venv_py2

echo '----------------------'
echo 'VERIFICATION COMPLETED'
{'fraction_non_alphanumeric': 0.12835820895522387, 'fraction_numerical': 0.03208955223880597, 'mean_word_length': 3.0513595166163143, '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': '6368504', 'n_tokens_mistral': 522, 'n_tokens_neox': 495, 'n_words': 164}