<commit_before>import re
import sys

changes_file = open('CHANGES.txt', 'r')
changes_first_line = changes_file.readline()
changes_version = re.match(r'v(\d\.\d\.\d).*', changes_first_line).group(1)

setup_file = open('setup.py', 'r')
setup_content = setup_file.read()
setup_version = re.search(r'version=\'(\d\.\d\.\d)\'', setup_content).group(1)

if changes_version != setup_version:
    print('Version numbers differ')
    print('CHANGES.txt states: v' + changes_version)
    print('setup.py states:    v' + setup_version)
    exit(1)<commit_msg>Update release version checking to include documentation<commit_after>import re
import sys

changes_file = open('CHANGES.txt', 'r')
changes_first_line = changes_file.readline()
changes_version = re.match(r'v(\d\.\d\.\d).*',
                           changes_first_line).group(1)

setup_file = open('setup.py', 'r')
setup_content = setup_file.read()
setup_version = re.search(r'version=\'(\d\.\d\.\d)\'',
                          setup_content).group(1)

sphinx_file = open('sphinx/conf.py', 'r')
sphinx_content = sphinx_file.read()
sphinx_version = re.search(r'version = \'(\d\.\d)\'',
                           sphinx_content).group(1)
sphinx_release = re.search(r'release = \'(\d\.\d\.\d)\'',
                           sphinx_content).group(1)

if changes_version != setup_version or changes_version != sphinx_release:
    print('Version numbers differ:')
    print('CHANGES.txt states:    v' + changes_version)
    print('setup.py states:       v' + setup_version)
    print('sphinx/conf.py states: v' + sphinx_release)
    exit(1)

if not sphinx_release.startswith(sphinx_version):
    print('Sphinx version configuration differs:')
    print('Sphinx version: ' + sphinx_version)
    print('Sphinx release: ' + sphinx_release)
    exit(1)
{'fraction_non_alphanumeric': 0.15997770345596432, 'fraction_numerical': 0.005016722408026756, 'mean_word_length': 3.5214105793450883, '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': '7343233', 'n_tokens_mistral': 627, 'n_tokens_neox': 617, 'n_words': 109}