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

readonly ROOT_DIR="$( cd "$( dirname "${0}" )" && pwd )"
readonly SH_DIR="${ROOT_DIR}/sh"

docker run --rm cyberdojo/versioner:latest sh -c 'ruby /app/src/echo_env_vars.rb' > /tmp/versioner.web.env
set -a
. /tmp/versioner.web.env
set +a
export CYBER_DOJO_LANGUAGES=cyberdojo/languages-all:d996783
export CYBER_DOJO_VERSIONER_TAG=${CYBER_DOJO_VERSIONER_TAG:-latest}

"${SH_DIR}/docker_containers_down.sh"
"${SH_DIR}/build_docker_images.sh"
"${SH_DIR}/docker_containers_up.sh"
"${SH_DIR}/copy_in_saver_test_data.sh" 2> /dev/null
if "${SH_DIR}/run_tests_in_container.sh" "$@"; then
  "${SH_DIR}/docker_containers_down.sh"
else
  exit 3
fi
<commit_msg>use VERSIONER_TAG in helper script when using cyberdojo/versioner image<commit_after>#!/bin/bash
set -e

readonly ROOT_DIR="$( cd "$( dirname "${0}" )" && pwd )"
readonly SH_DIR="${ROOT_DIR}/sh"

export CYBER_DOJO_VERSIONER_TAG=${CYBER_DOJO_VERSIONER_TAG:-latest}
docker run --rm cyberdojo/versioner:${CYBER_DOJO_VERSIONER_TAG} \
  sh -c 'ruby /app/src/echo_env_vars.rb' > /tmp/versioner.web.env

set -a
. /tmp/versioner.web.env
set +a
# tests currently rely on LTFs outside languages-common
export CYBER_DOJO_LANGUAGES=cyberdojo/languages-all:d996783

"${SH_DIR}/docker_containers_down.sh"
"${SH_DIR}/build_docker_images.sh"
"${SH_DIR}/docker_containers_up.sh"
"${SH_DIR}/copy_in_saver_test_data.sh" 2> /dev/null
if "${SH_DIR}/run_tests_in_container.sh" "$@"; then
  "${SH_DIR}/docker_containers_down.sh"
else
  exit 3
fi

{'fraction_non_alphanumeric': 0.15869853917662682, 'fraction_numerical': 0.01195219123505976, 'mean_word_length': 5.976851851851852, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '771855', 'n_tokens_mistral': 654, 'n_tokens_neox': 611, 'n_words': 101}