<commit_before>from django.db import models


class Publication(models.Model):
    abbreviation = models.CharField(max_length=3, unique=True)
    title = models.CharField(max_length=256, blank=True, null=True)
    description = models.TextField(blank=True, null=True)

    def __str__(self):
        return '{}: {}'.format(self.abbreviation, self.title)


class Issue(models.Model):
    publication = models.ForeignKey(Publication)
    uid = models.CharField(max_length=32, unique=True)
    description = models.TextField(blank=True, null=True)
    issue_date = models.DateField()
    number_of_pages = models.PositiveIntegerField(blank=True, null=True)
    pdf = models.FileField(upload_to='periodicals/')

    def __str__(self):
        return '{}: {}'.format(self.publication, self.issue_date)


class Page(models.Model):
    issue = models.ForeignKey(Issue)
    number = models.PositiveIntegerField()
    image = models.ImageField(upload_to='periodicals/')

    def __str__(self):
        return '{}: {}'.format(self.issue, self.number)

<commit_msg>Migration to remove description field from Issue.<commit_after>from django.db import models


class Publication(models.Model):
    abbreviation = models.CharField(max_length=3, unique=True)
    title = models.CharField(max_length=256, blank=True, null=True)
    description = models.TextField(blank=True, null=True)

    def __str__(self):
        return '{}: {}'.format(self.abbreviation, self.title)


class Issue(models.Model):
    publication = models.ForeignKey(Publication)
    uid = models.CharField(max_length=32, unique=True)
    issue_date = models.DateField()
    number_of_pages = models.PositiveIntegerField(blank=True, null=True)
    pdf = models.FileField(upload_to='periodicals/')

    def __str__(self):
        return '{}: {}'.format(self.publication, self.issue_date)


class Page(models.Model):
    issue = models.ForeignKey(Issue)
    number = models.PositiveIntegerField()
    image = models.ImageField(upload_to='periodicals/')

    def __str__(self):
        return '{}: {}'.format(self.issue, self.number)


{'fraction_non_alphanumeric': 0.13135186960690318, 'fraction_numerical': 0.005752636625119847, 'mean_word_length': 4.449086161879896, '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': '2091994', 'n_tokens_mistral': 663, 'n_tokens_neox': 634, 'n_words': 115}