<commit_before># -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

from __future__ import unicode_literals

from django.db import models

from crashsubmit import models as submit_models

class ProcessedCrash(models.Model):
    crash_id = models.ForeignKey(submit_models.UploadedCrash,
            to_field = 'crash_id')

    # OS info
    LINUX = 'linux'
    WINDOWS = 'windows'
    OSX = 'osx'
    ANDROID = 'android'
    IOS = 'ios'
    OS_NAMES = (
            (LINUX, 'linux'),
            (WINDOWS, 'windows'),
            (OSX, 'osx'),
            (ANDROID, 'android'),
            (IOS, 'ios')
            )
    os_name = models.CharField(max_length=10,
            choices=OS_NAMES)

    os_detail = models.CharField(max_length=100,
            default='')

    # CPU info
    cpu_architecture = models.CharField(max_length=20)
<commit_msg>change to a OneToOne field<commit_after># -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

from __future__ import unicode_literals

from django.db import models

from crashsubmit import models as submit_models

class ProcessedCrash(models.Model):
    crash_id = models.OneToOneField(submit_models.UploadedCrash,
            to_field = 'crash_id')

    # OS info
    LINUX = 'linux'
    WINDOWS = 'windows'
    OSX = 'osx'
    ANDROID = 'android'
    IOS = 'ios'
    OS_NAMES = (
            (LINUX, 'linux'),
            (WINDOWS, 'windows'),
            (OSX, 'osx'),
            (ANDROID, 'android'),
            (IOS, 'ios')
            )
    os_name = models.CharField(max_length=10,
            choices=OS_NAMES)

    os_detail = models.CharField(max_length=100,
            default='')

    # CPU info
    cpu_architecture = models.CharField(max_length=20)

{'fraction_non_alphanumeric': 0.11651376146788991, 'fraction_numerical': 0.011926605504587157, 'mean_word_length': 2.4896, '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': '2873486', 'n_tokens_mistral': 743, 'n_tokens_neox': 712, 'n_words': 196}