<commit_before>"""Very simple model registry.

Simply stores and makes available a list of model names that are valid,
as well as those model's base fields (e.g. not added by addins).

Apart from it's role in model construction, it is mainly intended as
a simple way to validate identifiers in places where model names are
expected, while at the same time allowing addins to easily register
new models:

    from feedplatform import models
    models.AVAILABLE += ['enclosures']
"""

from storm.locals import *

AVAILABLE = {
    'feed': {
        'id': Int(primary=True),
        'url': Unicode(),
    },
    'item': {
        'id': Int(primary=True),
        'feed_id': Int(),
        'feed': Reference('feed_id', 'Feed.id'),
        'guid': Unicode(),
    },
}<commit_msg>added a items ReferenceSet to the feed model<commit_after>"""Very simple model registry.

Simply stores and makes available a list of model names that are valid,
as well as those model's base fields (e.g. not added by addins).

Apart from it's role in model construction, it is mainly intended as
a simple way to validate identifiers in places where model names are
expected, while at the same time allowing addins to easily register
new models:

    from feedplatform import models
    models.AVAILABLE += ['enclosures']
"""

from storm.locals import *

AVAILABLE = {
    'feed': {
        'id': Int(primary=True),
        'url': Unicode(),
        'items': ReferenceSet('Feed.id', 'Item.feed_id'),
    },
    'item': {
        'id': Int(primary=True),
        'feed_id': Int(),
        'feed': Reference('feed_id', 'Feed.id'),
        'guid': Unicode(),
    },
}
{'fraction_non_alphanumeric': 0.11653447223917023, 'fraction_numerical': 0.0, 'mean_word_length': 3.2159383033419022, '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': '6922259', 'n_tokens_mistral': 476, 'n_tokens_neox': 460, 'n_words': 192}