<commit_before>from datetime import datetime, timedelta
from pytz import utc

from django.conf import settings
from django.core.management.base import NoArgsCommand
from django.db import connection
from django.db.models import Q
from django.core import mail


from projects.models import Project
from users.models import User
from contributions.models import Observation

class Command(NoArgsCommand):
    def handle_noargs(self,**options):
        try:
            self.daily_digest()
        except Exception, e:
            print e
        finally:
            connection.close()

    def get_updated_projects(self, yesterday):
        """
        Returns all projects that where updated during the previous day
        """
        projects = Project.objects.filter(status='active')<commit_msg>Improve code coverage<commit_after>from datetime import datetime, timedelta
from pytz import utc

from django.conf import settings
from django.core.management.base import NoArgsCommand
from django.db import connection
from django.db.models import Q
from django.core import mail


from projects.models import Project
from users.models import User
from contributions.models import Observation

class Command(NoArgsCommand):
    def get_updated_projects(self, yesterday):
        """
        Returns all projects that where updated during the previous day
        """
        projects = Project.objects.filter(status='active')
{'fraction_non_alphanumeric': 0.061971830985915494, 'fraction_numerical': 0.0, 'mean_word_length': 3.6286644951140063, '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': '3388334', 'n_tokens_mistral': 346, 'n_tokens_neox': 337, 'n_words': 128}