<commit_before>"""
File managing most of the logging behavior of the application.
"""
import os
from os import path
import logging
import sys

log_location = path.join(path.abspath(
    path.join(
        path.join(path.dirname(__file__), os.pardir),
        os.pardir)), 'logs')

on_unittest = os.environ.get('UNITTESTING') == 'True'  # if we are unittesting
on_remote_unittest = os.environ.get('REMOTE_UNIT_TEST') == 'True'  # if we are testing on CI tools


def mkdir_recursive(path):
    """
    Copy of mkdir recursive from saner configs, used here to remove circular dependencies
    Recursively creates a directory that would contain a file given win-like filename (xxx.xxx)
    or directory name
    :param path:
    :return:
    """
    path = os.path.abspath(path)
    directory_name = os.path.dirname(path)
    if not os.path.exists(directory_name):
        mkdir_recursive(directory_name)
    if not os.path.exists(path):
        if '.' not in path.split(
                '/')[-1][-5:]:  # should be able to suppress specific file creation
            os.mkdir(path)
<commit_msg>finalized travis logging behavior<commit_after>"""
File managing most of the logging behavior of the application.
"""
import os
from os import path
import logging
import sys

log_location = path.join(path.abspath(
    path.join(
        path.join(path.dirname(__file__), os.pardir),
        os.pardir)), 'logs')

on_unittest = os.environ.get('UNITTESTING') == 'True'  # if we are unittesting
on_remote_unittest = os.environ.get('REMOTE_UNITTEST') == 'True'  # if we are testing on CI tools


def mkdir_recursive(path):
    """
    Copy of mkdir recursive from saner configs, used here to remove circular dependencies
    Recursively creates a directory that would contain a file given win-like filename (xxx.xxx)
    or directory name
    :param path:
    :return:
    """
    path = os.path.abspath(path)
    directory_name = os.path.dirname(path)
    if not os.path.exists(directory_name):
        mkdir_recursive(directory_name)
    if not os.path.exists(path):
        if '.' not in path.split(
                '/')[-1][-5:]:  # should be able to suppress specific file creation
            os.mkdir(path)

{'fraction_non_alphanumeric': 0.10722398909586552, 'fraction_numerical': 0.001817355747387551, 'mean_word_length': 3.1863117870722433, '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': '1331428', 'n_tokens_mistral': 691, 'n_tokens_neox': 670, 'n_words': 211}