<commit_before>import re
from django.db import models
from django_extensions.db.fields import AutoSlugField


class Project(models.Model):
    name = models.CharField(max_length=200, db_index=True, unique=True)
    slug = AutoSlugField(populate_from="name")
    created = models.DateTimeField(auto_now_add=True)
    started = models.DateTimeField(blank=True, null=True, editable=False)
    ended = models.DateTimeField(blank=True, null=True, editable=False)

    idea = models.TextField(blank=True)
    tools = models.TextField(blank=True)
    validate_customer = models.TextField(blank=True)
    validate_offering = models.TextField(blank=True)
    validate_value_prop = models.TextField(blank=True)

    @property
    def has_mvp(self):
        try:
            self.mvp
            return True
        except:
            return False

    def __unicode__(self):
        return self.name


class Mvp(models.Model):
    project = models.OneToOneField(Project, primary_key=True)
    original_statement = models.TextField(blank=True)

class MvpRedaction(models.Model):
    mvp = models.ForeignKey(Mvp, primary_key=True)
    statement_start = models.IntegerField()
    statement_end = models.IntegerField()

class Workstream(models.Model):
    mvp = models.ForeignKey(Mvp, primary_key=True)
    statement_start = models.IntegerField()
    statement_end = models.IntegerField()
    name = models.TextField()
    owner = models.TextField(blank=True)

class Ticket(models.Model):
    workstream = models.ForeignKey(Workstream, primary_key=True)
    content = models.TextField(blank=True)
    status = models.CharField(max_length=20)

<commit_msg>Cleaning up models.py<commit_after>from django.db import models
from django_extensions.db.fields import AutoSlugField


class Project(models.Model):
    name = models.CharField(max_length=200, db_index=True, unique=True)
    slug = AutoSlugField(populate_from="name")
    created = models.DateTimeField(auto_now_add=True)
    started = models.DateTimeField(blank=True, null=True, editable=False)
    ended = models.DateTimeField(blank=True, null=True, editable=False)

    idea = models.TextField(blank=True)
    tools = models.TextField(blank=True)
    validate_customer = models.TextField(blank=True)
    validate_offering = models.TextField(blank=True)
    validate_value_prop = models.TextField(blank=True)

    @property
    def has_mvp(self):
        try:
            return self.mvp is not None
        except Mvp.DoesNotExist:
            return False

    def __unicode__(self):
        return self.name


class Mvp(models.Model):
    project = models.OneToOneField(Project, primary_key=True)
    original_statement = models.TextField(blank=True)


class MvpRedaction(models.Model):
    mvp = models.ForeignKey(Mvp, primary_key=True)
    statement_start = models.IntegerField()
    statement_end = models.IntegerField()


class Workstream(models.Model):
    mvp = models.ForeignKey(Mvp, primary_key=True)
    statement_start = models.IntegerField()
    statement_end = models.IntegerField()
    name = models.TextField()
    owner = models.TextField(blank=True)


class Ticket(models.Model):
    workstream = models.ForeignKey(Workstream, primary_key=True)
    content = models.TextField(blank=True)
    status = models.CharField(max_length=20)


{'fraction_non_alphanumeric': 0.10009099181073704, 'fraction_numerical': 0.003033060357901122, 'mean_word_length': 4.177394034536892, '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': '6482745', 'n_tokens_mistral': 1005, 'n_tokens_neox': 982, 'n_words': 183}