<commit_before>from .processors import *
from .readers import *
from .utils import AttributeDict, RangeMap

ALL_FILES = [
    'replay.initData',
    'replay.details',
    'replay.attributes.events',
    'replay.message.events',
    'replay.game.events'
]

files = AttributeDict(
    all=[
        'replay.initData',
        'replay.details',
        'replay.attributes.events',
        'replay.message.events',
        'replay.game.events'],

    partial=[
        'replay.initData',
        'replay.details',
        'replay.attributes.events',
        'replay.message.events',],

    basic=[
        'replay.initData',
        'replay.details',
        'replay.attributes.events'],

    minimal=[
        'replay.initData',],

    none=[]
)

default_options = AttributeDict(
    directory="",
    processors=[],
    debug=False,
    verbose=False,
    parse_events=True,
    include_regex=None,
    exclude_dirs=[],
    recursive=True,
    depth=-1,
    follow_symlinks=True,
    files=files.all,
    apply=False
)


readers = RangeMap()
readers.add_range(0, 16561, {
        'replay.initData': InitDataReader(),
        'replay.details': DetailsReader(),
        'replay.attributes.events': AttributeEventsReader(),
        'replay.message.events': MessageEventsReader(),
        'replay.game.events': GameEventsReader(),
    })

readers.add_range(16561, 17326, {
        'replay.initData': InitDataReader(),
        'replay.details': DetailsReader(),
        'replay.attributes.events': AttributeEventsReader(),
        'replay.message.events': MessageEventsReader(),
        'replay.game.events': GameEventsReader_16561(),
    })

readers.add_range(17326, 18574, {
        'replay.initData': InitDataReader(),
        'replay.details': DetailsReader(),
        'replay.attributes.events': AttributeEventsReader_17326(),
        'replay.message.events': MessageEventsReader(),
        'replay.game.events': GameEventsReader_16561(),
    })

readers.add_range(18574, 19595, {
        'replay.initData': InitDataReader(),
        'replay.details': DetailsReader(),
        'replay.attributes.events': AttributeEventsReader_17326(),
        'replay.message.events': MessageEventsReader(),
        'replay.game.events': GameEventsReader_18574(),
    })

readers.add_range(19595, None, {
        'replay.initData': InitDataReader(),
        'replay.details': DetailsReader(),
        'replay.attributes.events': AttributeEventsReader_17326(),
        'replay.message.events': MessageEventsReader(),
        'replay.game.events': GameEventsReader_19595(),
    })<commit_msg>Make the configuration use absolute_import as well<commit_after>from __future__ import absolute_import

from sc2reader import readers as r
from sc2reader.utils import AttributeDict, RangeMap

ALL_FILES = [
    'replay.initData',
    'replay.details',
    'replay.attributes.events',
    'replay.message.events',
    'replay.game.events'
]

files = AttributeDict(
    all=[
        'replay.initData',
        'replay.details',
        'replay.attributes.events',
        'replay.message.events',
        'replay.game.events'],

    partial=[
        'replay.initData',
        'replay.details',
        'replay.attributes.events',
        'replay.message.events',],

    basic=[
        'replay.initData',
        'replay.details',
        'replay.attributes.events'],

    minimal=[
        'replay.initData',],

    none=[]
)

default_options = AttributeDict(
    directory="",
    processors=[],
    debug=False,
    verbose=False,
    parse_events=True,
    include_regex=None,
    exclude_dirs=[],
    recursive=True,
    depth=-1,
    follow_symlinks=True,
    files=files.all,
    apply=False
)


readers = RangeMap()
readers.add_range(0, 16561, {
        'replay.initData': r.InitDataReader(),
        'replay.details': r.DetailsReader(),
        'replay.attributes.events': r.AttributeEventsReader(),
        'replay.message.events': r.MessageEventsReader(),
        'replay.game.events': r.GameEventsReader(),
    })

readers.add_range(16561, 17326, {
        'replay.initData': r.InitDataReader(),
        'replay.details': r.DetailsReader(),
        'replay.attributes.events': r.AttributeEventsReader(),
        'replay.message.events': r.MessageEventsReader(),
        'replay.game.events': r.GameEventsReader_16561(),
    })

readers.add_range(17326, 18574, {
        'replay.initData': r.InitDataReader(),
        'replay.details': r.DetailsReader(),
        'replay.attributes.events': r.AttributeEventsReader_17326(),
        'replay.message.events': r.MessageEventsReader(),
        'replay.game.events': r.GameEventsReader_16561(),
    })

readers.add_range(18574, 19595, {
        'replay.initData': r.InitDataReader(),
        'replay.details': r.DetailsReader(),
        'replay.attributes.events': r.AttributeEventsReader_17326(),
        'replay.message.events': r.MessageEventsReader(),
        'replay.game.events': r.GameEventsReader_18574(),
    })

readers.add_range(19595, None, {
        'replay.initData': r.InitDataReader(),
        'replay.details': r.DetailsReader(),
        'replay.attributes.events': r.AttributeEventsReader_17326(),
        'replay.message.events': r.MessageEventsReader(),
        'replay.game.events': r.GameEventsReader_19595(),
    })
{'fraction_non_alphanumeric': 0.14603114318268134, 'fraction_numerical': 0.029624003038359287, 'mean_word_length': 3.048424289008455, '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': '4077213', 'n_tokens_mistral': 1745, 'n_tokens_neox': 1546, 'n_words': 236}