<commit_before>from core.models.size import Size
from rest_framework import serializers


class ProviderSizeSerializer(serializers.ModelSerializer):
    occupancy = serializers.CharField(read_only=True, source='esh_occupancy')
    total = serializers.CharField(read_only=True, source='esh_total')
    remaining = serializers.CharField(read_only=True, source='esh_remaining')
    active = serializers.BooleanField(read_only=True, source="active")

    class Meta:
        model = Size
        exclude = ('id', 'start_date', 'end_date')<commit_msg>upgrade ProviderSizeSerializer to DRF3<commit_after>from core.models.size import Size
from rest_framework import serializers


class ProviderSizeSerializer(serializers.ModelSerializer):
    occupancy = serializers.CharField(read_only=True, source='esh_occupancy')
    total = serializers.CharField(read_only=True, source='esh_total')
    remaining = serializers.CharField(read_only=True, source='esh_remaining')
    active = serializers.BooleanField(read_only=True)

    class Meta:
        model = Size
        exclude = ('id', 'start_date', 'end_date')
{'fraction_non_alphanumeric': 0.10181818181818182, 'fraction_numerical': 0.0009090909090909091, 'mean_word_length': 5.672727272727273, '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': '2000816', 'n_tokens_mistral': 318, 'n_tokens_neox': 311, 'n_words': 61}