<commit_before>unless user.respond_to?(:statistics) && user.respond_to?(:top_user_topics) then
  user = Queries::UsersByIds.new(user_ids: [user.id]).call.first

  logger.warn "Tried to render user_partial with incomplete dead user (username: #{user.username})"
end

json.id                            user.id.to_s
json.name                          user.name
json.username                      user.username
json.gravatar_hash                 user.gravatar_hash
json.statistics_created_fact_count user.statistics[:created_fact_count]
json.statistics_follower_count     user.statistics[:follower_count]
json.statistics_following_count    user.statistics[:following_count]

json.deleted true if user.deleted

json.user_topics do
  json.partial! 'topics/user_topics', user_topics: user.top_user_topics
end
<commit_msg>Use Raven.captureMessage instead of Logger<commit_after>unless user.respond_to?(:statistics) && user.respond_to?(:top_user_topics) then
  user = Queries::UsersByIds.new(user_ids: [user.id]).call.first

  Raven.captureMessage "Tried to render user_partial with incomplete dead user (username: #{user.username})"
end

json.id                            user.id.to_s
json.name                          user.name
json.username                      user.username
json.gravatar_hash                 user.gravatar_hash
json.statistics_created_fact_count user.statistics[:created_fact_count]
json.statistics_follower_count     user.statistics[:follower_count]
json.statistics_following_count    user.statistics[:following_count]

json.deleted true if user.deleted

json.user_topics do
  json.partial! 'topics/user_topics', user_topics: user.top_user_topics
end

{'fraction_non_alphanumeric': 0.08693045563549161, 'fraction_numerical': 0.0, 'mean_word_length': 3.535326086956522, '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': '517032', 'n_tokens_mistral': 517, 'n_tokens_neox': 503, 'n_words': 92}