<commit_before>#!/bin/bash

echo "running setup routine with python versions:"
for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do
    echo "    ${version}"
done

PROGNAME=$(basename $0)
function error_exit
{
    echo -e "${PROGNAME}: ${1:-"Unknown Error"}\n" 1>&2
    exit 1
}

# for each version we want, setup a functional virtual environment
for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do
    echo Setting up Python ${version}

    # exporting this variable (in this scope) chooses the python version
    export PYENV_VERSION=${version}
    echo "Using pyenv version $(pyenv version)"

    # install core requirements all versions need
    pip install -r ${PLOTLY_CORE_REQUIREMENTS_FILE} ||
        error_exit "${LINENO}: can't install core reqs for Python ${version}"

    # handle funkiness around python 2.6
    if [ ${version:0:3} == '2.6' ]
    then
        pip install simplejson ordereddict ||
            error_exit "${LINENO}: can't install extras for Python ${version}"
#        pip install -r ${PLOTLY_OPTIONAL_REQUIREMENTS_FILE_2_6}
#    else
#        pip install -r ${PLOTLY_OPTIONAL_REQUIREMENTS_FILE}
    fi

    # install some test tools
    pip install nose coverage ||
        error_exit "${LINENO}: can't install test tools for Python ${version}"
done<commit_msg>Add in the optional requirements again.<commit_after>#!/bin/bash

echo "running setup routine with python versions:"
for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do
    echo "    ${version}"
done

PROGNAME=$(basename $0)
function error_exit
{
    echo -e "${PROGNAME}: ${1:-"Unknown Error"}\n" 1>&2
    exit 1
}

# for each version we want, setup a functional virtual environment
for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do
    echo Setting up Python ${version}

    # exporting this variable (in this scope) chooses the python version
    export PYENV_VERSION=${version}
    echo "Using pyenv version $(pyenv version)"

    # install core requirements all versions need
    pip install -r ${PLOTLY_CORE_REQUIREMENTS_FILE} ||
        error_exit "${LINENO}: can't install core reqs for Python ${version}"

    # handle funkiness around python 2.6
    if [ ${version:0:3} == '2.6' ]
    then
        pip install simplejson ordereddict ||
            error_exit "${LINENO}: can't install extras for Python ${version}"
        pip install -r ${PLOTLY_OPTIONAL_REQUIREMENTS_FILE_2_6}
    else
        pip install -r ${PLOTLY_OPTIONAL_REQUIREMENTS_FILE}
    fi

    # install some test tools
    pip install nose coverage ||
        error_exit "${LINENO}: can't install test tools for Python ${version}"
done
{'fraction_non_alphanumeric': 0.10505986867516416, 'fraction_numerical': 0.010042487446890692, 'mean_word_length': 3.520069808027923, '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': '2829594', 'n_tokens_mistral': 795, 'n_tokens_neox': 770, 'n_words': 272}