<commit_before>#!/bin/bash
#
# The script expects to be run from the TOP-LEVEL folder of tmlibrary
#

# exit at the first error
set -e

# Checks if we are in the top level folder
if [[ ! -d src ]] || [[ ! -d docs ]] || [[ ! -d scripts ]]; then
    echo "Please execute script from the top-level folder of tmlibrary"
    exit 100
fi

# Activate environment created by test_all_packages script.
workon tmlibrary

# Generates docs.
sphinx-apidoc -o docs src/tmlib
make -C docs html

# Deactivate virtual environment
deactivate tmlibrary<commit_msg>Add script to build documentation on jenkins<commit_after>#!/bin/bash
#
# The script expects to be run from the TOP-LEVEL folder of tmlibrary
#

# exit at the first error
set -e

# Checks if we are in the top level folder
if [[ ! -d src ]] || [[ ! -d docs ]] || [[ ! -d scripts ]]; then
    echo "Please execute script from the top-level folder of tmlibrary"
    exit 100
fi

VENV="${PWD}/venv_tmlibrary"

# Activate virtual environment
source $VENV/bin/activate

# Generates docs
make -C docs html

# Deactivate virtual environment
deactivate
{'fraction_non_alphanumeric': 0.09466911764705882, 'fraction_numerical': 0.0055147058823529415, 'mean_word_length': 3.6340425531914895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3197472', 'n_tokens_mistral': 362, 'n_tokens_neox': 341, 'n_words': 144}