<commit_before>from distutils.version import StrictVersion
from os import getenv

import django

DJANGO_VERSION = StrictVersion(django.get_version())
if not DJANGO_VERSION >= StrictVersion("2.2"):
    raise RuntimeError("Invalid Django version")

DEBUG = True

try:
    from django.db.models import JSONField  # noqa: F401

    DATABASES = {
        "default": {
            "ENGINE": "django.db.backends.sqlite3",
            "NAME": "test.db",
        }
    }
except ImportError:
    DATABASES = {
        "default": {
            "ENGINE": "django.db.backends.postgresql",
            "NAME": getenv("TEST_DB_NAME", "request_token"),
            "USER": getenv("TEST_DB_USER", "postgres"),
            "PASSWORD": getenv("TEST_DB_PASSWORD", "postgres"),
            "HOST": getenv("TEST_DB_HOST", "localhost"),
            "PORT": getenv("TEST_DB_PORT", "5432"),
        }
    }

INSTALLED_APPS = (
    "django.contrib.admin",<commit_msg>Fix settings<commit_after>from os import getenv

DEBUG = True

try:
    from django.db.models import JSONField  # noqa: F401

    DATABASES = {
        "default": {
            "ENGINE": "django.db.backends.sqlite3",
            "NAME": "test.db",
        }
    }
except ImportError:
    DATABASES = {
        "default": {
            "ENGINE": "django.db.backends.postgresql",
            "NAME": getenv("TEST_DB_NAME", "request_token"),
            "USER": getenv("TEST_DB_USER", "postgres"),
            "PASSWORD": getenv("TEST_DB_PASSWORD", "postgres"),
            "HOST": getenv("TEST_DB_HOST", "localhost"),
            "PORT": getenv("TEST_DB_PORT", "5432"),
        }
    }

INSTALLED_APPS = (
    "django.contrib.admin",
{'fraction_non_alphanumeric': 0.1465311004784689, 'fraction_numerical': 0.01076555023923445, 'mean_word_length': 2.522105263157895, 'pattern_counts': {'":': 20, '<': 3, '<?xml version=': 0, '>': 4, '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': '2530779', 'n_tokens_mistral': 565, 'n_tokens_neox': 543, 'n_words': 100}