<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 rest_framework import serializers
from akvo.rsr.models import OrganisationLocation
from ..fields import Base64ImageField
from .country import CountrySerializer
from .rsr_serializer import BaseRSRSerializer


class OrganisationLocationSerializer(BaseRSRSerializer):

    class Meta:
        model = OrganisationLocation


class OrganisationLocationExtraSerializer(OrganisationLocationSerializer):

    class Meta(OrganisationLocationSerializer.Meta):
        depth = 1


class MapOrganisationSerializer(serializers.Serializer):

    """To serialize the organisation field of the organisation map resource."""

    id = serializers.IntegerField()
    name = serializers.CharField()
    url = serializers.URLField(source='get_absolute_url')
    logo = Base64ImageField(required=False, allow_empty_file=True)


class MapOrganisationLocationSerializer(serializers.Serializer):

    """To serialize the project map resource."""

    id = serializers.IntegerField()
    latitude = serializers.FloatField()<commit_msg>[#1521] Small update to docstring<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 rest_framework import serializers
from akvo.rsr.models import OrganisationLocation
from ..fields import Base64ImageField
from .country import CountrySerializer
from .rsr_serializer import BaseRSRSerializer


class OrganisationLocationSerializer(BaseRSRSerializer):

    class Meta:
        model = OrganisationLocation


class OrganisationLocationExtraSerializer(OrganisationLocationSerializer):

    class Meta(OrganisationLocationSerializer.Meta):
        depth = 1


class MapOrganisationSerializer(serializers.Serializer):

    """To serialize the organisation field of the organisation map resource."""

    id = serializers.IntegerField()
    name = serializers.CharField()
    url = serializers.URLField(source='get_absolute_url')
    logo = Base64ImageField(required=False, allow_empty_file=True)


class MapOrganisationLocationSerializer(serializers.Serializer):

    """To serialize the organisation map resource."""

    id = serializers.IntegerField()
    latitude = serializers.FloatField()
{'fraction_non_alphanumeric': 0.07814269535673839, 'fraction_numerical': 0.00604001510003775, 'mean_word_length': 4.9284116331096195, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4250947', 'n_tokens_mistral': 690, 'n_tokens_neox': 650, 'n_words': 215}