<commit_before>import uuid

from django.conf import settings
from django.contrib.postgres.fields import ArrayField
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils.text import slugify
from guardian.shortcuts import assign_perm, get_groups_with_perms
from kombu.utils import cached_property
from transitions.extensions import GraphMachine as Machine

from accounts.models import Child, DemographicData, Organization, User
from accounts.utils import build_study_group_name
from project.fields.datetime_aware_jsonfield import DateTimeAwareJSONField
from project.settings import EMAIL_FROM_ADDRESS
from project import settings
from transitions.extensions import GraphMachine as Machine

from studies import workflow
from studies.helpers import send_mail
from studies.tasks import build_experiment


class StudyType(models.Model):
    name = models.CharField(max_length=255, blank=False, null=False)
    configuration = DateTimeAwareJSONField(default={
        # task module should have a build_experiment method decorated as a
        # celery task that takes a study uuid and a preview kwarg which
        # defaults to true
        "task_module": "studies.tasks",
        "metadata": {
            # defines the default metadata fields for that type of study
            "fields": {
                "addons_repo_url": settings.EMBER_ADDONS_REPO,
                "last_known_player_sha": None,
                "last_known_addons_sha": None
            }
        }
    })


class Study(models.Model):<commit_msg>Change appearance of study type.<commit_after>import uuid

from django.conf import settings
from django.contrib.postgres.fields import ArrayField
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils.text import slugify
from guardian.shortcuts import assign_perm, get_groups_with_perms
from kombu.utils import cached_property
from transitions.extensions import GraphMachine as Machine

from accounts.models import Child, DemographicData, Organization, User
from accounts.utils import build_study_group_name
from project.fields.datetime_aware_jsonfield import DateTimeAwareJSONField
from project.settings import EMAIL_FROM_ADDRESS
from project import settings
from transitions.extensions import GraphMachine as Machine

from studies import workflow
from studies.helpers import send_mail
from studies.tasks import build_experiment


class StudyType(models.Model):
    name = models.CharField(max_length=255, blank=False, null=False)
    configuration = DateTimeAwareJSONField(default={
        # task module should have a build_experiment method decorated as a
        # celery task that takes a study uuid and a preview kwarg which
        # defaults to true
        "task_module": "studies.tasks",
        "metadata": {
            # defines the default metadata fields for that type of study
            "fields": {
                "addons_repo_url": settings.EMBER_ADDONS_REPO,
                "last_known_player_sha": None,
                "last_known_addons_sha": None
            }
        }
    })
    def __str__(self):
        return f'<Study Type: {self.name}>'


class Study(models.Model):
{'fraction_non_alphanumeric': 0.05572565829761176, 'fraction_numerical': 0.001837109614206981, 'mean_word_length': 3.84, 'pattern_counts': {'":': 12, '<': 4, '<?xml version=': 0, '>': 4, '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': '6566821', 'n_tokens_mistral': 845, 'n_tokens_neox': 823, 'n_words': 283}