<commit_before># coding: utf8

from __future__ import division
import logging

from flask import url_for
from sqlalchemy import Column, Index, Integer, String, Float, Boolean
from sqlalchemy import PrimaryKeyConstraint

from labonneboite.common import encoding as encoding_util
from labonneboite.common import scoring as scoring_util
from labonneboite.common.database import Base
from labonneboite.common.load_data import load_city_codes
from labonneboite.common import util
from labonneboite.common.models.base import CRUDMixin
from labonneboite.conf import settings


logger = logging.getLogger('main')


CITY_NAMES = load_city_codes()


class PrimitiveOfficeMixin(object):
    """
    Mixin providing fields shared by models: RawOffice, ExportableOffice, Office, OfficeAdminAdd.

    Don't forget to create a new migration for each of these models
    each time you add/change/remove a field here to keep all models
    in sync.    """
    siret = Column(String(191))
    company_name = Column('raisonsociale', String(191), nullable=False)
    office_name = Column('enseigne', String(191), default='', nullable=False)
    naf = Column('codenaf', String(8), nullable=False)
    street_number = Column('numerorue', String(191), default='', nullable=False)
    street_name = Column('libellerue', String(191), default='', nullable=False)
    city_code = Column('codecommune', String(191), nullable=False)
    zipcode = Column('codepostal', String(8), nullable=False)
    email = Column(String(191), default='', nullable=False)
    tel = Column(String(191), default='', nullable=False)
    departement = Column(String(8), nullable=False)
    headcount = Column('trancheeffectif', String(2))


class OfficeMixin(PrimitiveOfficeMixin):
    """
    Mixin providing fields shared by models: ExportableOffice, Office, OfficeAdminAdd.

    Don't forget to create a new migration for each of these models
    each time you add/change/remove a field here to keep all models
    in sync.
    """
    website = Column(String(191), default='', nullable=False)
    flag_alternance = Column(Boolean, default=False, nullable=False)
    flag_junior = Column(Boolean, default=False, nullable=False)
    flag_senior = Column(Boolean, default=False, nullable=False)
    flag_handicap = Column(Boolean, default=False, nullable=False)<commit_msg>add email_alternance in Office model<commit_after># coding: utf8

from __future__ import division
import logging

from flask import url_for
from sqlalchemy import Column, Index, Integer, String, Float, Boolean
from sqlalchemy import PrimaryKeyConstraint

from labonneboite.common import encoding as encoding_util
from labonneboite.common import scoring as scoring_util
from labonneboite.common.database import Base
from labonneboite.common.load_data import load_city_codes
from labonneboite.common import util
from labonneboite.common.models.base import CRUDMixin
from labonneboite.conf import settings


logger = logging.getLogger('main')


CITY_NAMES = load_city_codes()


class PrimitiveOfficeMixin(object):
    """
    Mixin providing fields shared by models: RawOffice, ExportableOffice, Office, OfficeAdminAdd.

    Don't forget to create a new migration for each of these models
    each time you add/change/remove a field here to keep all models
    in sync.    """
    siret = Column(String(191))
    company_name = Column('raisonsociale', String(191), nullable=False)
    office_name = Column('enseigne', String(191), default='', nullable=False)
    naf = Column('codenaf', String(8), nullable=False)
    street_number = Column('numerorue', String(191), default='', nullable=False)
    street_name = Column('libellerue', String(191), default='', nullable=False)
    city_code = Column('codecommune', String(191), nullable=False)
    zipcode = Column('codepostal', String(8), nullable=False)
    email = Column(String(191), default='', nullable=False)
    tel = Column(String(191), default='', nullable=False)
    departement = Column(String(8), nullable=False)
    headcount = Column('trancheeffectif', String(2))


class OfficeMixin(PrimitiveOfficeMixin):
    """
    Mixin providing fields shared by models: ExportableOffice, Office, OfficeAdminAdd.

    Don't forget to create a new migration for each of these models
    each time you add/change/remove a field here to keep all models
    in sync.
    """
    website = Column(String(191), default='', nullable=False)
    email_alternance = Column('email_alternance', String(191), default='', nullable=True)
    flag_alternance = Column(Boolean, default=False, nullable=False)
    flag_junior = Column(Boolean, default=False, nullable=False)
    flag_senior = Column(Boolean, default=False, nullable=False)
    flag_handicap = Column(Boolean, default=False, nullable=False)
{'fraction_non_alphanumeric': 0.09871875656374711, 'fraction_numerical': 0.014072673808023524, 'mean_word_length': 5.274044795783926, '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': '6702293', 'n_tokens_mistral': 1436, 'n_tokens_neox': 1362, 'n_words': 412}