<commit_before>#!/bin/sh
__AUTHOR__="<NAME>"
# Preconditions:
# - Packages doxygen doxygen-doc doxygen-latex doxygen-gui graphviz
#   must be installed to create Doxygen files.
# - A gh-pages branch should already exist. See below for more info on how to
#   create a gh-pages branch.
#
# Required global variables:
# - TRAVIS_BUILD_NUMBER : The number of the current build.
# - TRAVIS_COMMIT       : The commit that the current build is testing.
# - GH_REPO_NAME        : The name of the repository.
# - GH_REPO_REF         : The GitHub reference to the repository.
# - GH_REPO_TOKEN       : Secure token to the github repository.

echo 'Setting up the script...'
# Exit with nonzero exit code if anything fails
set -e

# Checking that we are on master branch as do not want to update documentation
# if on a different branch.
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$BRANCH" != "master" ]]; then
    echo 'Aborting script as not on master branch';
    exit 1
fi

mkdir -p code_docs
cd code_docs

git clone -b gh-pages https://git@$GH_REPO_REF
cd $GH_REPO_NAME

##### Configure git
# Set the push default to simple i.e. push only the current branch.
# git config --global push.default simple
# Pretend to be a user called Travis CI.
# git config user.name "Travis CI"
# git config user.email "<EMAIL>"<commit_msg>Adding better error message for branch check in deploy script<commit_after>#!/bin/sh
__AUTHOR__="<NAME>"
# Preconditions:
# - Packages doxygen doxygen-doc doxygen-latex doxygen-gui graphviz
#   must be installed to create Doxygen files.
# - A gh-pages branch should already exist. See below for more info on how to
#   create a gh-pages branch.
#
# Required global variables:
# - TRAVIS_BUILD_NUMBER : The number of the current build.
# - TRAVIS_COMMIT       : The commit that the current build is testing.
# - GH_REPO_NAME        : The name of the repository.
# - GH_REPO_REF         : The GitHub reference to the repository.
# - GH_REPO_TOKEN       : Secure token to the github repository.

echo 'Setting up the script...'
# Exit with nonzero exit code if anything fails
set -e

# Checking that we are on master branch as do not want to update documentation
# if on a different branch.
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$BRANCH" != "master" ]]; then
    echo 'Aborting script as not on master branch: ${BRANCH}';
    exit 1
fi

mkdir -p code_docs
cd code_docs

git clone -b gh-pages https://git@$GH_REPO_REF
cd $GH_REPO_NAME

##### Configure git
# Set the push default to simple i.e. push only the current branch.
# git config --global push.default simple
# Pretend to be a user called Travis CI.
# git config user.name "Travis CI"
# git config user.email "<EMAIL>"
{'fraction_non_alphanumeric': 0.08872458410351201, 'fraction_numerical': 0.0007393715341959334, 'mean_word_length': 3.4579901153212522, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '4084593', 'n_tokens_mistral': 869, 'n_tokens_neox': 817, 'n_words': 357}