<commit_before>#!/bin/sh
# adapted from pydanny/cookiecutter-django
#
# this is a very simple script that tests the docker configuration
# it is meant to be run from the root directory of the repository, eg:
# sh tests/test_docker.sh

# run the model service's tests
docker-compose -f local.yml run prediction pytest || { exit 1; }

# run the project's tests
docker-compose -f local.yml run interface python manage.py test || { exit 1; }

# return non-zero status code if there are migrations that have not been created
docker-compose -f local.yml run interface python manage.py makemigrations --dry-run --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; }
<commit_msg>Use set -e to fail build on any line failing<commit_after>#!/bin/sh
# adapted from pydanny/cookiecutter-django
#
# this is a very simple script that tests the docker configuration
# it is meant to be run from the root directory of the repository, eg:
# sh tests/test_docker.sh
set -ex

# run the model service's tests
docker-compose -f local.yml run prediction pytest

# run the project's tests
docker-compose -f local.yml run interface python manage.py test

# return non-zero status code if there are migrations that have not been created
docker-compose -f local.yml run interface python manage.py makemigrations --dry-run --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; }

{'fraction_non_alphanumeric': 0.07193320488118175, 'fraction_numerical': 0.002569043031470777, 'mean_word_length': 4.158940397350993, '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': '2185172', 'n_tokens_mistral': 447, 'n_tokens_neox': 420, 'n_words': 219}