<commit_before>not_empty = IS_NOT_EMPTY()

db.define_table(
    'election',
    Field('title',requires=not_empty),
    Field('ballot_model','text',requires=not_empty), # empty ballot
    Field('voters','text',requires=not_empty),
    Field('managers','text',requires=not_empty),
    Field('deadline','datetime'),
    Field('vote_email','text'),
    Field('voted_email','text'),
    Field('not_voted_email','text'),
    Field('public_key',writable=False,readable=False),                
    Field('private_key',writable=False,readable=False),                
    auth.signature,
    format='%(title)s')

db.define_table(
    'voter',
    Field('voter_uuid',writable=False,readable=False),
    Field('election_id',db.election,writable=False),
    Field('email',requires=IS_EMAIL()),
    Field('voted','boolean',default=False),
    Field('invited_on','datetime'))

db.define_table(
    'ballot',
    Field('election_id',db.election),
    Field('ballot_content','text'),  # voted or blank ballot
    Field('assigned','boolean',default=False),
    Field('voted','boolean',default=False),
    Field('voted_on',default=None),
    Field('results','text',default='{}'),
    Field('ballot_uuid'), # uuid embedded in ballot
    Field('signature')) # signature of ballot (voted or blank)

                <commit_msg>fixed field type<commit_after>not_empty = IS_NOT_EMPTY()

db.define_table(
    'election',
    Field('title',requires=not_empty),
    Field('ballot_model','text',requires=not_empty), # empty ballot
    Field('voters','text',requires=not_empty),
    Field('managers','text',requires=not_empty),
    Field('deadline','datetime'),
    Field('vote_email','text'),
    Field('voted_email','text'),
    Field('not_voted_email','text'),
    Field('public_key',writable=False,readable=False),                
    Field('private_key',writable=False,readable=False),                
    auth.signature,
    format='%(title)s')

db.define_table(
    'voter',
    Field('voter_uuid',writable=False,readable=False),
    Field('election_id',db.election,writable=False),
    Field('email',requires=IS_EMAIL()),
    Field('voted','boolean',default=False),
    Field('invited_on','datetime'))

db.define_table(
    'ballot',
    Field('election_id',db.election),
    Field('ballot_content','text'),  # voted or blank ballot
    Field('assigned','boolean',default=False),
    Field('voted','boolean',default=False),
    Field('voted_on','datetime'),
    Field('results','text',default='{}'),
    Field('ballot_uuid'), # uuid embedded in ballot
    Field('signature')) # signature of ballot (voted or blank)

                
{'fraction_non_alphanumeric': 0.17962466487935658, 'fraction_numerical': 0.0, 'mean_word_length': 4.766004415011038, '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': '1633166', 'n_tokens_mistral': 830, 'n_tokens_neox': 804, 'n_words': 100}