<commit_before>import os
import sys

from os.path import dirname
from django.conf.locale.en import formats as en_formats
from configurations import Configuration, values

BASE_DIR = dirname(dirname(dirname(__file__)))

external_keys = (
    'SECRET_KEY', 'JWT_SECRET', 'AWS_ACCESS_KEY_ID',
    'AWS_SECRET_ACCESS_KEY', 'AWS_STORAGE_BUCKET_NAME',
    'GS_PROJECT_ID', 'GS_CREDENTIALS', 'GS_BUCKET_NAME')

class Common(Configuration):

    @classmethod
    def setup(cls):
        super(Common, cls).setup()
        for key in external_keys:
            if key in os.environ:
                setattr(cls, key, os.environ[key])<commit_msg>Print message for missing settings<commit_after>import os
import sys

from os.path import dirname
from django.conf.locale.en import formats as en_formats
from configurations import Configuration, values

BASE_DIR = dirname(dirname(dirname(__file__)))

external_keys = (
    'SECRET_KEY', 'JWT_SECRET', 'AWS_ACCESS_KEY_ID',
    'AWS_SECRET_ACCESS_KEY', 'AWS_STORAGE_BUCKET_NAME',
    'GS_PROJECT_ID', 'GS_CREDENTIALS', 'GS_BUCKET_NAME')

class Common(Configuration):

    @classmethod
    def setup(cls):
        super(Common, cls).setup()
        for key in external_keys:
            if key in os.environ:
                setattr(cls, key, os.environ[key])

    @classmethod
    def post_setup(cls):
        super(Common, cls).post_setup()
        for key in external_keys:
            if not hasattr(cls, key):
                print("Missing setting: %s" % key)
{'fraction_non_alphanumeric': 0.1000667111407605, 'fraction_numerical': 0.0, 'mean_word_length': 3.559270516717325, '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': '1345746', 'n_tokens_mistral': 490, 'n_tokens_neox': 494, 'n_words': 116}