<commit_before>import factory

from datetime import timedelta
from faker import Factory
from random import randint

from zeus import models
from zeus.constants import Result, Status
from zeus.utils import timezone

from .base import ModelFactory
from .types import GUIDFactory

faker = Factory.create()


class JobFactory(ModelFactory):
    id = GUIDFactory()
    build = factory.SubFactory('zeus.factories.BuildFactory')
    build_id = factory.SelfAttribute('build.id')
    repository = factory.SelfAttribute('build.repository')
    repository_id = factory.SelfAttribute('repository.id')
    label = factory.faker.Faker('sentence')
    result = factory.Iterator([Result.failed, Result.passed])
    status = factory.Iterator(
        [Status.queued, Status.in_progress, Status.finished])
    allow_failure = False
    date_created = factory.LazyAttribute(
        lambda o: timezone.now() - timedelta(minutes=30))<commit_msg>feat: Add label to job factory<commit_after>import factory

from datetime import timedelta
from faker import Factory
from random import randint

from zeus import models
from zeus.constants import Result, Status
from zeus.utils import timezone

from .base import ModelFactory
from .types import GUIDFactory

faker = Factory.create()


class JobFactory(ModelFactory):
    id = GUIDFactory()
    label = factory.faker.Faker('sentence')
    build = factory.SubFactory('zeus.factories.BuildFactory')
    build_id = factory.SelfAttribute('build.id')
    repository = factory.SelfAttribute('build.repository')
    repository_id = factory.SelfAttribute('repository.id')
    label = factory.faker.Faker('sentence')
    result = factory.Iterator([Result.failed, Result.passed])
    status = factory.Iterator(
        [Status.queued, Status.in_progress, Status.finished])
    allow_failure = False
    date_created = factory.LazyAttribute(
        lambda o: timezone.now() - timedelta(minutes=30))
{'fraction_non_alphanumeric': 0.09523809523809523, 'fraction_numerical': 0.0020931449502878076, 'mean_word_length': 4.510086455331412, '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': '5072360', 'n_tokens_mistral': 538, 'n_tokens_neox': 524, 'n_words': 140}