<commit_before><commit_msg>Trigger percolator save on migration (using new never-delete logic)<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


def save_func(apps, schema_editor):
    # Trigger percolator save logic (new method ALWAYS saves percolator, previous
    # deleted percolator if not active).
    SpecialCoverage = apps.get_model("special_coverage", 'SpecialCoverage')
    for special in SpecialCoverage.objects.all():
        special.save()


class Migration(migrations.Migration):

    dependencies = [
        ('special_coverage', '0008_auto_20160118_1337'),
    ]

    operations = [
        migrations.RunPython(save_func, save_func)
    ]
{'fraction_non_alphanumeric': 0.09504132231404959, 'fraction_numerical': 0.023415977961432508, 'mean_word_length': 4.119718309859155, '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': '1887927', 'n_tokens_mistral': 226, 'n_tokens_neox': 204, 'n_words': 54}