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

set -o errexit
set -o pipefail
set -o nounset

readonly DEFAULT_STON_CONFIG="smalltalk.ston"
readonly INSTALL_TARGET_OSX="/usr/local/bin"

################################################################################
# Determine $SCRIPT_PATH and load helpers.
################################################################################
initialize() {
  local base_path="${BASH_SOURCE[0]}"

  trap interrupted INT

  if [[ -z "${SMALLTALK_CI_HOME:-}" ]]; then
    # Resolve symlink if necessary and fail if OS is not supported
      case "$(uname -s)" in
        "Linux")
          base_path="$(readlink -f "${base_path}")" || true
          ;;
        "Darwin")
          base_path="$(readlink "${base_path}")" || true
          ;;
        *)
          echo "Unsupported platform '$(uname -s)'." 1>&2
          exit 1
          ;;
      esac

      readonly SMALLTALK_CI_HOME="$(cd "$(dirname "${base_path}")" && pwd)"
      source "${SMALLTALK_CI_HOME}/env_vars"
  fi

  if [[ ! -f "${SMALLTALK_CI_HOME}/run.sh" ]]; then
    echo "smalltalkCI could not be initialized." 1>&2
    exit 1
  fi

  # Load helpers
  source "${SMALLTALK_CI_HOME}/helpers.sh"<commit_msg>Don't mark $SMALLTALK_CI_HOME as readonly for testing purposes<commit_after>#!/usr/bin/env bash

set -o errexit
set -o pipefail
set -o nounset

readonly DEFAULT_STON_CONFIG="smalltalk.ston"
readonly INSTALL_TARGET_OSX="/usr/local/bin"

################################################################################
# Determine $SCRIPT_PATH and load helpers.
################################################################################
initialize() {
  local base_path="${BASH_SOURCE[0]}"

  trap interrupted INT

  if [[ -z "${SMALLTALK_CI_HOME:-}" ]]; then
    # Resolve symlink if necessary and fail if OS is not supported
      case "$(uname -s)" in
        "Linux")
          base_path="$(readlink -f "${base_path}")" || true
          ;;
        "Darwin")
          base_path="$(readlink "${base_path}")" || true
          ;;
        *)
          echo "Unsupported platform '$(uname -s)'." 1>&2
          exit 1
          ;;
      esac

      SMALLTALK_CI_HOME="$(cd "$(dirname "${base_path}")" && pwd)"
      source "${SMALLTALK_CI_HOME}/env_vars"
  fi

  if [[ ! -f "${SMALLTALK_CI_HOME}/run.sh" ]]; then
    echo "smalltalkCI could not be initialized." 1>&2
    exit 1
  fi

  # Load helpers
  source "${SMALLTALK_CI_HOME}/helpers.sh"
{'fraction_non_alphanumeric': 0.25977198697068404, 'fraction_numerical': 0.005700325732899023, 'mean_word_length': 3.2730434782608695, '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': '3323356', 'n_tokens_mistral': 800, 'n_tokens_neox': 742, 'n_words': 183}