<commit_before>from sis_provisioner.builders import Builder
from sis_provisioner.dao.user import get_person_by_netid
from sis_provisioner.exceptions import UserPolicyException


class UserBuilder(Builder):
    """
    Generates the import data for the passed list of User models.
    """
    def _process(self, user):
        try:
            person = get_person_by_netid(user.net_id)
            self.add_user_data_for_person(person, force=True)
        except UserPolicyException as err:
            self.logger.info('Skip user %s: %s' % (user.reg_id, err))<commit_msg>handles DFE for building user imports<commit_after>from sis_provisioner.builders import Builder
from sis_provisioner.dao.user import get_person_by_netid
from sis_provisioner.exceptions import UserPolicyException
from restclients.exceptions import DataFailureException


class UserBuilder(Builder):
    """
    Generates the import data for the passed list of User models.
    """
    def _process(self, user):
        try:
            person = get_person_by_netid(user.net_id)
            self.add_user_data_for_person(person, force=True)
        except (UserPolicyException, DataFailureException) as err:
            self.logger.info('Skip user %s: %s' % (user.reg_id, err))
{'fraction_non_alphanumeric': 0.07704654895666131, 'fraction_numerical': 0.0, 'mean_word_length': 3.7234848484848486, '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': '6794708', 'n_tokens_mistral': 374, 'n_tokens_neox': 367, 'n_words': 95}