<commit_before>from validators.url import url

from satnogsclient.settings import (NETWORK_API_URL, GROUND_STATION_ID, GROUND_STATION_LAT,
                                    GROUND_STATION_LON, GROUND_STATION_ELEV)


try:
    url(NETWORK_API_URL)
except:
    raise Exception('Invalid NETWORK_API_URL: {0}'.format(NETWORK_API_URL))

if not GROUND_STATION_ID:
    raise Exception('GROUND_STATION_ID not configured.')

if not GROUND_STATION_LAT:
    raise Exception('GROUND_STATION_LAT not configured')

if not GROUND_STATION_LON:
    raise Exception('GROUND_STATION_LON not configured')

if not GROUND_STATION_ELEV:
    raise Exception('GROUND_STATION_ELEV not configured')<commit_msg>Avoid settings validation when building the docs.<commit_after>from os import environ

from validators.url import url

from satnogsclient.settings import (NETWORK_API_URL, GROUND_STATION_ID, GROUND_STATION_LAT,
                                    GROUND_STATION_LON, GROUND_STATION_ELEV)


# Avoid validation when building docs
if not environ.get('READTHEDOCS', False):
    try:
        url(NETWORK_API_URL)
    except:
        raise Exception('Invalid NETWORK_API_URL: {0}'.format(NETWORK_API_URL))

    if not GROUND_STATION_ID:
        raise Exception('GROUND_STATION_ID not configured.')

    if not GROUND_STATION_LAT:
        raise Exception('GROUND_STATION_LAT not configured')

    if not GROUND_STATION_LON:
        raise Exception('GROUND_STATION_LON not configured')

    if not GROUND_STATION_ELEV:
        raise Exception('GROUND_STATION_ELEV not configured')
{'fraction_non_alphanumeric': 0.06491002570694088, 'fraction_numerical': 0.0012853470437017994, 'mean_word_length': 4.088235294117647, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '326044', 'n_tokens_mistral': 529, 'n_tokens_neox': 489, 'n_words': 112}