<commit_before>import os
PROJECT_DIR = os.path.dirname(os.path.dirname(__file__))
REACT_RENDER_URL = 9009


def pytest_configure():

    from django.conf import settings

    settings.configure(
        DEBUG=True,
        DEBUG_PROPAGATE_EXCEPTIONS=True,
        DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3',
                               'NAME': 'runtestapplication.db'}},
        SITE_ID=1,
        SECRET_KEY='not very secret in tests',
        USE_I18N=True,
        USE_L10N=True,
        STATIC_URL='/static/',
        ROOT_URLCONF='tests.urls',
        TEMPLATE_LOADERS=(
            'django.template.loaders.filesystem.Loader',
            'django.template.loaders.app_directories.Loader',
        ),
        MIDDLEWARE_CLASSES=(
            'django.middleware.common.CommonMiddleware',
            'django.contrib.sessions.middleware.SessionMiddleware',
            'django.middleware.csrf.CsrfViewMiddleware',
            'django.contrib.auth.middleware.AuthenticationMiddleware',
            'django.contrib.messages.middleware.MessageMiddleware',
            # rest_messaging_middleware
            'rest_messaging.middleware.MessagingMiddleware',
        ),
        INSTALLED_APPS=(
            'django.contrib.auth',
            'django.contrib.contenttypes',
            'django.contrib.sessions',
            'django.contrib.sites',
            'django.contrib.messages',
            'django.contrib.staticfiles',

            'rest_framework',
            'rest_framework.authtoken',
            'tests',
            'webpack_loader',

            # the module
            'rest_messaging',
            'rest_messaging_centrifugo',
            'rest_messaging_js',

            # for testing purpose
            # allows us to receive messages periodically
            "django_cron",

            # react for serverside rendering
            'react',
        ),
        PASSWORD_HASHERS=(
            'django.contrib.auth.hashers.SHA1PasswordHasher',
            'django.contrib.auth.hashers.PBKDF2PasswordHasher',
            'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
            'django.contrib.auth.hashers.BCryptPasswordHasher',
            'django.contrib.auth.hashers.MD5PasswordHasher',
            'django.contrib.auth.hashers.CryptPasswordHasher',
        ),
        STATICFILES_DIRS=(
            os.path.join(PROJECT_DIR, 'django-rest-messaging-js'),
            os.path.join(PROJECT_DIR, 'example'),
        ),
        STATICFILES_FINDERS=(
            'django.contrib.staticfiles.finders.FileSystemFinder',
            'django.contrib.staticfiles.finders.AppDirectoriesFinder'
        ),
        WEBPACK_LOADER={
            'DEFAULT': {
                'BUNDLE_DIR_NAME': 'django-rest-messaging-js/dist/',
                'STATS_FILE': os.path.join(PROJECT_DIR, 'webpack-stats-example.json'),
            }
        },
        # Centrifugo
        CENTRIFUGO_PORT=8802,
        CENTRIFUGO_MESSAGE_NAMESPACE="messages",<commit_msg>webpack config<commit_after>import os
PROJECT_DIR = os.path.dirname(os.path.dirname(__file__))
REACT_RENDER_URL = 9009


def pytest_configure():

    from django.conf import settings

    settings.configure(
        DEBUG=True,
        DEBUG_PROPAGATE_EXCEPTIONS=True,
        DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3',
                               'NAME': 'runtestapplication.db'}},
        SITE_ID=1,
        SECRET_KEY='not very secret in tests',
        USE_I18N=True,
        USE_L10N=True,
        STATIC_URL='/static/',
        ROOT_URLCONF='tests.urls',
        TEMPLATE_LOADERS=(
            'django.template.loaders.filesystem.Loader',
            'django.template.loaders.app_directories.Loader',
        ),
        MIDDLEWARE_CLASSES=(
            'django.middleware.common.CommonMiddleware',
            'django.contrib.sessions.middleware.SessionMiddleware',
            'django.middleware.csrf.CsrfViewMiddleware',
            'django.contrib.auth.middleware.AuthenticationMiddleware',
            'django.contrib.messages.middleware.MessageMiddleware',
            # rest_messaging_middleware
            'rest_messaging.middleware.MessagingMiddleware',
        ),
        INSTALLED_APPS=(
            'django.contrib.auth',
            'django.contrib.contenttypes',
            'django.contrib.sessions',
            'django.contrib.sites',
            'django.contrib.messages',
            'django.contrib.staticfiles',

            'rest_framework',
            'rest_framework.authtoken',
            'tests',
            'webpack_loader',

            # the module
            'rest_messaging',
            'rest_messaging_centrifugo',
            'rest_messaging_js',

            # for testing purpose
            # allows us to receive messages periodically
            "django_cron",

            # react for serverside rendering
            'react',
        ),
        PASSWORD_HASHERS=(
            'django.contrib.auth.hashers.SHA1PasswordHasher',
            'django.contrib.auth.hashers.PBKDF2PasswordHasher',
            'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
            'django.contrib.auth.hashers.BCryptPasswordHasher',
            'django.contrib.auth.hashers.MD5PasswordHasher',
            'django.contrib.auth.hashers.CryptPasswordHasher',
        ),
        STATICFILES_DIRS=(
            os.path.join(PROJECT_DIR, 'django-rest-messaging-js'),
            os.path.join(PROJECT_DIR, 'example'),
        ),
        STATICFILES_FINDERS=(
            'django.contrib.staticfiles.finders.FileSystemFinder',
            'django.contrib.staticfiles.finders.AppDirectoriesFinder'
        ),
        WEBPACK_LOADER={
            'DEFAULT': {
                'BUNDLE_DIR_NAME': 'dist/',
                'STATS_FILE': os.path.join(PROJECT_DIR, 'webpack-stats-example.json'),
            }
        },
        # Centrifugo
        CENTRIFUGO_PORT=8802,
        CENTRIFUGO_MESSAGE_NAMESPACE="messages",
{'fraction_non_alphanumeric': 0.10734652801073465, 'fraction_numerical': 0.00637370010063737, 'mean_word_length': 2.036150712830957, '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': '6111201', 'n_tokens_mistral': 1772, 'n_tokens_neox': 1710, 'n_words': 194}