<commit_before>from settings import *
from logsettings import get_logger_config
import json

log_dir = REPO_PATH / "log"

try:
    os.makedirs(log_dir)
except:
    pass

LOGGING = get_logger_config(log_dir,
                            logging_env="test",
                            dev_env=True,
                            debug=True)

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'test_xqueue.sqlite',

        # We need to use TEST_NAME here,
        # otherwise Django tests will use an in-memory database 
        # In-memory databases do not support access from
        # multiple threads, which the integration tests need
        'TEST_NAME': 'test_xqueue.sqlite',
    }
}

# Local RabbitMQ configuration
RABBITMQ_USER = 'guest'
RABBITMQ_PASS = '<PASSWORD>'
RABBIT_HOST = 'localhost'

# Try to load sensitive information from env.json
# Fail gracefully if  we can't find or parse the file.
try:
    env_file = open(ENV_ROOT / "env.json")
    ENV_TOKENS = json.load(env_file)

except (IOError, ValueError):
    ENV_TOKENS = {}

# Mathworks setup
# We load the Mathworks settings from envs.json
# to avoid storing auth information in the repository<commit_msg>Updated settings to assign unique database names<commit_after>from settings import *
from logsettings import get_logger_config
import json
from uuid import uuid4

log_dir = REPO_PATH / "log"

try:
    os.makedirs(log_dir)
except:
    pass

LOGGING = get_logger_config(log_dir,
                            logging_env="test",
                            dev_env=True,
                            debug=True)

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'test_xqueue.sqlite',

        # We need to use TEST_NAME here,
        # otherwise Django tests will use an in-memory database 
        # In-memory databases do not support access from
        # multiple threads, which the integration tests need
        # We also need to choose *unique* names to avoid
        # conflicts in the Jenkins server
        'TEST_NAME': 'test_xqueue_%s.sqlite' % uuid4().hex,
    }
}

# Local RabbitMQ configuration
RABBITMQ_USER = 'guest'
RABBITMQ_PASS = '<PASSWORD>'
RABBIT_HOST = 'localhost'

# Try to load sensitive information from env.json
# Fail gracefully if  we can't find or parse the file.
try:
    env_file = open(ENV_ROOT / "env.json")
    ENV_TOKENS = json.load(env_file)

except (IOError, ValueError):
    ENV_TOKENS = {}

# Mathworks setup
# We load the Mathworks settings from envs.json
# to avoid storing auth information in the repository
{'fraction_non_alphanumeric': 0.08250191864927091, 'fraction_numerical': 0.0015349194167306216, 'mean_word_length': 2.6926345609065154, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5290062', 'n_tokens_mistral': 809, 'n_tokens_neox': 790, 'n_words': 244}