<commit_before>#!/usr/bin/env bash
# Script that is run during Vagrant provision to set up the development environment.

# Make non-zero exit codes & other errors fatal.
set -euo pipefail

if [[ "$(lsb_release -r -s)" != "16.04" ]]; then
    echo "This machine needs to be switched to the new Ubuntu 16.04 image."
    echo "Please run 'vagrant destroy -f && vagrant up' from the host."
    exit 1
fi

SRC_DIR="$HOME/treeherder"
PYTHON_DIR="$HOME/python"

cd "$SRC_DIR"

ELASTICSEARCH_VERSION="5.5.0"
GECKODRIVER_VERSION="0.19.1"
PYTHON_VERSION="$(sed 's/python-//' runtime.txt)"
PIP_VERSION="9.0.1"
# Keep in sync with the version pre-installed on Travis.
SHELLCHECK_VERSION="0.4.6"

# Suppress prompts during apt-get invocations.
export DEBIAN_FRONTEND=noninteractive
# Speeds up pip invocations and reduces output spam.
export PIP_DISABLE_PIP_VERSION_CHECK='True'

echo '-----> Performing cleanup'
# Remove the old MySQL 5.6 PPA repository, if this is an existing Vagrant instance.
sudo rm -f /etc/apt/sources.list.d/ondrej-ubuntu-mysql-5_6-xenial.list
# Stale pyc files can cause pytest ImportMismatchError exceptions.
find . -type f -name '*.pyc' -delete
# Celery sometimes gets stuck and requires that celerybeat-schedule be deleted.<commit_msg>Vagrant: Update shellcheck from 0.4.6 to 0.4.7 (#3035)<commit_after>#!/usr/bin/env bash
# Script that is run during Vagrant provision to set up the development environment.

# Make non-zero exit codes & other errors fatal.
set -euo pipefail

if [[ "$(lsb_release -r -s)" != "16.04" ]]; then
    echo "This machine needs to be switched to the new Ubuntu 16.04 image."
    echo "Please run 'vagrant destroy -f && vagrant up' from the host."
    exit 1
fi

SRC_DIR="$HOME/treeherder"
PYTHON_DIR="$HOME/python"

cd "$SRC_DIR"

ELASTICSEARCH_VERSION="5.5.0"
GECKODRIVER_VERSION="0.19.1"
PYTHON_VERSION="$(sed 's/python-//' runtime.txt)"
PIP_VERSION="9.0.1"
# Keep in sync with the version pre-installed on Travis.
SHELLCHECK_VERSION="0.4.7"

# Suppress prompts during apt-get invocations.
export DEBIAN_FRONTEND=noninteractive
# Speeds up pip invocations and reduces output spam.
export PIP_DISABLE_PIP_VERSION_CHECK='True'

echo '-----> Performing cleanup'
# Remove the old MySQL 5.6 PPA repository, if this is an existing Vagrant instance.
sudo rm -f /etc/apt/sources.list.d/ondrej-ubuntu-mysql-5_6-xenial.list
# Stale pyc files can cause pytest ImportMismatchError exceptions.
find . -type f -name '*.pyc' -delete
# Celery sometimes gets stuck and requires that celerybeat-schedule be deleted.
{'fraction_non_alphanumeric': 0.11255411255411256, 'fraction_numerical': 0.024399842581660763, 'mean_word_length': 4.295833333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7011086', 'n_tokens_mistral': 913, 'n_tokens_neox': 858, 'n_words': 286}