<commit_before>FactoryGirl.define do
  factory :user do
    transient do
      community nil
    end

    first_name { Faker::Name.first_name }
    last_name { Faker::Name.last_name }
    sequence(:email) { |n| "<EMAIL>" }
    sequence(:google_email) { |n| "<EMAIL>" }

    household do
      attribs = {with_members: false} # Don't want to create extra users.
      attribs[:community] = community if community
      build(:household, attribs)
    end

    %i(admin cluster_admin super_admin biller photographer).each do |role|
      factory role do
        after(:create) do |user|
          user.add_role(role)
        end
      end
    end

    trait :inactive do<commit_msg>Fixed user factory<commit_after>FactoryGirl.define do
  factory :user do
    transient do
      community nil
    end

    first_name { Faker::Name.first_name }
    last_name { Faker::Name.last_name }
    sequence(:email) { |n| "<EMAIL>" }
    sequence(:google_email) { |n| "<EMAIL>" }
    mobile_phone "5555551212"

    household do
      attribs = {with_members: false} # Don't want to create extra users.
      attribs[:community] = community if community
      build(:household, attribs)
    end

    %i(admin cluster_admin super_admin biller photographer).each do |role|
      factory role do
        after(:create) do |user|
          user.add_role(role)
        end
      end
    end

    trait :inactive do
{'fraction_non_alphanumeric': 0.09763101220387653, 'fraction_numerical': 0.007178750897343862, 'mean_word_length': 2.658792650918635, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3078619', 'n_tokens_mistral': 448, 'n_tokens_neox': 431, 'n_words': 119}