<commit_before>from guests import *

AutomatedEmail.queries[GuestGroup] = lambda session: session.query(GuestGroup).options(joinedload(GuestGroup.group)).all()


class BandEmail(AutomatedEmail):
    def __init__(self, subject, template, filter, ident, **kwargs):
        AutomatedEmail.__init__(self, GuestGroup, subject, template, lambda b: b.group_type == c.BAND and filter(b),
                                ident, sender=c.BAND_EMAIL, **kwargs)


class GuestEmail(AutomatedEmail):
    def __init__(self, subject, template, filter, ident, **kwargs):
        AutomatedEmail.__init__(self, GuestGroup, subject, template, lambda b: b.group_type == c.GUEST and filter(b),
                                ident, sender=c.GUEST_EMAIL, **kwargs)

AutomatedEmail(GuestGroup, '{EVENT_NAME} Performer Checklist', 'band_notification.txt', lambda b: b.group_type == c.BAND,
               ident='band_checklist_inquiry')

BandEmail('Last chance to apply for a {EVENT_NAME} Panel', 'band_panel_reminder.txt',
          lambda b: not b.panel_status, when=days_before(3, c.BAND_PANEL_DEADLINE),
          ident='band_panel_reminder')

BandEmail('Last Chance to accept your offer to perform at {EVENT_NAME}', 'band_agreement_reminder.txt',
          lambda b: not b.info_status, when=days_before(3, c.BAND_INFO_DEADLINE),
          ident='band_agreement_reminder')

BandEmail('Last chance to include your bio info on the {EVENT_NAME} website', 'band_bio_reminder.txt',
          lambda b: not b.bio_status, when=days_before(3, c.BAND_BIO_DEADLINE),
          ident='band_bio_reminder')

BandEmail('{EVENT_NAME} W9 reminder', 'band_w9_reminder.txt',
          lambda b: b.payment and not b.taxes_status, when=days_before(3, c.BAND_TAXES_DEADLINE),
          ident='band_w9_reminder')

BandEmail('Last chance to sign up for selling merchandise at {EVENT_NAME}', 'band_merch_reminder.txt',
          lambda b: not b.merch_status, when=days_before(3, c.BAND_MERCH_DEADLINE),
          ident='band_merch_reminder')

BandEmail('{EVENT_NAME} charity auction reminder', 'band_charity_reminder.txt',
          lambda b: not b.charity_status, when=days_before(3, c.BAND_CHARITY_DEADLINE),
          ident='band_charity_reminder')<commit_msg>send performer checklist FROM music department email (#127)<commit_after>from guests import *

AutomatedEmail.queries[GuestGroup] = lambda session: session.query(GuestGroup).options(joinedload(GuestGroup.group)).all()


class BandEmail(AutomatedEmail):
    def __init__(self, subject, template, filter, ident, **kwargs):
        AutomatedEmail.__init__(self, GuestGroup, subject, template, lambda b: b.group_type == c.BAND and filter(b),
                                ident, sender=c.BAND_EMAIL, **kwargs)


class GuestEmail(AutomatedEmail):
    def __init__(self, subject, template, filter, ident, **kwargs):
        AutomatedEmail.__init__(self, GuestGroup, subject, template, lambda b: b.group_type == c.GUEST and filter(b),
                                ident, sender=c.GUEST_EMAIL, **kwargs)

AutomatedEmail(GuestGroup, '{EVENT_NAME} Performer Checklist', 'band_notification.txt',
               lambda b: b.group_type == c.BAND, sender=c.BAND_EMAIL,
               ident='band_checklist_inquiry')

BandEmail('Last chance to apply for a {EVENT_NAME} Panel', 'band_panel_reminder.txt',
          lambda b: not b.panel_status, when=days_before(3, c.BAND_PANEL_DEADLINE),
          ident='band_panel_reminder')

BandEmail('Last Chance to accept your offer to perform at {EVENT_NAME}', 'band_agreement_reminder.txt',
          lambda b: not b.info_status, when=days_before(3, c.BAND_INFO_DEADLINE),
          ident='band_agreement_reminder')

BandEmail('Last chance to include your bio info on the {EVENT_NAME} website', 'band_bio_reminder.txt',
          lambda b: not b.bio_status, when=days_before(3, c.BAND_BIO_DEADLINE),
          ident='band_bio_reminder')

BandEmail('{EVENT_NAME} W9 reminder', 'band_w9_reminder.txt',
          lambda b: b.payment and not b.taxes_status, when=days_before(3, c.BAND_TAXES_DEADLINE),
          ident='band_w9_reminder')

BandEmail('Last chance to sign up for selling merchandise at {EVENT_NAME}', 'band_merch_reminder.txt',
          lambda b: not b.merch_status, when=days_before(3, c.BAND_MERCH_DEADLINE),
          ident='band_merch_reminder')

BandEmail('{EVENT_NAME} charity auction reminder', 'band_charity_reminder.txt',
          lambda b: not b.charity_status, when=days_before(3, c.BAND_CHARITY_DEADLINE),
          ident='band_charity_reminder')
{'fraction_non_alphanumeric': 0.11150442477876106, 'fraction_numerical': 0.004646017699115044, 'mean_word_length': 4.09695603156708, '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': '1750442', 'n_tokens_mistral': 1463, 'n_tokens_neox': 1452, 'n_words': 321}