<commit_before>import datetime
from corehq.apps.reports.generic import GenericTabularReport
from corehq.apps.reports.basic import BasicTabularReport, Column
from corehq.apps.reports.standard import (DatespanMixin,
    ProjectReportParametersMixin, CustomProjectReport)
from corehq.apps.reports.standard.inspect import CaseDisplay, CaseListReport
from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn
from corehq.apps.reports.datatables.DTSortType import NUMERIC
from hsph.reports import HSPHSiteDataMixin
from hsph.fields import NameOfCATIField
from corehq.apps.reports.fields import FilterUsersField, DatespanField
from couchdbkit_aggregate.fn import mean, unique_count
from casexml.apps.case import const
from dimagi.utils.decorators.memoized import memoized
from dimagi.utils.couch.database import get_db

def short_date_format(date):
    return date.strftime('%d-%b')


def username(key, report):
    return report.usernames[key[0]]


def datestring_minus_days(datestring, days):
    date = datetime.datetime.strptime(datestring[:10], '%Y-%m-%d')
    return (date - datetime.timedelta(days=days)).isoformat()


def date_minus_11_days(couchkey):
    return couchkey + [datestring_minus_days(couchkey[0], 11)]


def date_minus_14_days(couchkey):
    return couchkey + [datestring_minus_days(couchkey[0], 14)]


class CATIPerformanceReport(CustomProjectReport, ProjectReportParametersMixin,
                            DatespanMixin, BasicTabularReport):
    name = "CATI Performance Report"
    slug = "cati_performance"
    field_classes = (FilterUsersField, DatespanField, NameOfCATIField)
    group_name = "CATI"
    
    couch_view = "hsph/cati_performance_report"
    
    default_column_order = (
        'catiName',<commit_msg>change group name property to not conflict with group_name from some mixin or other<commit_after>import datetime
from corehq.apps.reports.generic import GenericTabularReport
from corehq.apps.reports.basic import BasicTabularReport, Column
from corehq.apps.reports.standard import (DatespanMixin,
    ProjectReportParametersMixin, CustomProjectReport)
from corehq.apps.reports.standard.inspect import CaseDisplay, CaseListReport
from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn
from corehq.apps.reports.datatables.DTSortType import NUMERIC
from hsph.reports import HSPHSiteDataMixin
from hsph.fields import NameOfCATIField
from corehq.apps.reports.fields import FilterUsersField, DatespanField
from couchdbkit_aggregate.fn import mean, unique_count
from casexml.apps.case import const
from dimagi.utils.decorators.memoized import memoized
from dimagi.utils.couch.database import get_db

def short_date_format(date):
    return date.strftime('%d-%b')


def username(key, report):
    return report.usernames[key[0]]


def datestring_minus_days(datestring, days):
    date = datetime.datetime.strptime(datestring[:10], '%Y-%m-%d')
    return (date - datetime.timedelta(days=days)).isoformat()


def date_minus_11_days(couchkey):
    return couchkey + [datestring_minus_days(couchkey[0], 11)]


def date_minus_14_days(couchkey):
    return couchkey + [datestring_minus_days(couchkey[0], 14)]


class CATIPerformanceReport(CustomProjectReport, ProjectReportParametersMixin,
                            DatespanMixin, BasicTabularReport):
    name = "CATI Performance Report"
    slug = "cati_performance"
    field_classes = (FilterUsersField, DatespanField, NameOfCATIField)
    filter_group_name = "CATI"
    
    couch_view = "hsph/cati_performance_report"
    
    default_column_order = (
        'catiName',
{'fraction_non_alphanumeric': 0.0817347789824854, 'fraction_numerical': 0.007228245760355852, 'mean_word_length': 5.3568904593639575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6408838', 'n_tokens_mistral': 1179, 'n_tokens_neox': 1114, 'n_words': 236}