<commit_before># -*- coding: utf-8 -*-
"""Setup the SAUCE application

@author: moschlar
"""

import logging

from sauce.config.environment import load_environment

import data

__all__ = ['setup_app']

log = logging.getLogger(__name__)

from schema import setup_schema, teardown_schema
import bootstrap
import data

def setup_app(command, conf, vars):
    """Place any commands to setup sauce here"""
    load_environment(conf.global_conf, conf.local_conf)
    teardown_schema(command, conf, vars)
    
    setup_schema(command, conf, vars)
    bootstrap.bootstrap(command, conf, vars)
    log.info('Inserting dummy data...')
    
    # Call all *_data functions from the data module
    for d in dir(data):
        if d.endswith('_data'):
            dd = getattr(data, d)
            if callable(dd):
                dd(command,conf,vars)
    
    log.info('Dummy data inserted.')<commit_msg>No more teardown_schema in websetup for security reasons ;)<commit_after># -*- coding: utf-8 -*-
"""Setup the SAUCE application

@author: moschlar
"""

import logging

from sauce.config.environment import load_environment

import data

__all__ = ['setup_app']

log = logging.getLogger(__name__)

from schema import setup_schema, teardown_schema
import bootstrap
import data

def setup_app(command, conf, vars):
    """Place any commands to setup sauce here"""
    load_environment(conf.global_conf, conf.local_conf)
    
    setup_schema(command, conf, vars)
    bootstrap.bootstrap(command, conf, vars)
    log.info('Inserting dummy data...')
    
    # Call all *_data functions from the data module
    for d in dir(data):
        if d.endswith('_data'):
            dd = getattr(data, d)
            if callable(dd):
                dd(command,conf,vars)
    
    log.info('Dummy data inserted.')
{'fraction_non_alphanumeric': 0.10696378830083565, 'fraction_numerical': 0.0011142061281337048, 'mean_word_length': 3.276190476190476, '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': '2103134', 'n_tokens_mistral': 549, 'n_tokens_neox': 532, 'n_words': 160}