<commit_before># -*- coding: utf-8 -*-

# Akvo RSR is covered by the GNU Affero General Public License.
# See more details in the license.txt file located at the root folder of the Akvo RSR module.
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.

from indicator import Indicator

from akvo.codelists.models import IndicatorVocabulary
from akvo.codelists.store.codelists_v202 import INDICATOR_VOCABULARY
from akvo.rsr.fields import ValidXMLCharField
from akvo.utils import codelist_choices, codelist_value

from django.db import models
from django.utils.translation import ugettext_lazy as _


class IndicatorReference(models.Model):

    project_relation = 'results__indicators__references__in'


    indicator = models.ForeignKey(Indicator, verbose_name=_(u'indicator'),
                                  related_name='references')
    reference = ValidXMLCharField(
        _(u'reference code'), blank=True, max_length=25,
        help_text=_(u'A code for an indicator defined in the specified vocabulary specified. '
                    u'For more information on the indicator reference, see the '
                    u'<a href="http://iatistandard.org/202/activity-standard/iati-activities/'
                    u'iati-activity/result/indicator/reference/" target="_blank">IATI '
                    u'codelist</a>.'))
    vocabulary = ValidXMLCharField(
        _(u'reference vocabulary'), blank=True, max_length=2,
        choices=codelist_choices(INDICATOR_VOCABULARY),
        help_text=_(u'This is the code for the vocabulary used to describe the sector. Sectors '
                    u'should be mapped to DAC sectors to enable international comparison. '
                    u'For more information on the indicator reference, see the '
                    u'<a href="http://iatistandard.org/202/codelists/IndicatorVocabulary/" '
                    u'target="_blank">IATI codelist</a>.'))
    vocabulary_uri = ValidXMLCharField(
        _(u'reference indicator URI'), blank=True, max_length=1000,<commit_msg>[#3217] Flake8 fix<commit_after># -*- coding: utf-8 -*-

# Akvo RSR is covered by the GNU Affero General Public License.
# See more details in the license.txt file located at the root folder of the Akvo RSR module.
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.

from indicator import Indicator

from akvo.codelists.models import IndicatorVocabulary
from akvo.codelists.store.codelists_v202 import INDICATOR_VOCABULARY
from akvo.rsr.fields import ValidXMLCharField
from akvo.utils import codelist_choices, codelist_value

from django.db import models
from django.utils.translation import ugettext_lazy as _


class IndicatorReference(models.Model):

    project_relation = 'results__indicators__references__in'

    indicator = models.ForeignKey(Indicator, verbose_name=_(u'indicator'),
                                  related_name='references')
    reference = ValidXMLCharField(
        _(u'reference code'), blank=True, max_length=25,
        help_text=_(u'A code for an indicator defined in the specified vocabulary specified. '
                    u'For more information on the indicator reference, see the '
                    u'<a href="http://iatistandard.org/202/activity-standard/iati-activities/'
                    u'iati-activity/result/indicator/reference/" target="_blank">IATI '
                    u'codelist</a>.'))
    vocabulary = ValidXMLCharField(
        _(u'reference vocabulary'), blank=True, max_length=2,
        choices=codelist_choices(INDICATOR_VOCABULARY),
        help_text=_(u'This is the code for the vocabulary used to describe the sector. Sectors '
                    u'should be mapped to DAC sectors to enable international comparison. '
                    u'For more information on the indicator reference, see the '
                    u'<a href="http://iatistandard.org/202/codelists/IndicatorVocabulary/" '
                    u'target="_blank">IATI codelist</a>.'))
    vocabulary_uri = ValidXMLCharField(
        _(u'reference indicator URI'), blank=True, max_length=1000,
{'fraction_non_alphanumeric': 0.0871559633027523, 'fraction_numerical': 0.009415741187831965, 'mean_word_length': 3.077755905511811, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1552086', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1145, 'n_words': 321}