<commit_before># -*- coding: utf-8 -*-
#
# Tethys Platform documentation build configuration file, created by
# sphinx-quickstart on Sat Oct 18 17:30:09 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
from importlib.metadata import version
import os
from pathlib import Path
import subprocess
import sys
from unittest import mock

import django
from django.conf import settings

# Mock Dependencies
# NOTE: No obvious way to automatically anticipate all the sub modules without
# installing the package, which is what we are trying to avoid.
MOCK_MODULES = [
    'bokeh', 'bokeh.core.templates', 'bokeh.document', 'bokeh.embed', 'bokeh.embed.elements', 'bokeh.embed.util',
    'bokeh.resources', 'bokeh.settings', 'bokeh.server.django', 'bokeh.server.django.consumers', 'bokeh.util.compiler',
    'channels', 'channels.consumer',
    'conda', 'conda.cli', 'conda.cli.python_api',
    'condorpy',
    'django_gravatar',
    'dask', 'dask.delayed', 'dask.distributed',
    'distributed', 'distributed.protocol', 'distributed.protocol.serialize',
    'distro',
    'docker', 'docker.types', 'docker.errors',
    'guardian', 'guardian.admin', 'guardian.models', 'guardian.shortcuts',
    'mfa', 'mfa.models',
    'model_utils', 'model_utils.managers',
    'plotly', 'plotly.offline',
    'shapefile',
    'siphon', 'siphon.catalog', 'siphon.http_util',
    'social_core', 'social_core.exceptions',
    'social_django',
    'sqlalchemy', 'sqlalchemy.orm',
    'tethys_apps.harvester', 'tethys_apps.models',  # Mocked to prevent issues with loading apps during docs build.
    'tethys_compute.utilities',  # Mocked to prevent issues with DictionaryField and List Field during docs build.
    'yaml'
]


# Mock dependency modules so we don't have to install them
# See: https://docs.readthedocs.io/en/latest/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules
class MockModule(mock.MagicMock):
    @classmethod
    def __getattr__(cls, name):
        return mock.MagicMock()


print('NOTE: The following modules are mocked to prevent timeouts during the docs build process on RTD:')<commit_msg>add social_django.utils to mocked imports (#849)<commit_after># -*- coding: utf-8 -*-
#
# Tethys Platform documentation build configuration file, created by
# sphinx-quickstart on Sat Oct 18 17:30:09 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
from importlib.metadata import version
import os
from pathlib import Path
import subprocess
import sys
from unittest import mock

import django
from django.conf import settings

# Mock Dependencies
# NOTE: No obvious way to automatically anticipate all the sub modules without
# installing the package, which is what we are trying to avoid.
MOCK_MODULES = [
    'bokeh', 'bokeh.core.templates', 'bokeh.document', 'bokeh.embed', 'bokeh.embed.elements', 'bokeh.embed.util',
    'bokeh.resources', 'bokeh.settings', 'bokeh.server.django', 'bokeh.server.django.consumers', 'bokeh.util.compiler',
    'channels', 'channels.consumer',
    'conda', 'conda.cli', 'conda.cli.python_api',
    'condorpy',
    'django_gravatar',
    'dask', 'dask.delayed', 'dask.distributed',
    'distributed', 'distributed.protocol', 'distributed.protocol.serialize',
    'distro',
    'docker', 'docker.types', 'docker.errors',
    'guardian', 'guardian.admin', 'guardian.models', 'guardian.shortcuts',
    'mfa', 'mfa.models',
    'model_utils', 'model_utils.managers',
    'plotly', 'plotly.offline',
    'shapefile',
    'siphon', 'siphon.catalog', 'siphon.http_util',
    'social_core', 'social_core.exceptions',
    'social_django', 'social_django.utils',
    'sqlalchemy', 'sqlalchemy.orm',
    'tethys_apps.harvester', 'tethys_apps.models',  # Mocked to prevent issues with loading apps during docs build.
    'tethys_compute.utilities',  # Mocked to prevent issues with DictionaryField and List Field during docs build.
    'yaml'
]


# Mock dependency modules so we don't have to install them
# See: https://docs.readthedocs.io/en/latest/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules
class MockModule(mock.MagicMock):
    @classmethod
    def __getattr__(cls, name):
        return mock.MagicMock()


print('NOTE: The following modules are mocked to prevent timeouts during the docs build process on RTD:')
{'fraction_non_alphanumeric': 0.1218381112984823, 'fraction_numerical': 0.006112984822934233, 'mean_word_length': 4.46029919447641, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4636732', 'n_tokens_mistral': 1545, 'n_tokens_neox': 1459, 'n_words': 443}