<commit_before>json.total @articles.total_entries
json.total_pages (@articles.total_entries.to_f / @articles.per_page).ceil
json.page @articles.total_entries > 0 ? @articles.current_page : 0
json.error @error

json.data @articles do |article|
  json.cache! ['v5', article], skip_digest: true do
    json.(article, :doi, :title, :issued, :canonical_url, :pmid, :pmcid, :mendeley_uuid, :viewed, :saved, :discussed, :cited, :update_date)

    unless params[:info] == "summary"
      json.sources article.filtered_retrieval_statuses do |rs|
        json.cache! ['v5', rs, params[:info]], skip_digest: true do
          json.(rs, :name, :display_name, :group_name, :events_url, :by_day, :by_month, :by_year, :update_date)
          json.metrics rs.new_metrics
          json.events rs.events_csl if params[:info] == "detail"
        end
      end
    end
  end
end<commit_msg>show events and events_csl in article detail view<commit_after>json.total @articles.total_entries
json.total_pages (@articles.total_entries.to_f / @articles.per_page).ceil
json.page @articles.total_entries > 0 ? @articles.current_page : 0
json.error @error

json.data @articles do |article|
  json.cache! ['v5', article], skip_digest: true do
    json.(article, :doi, :title, :issued, :canonical_url, :pmid, :pmcid, :mendeley_uuid, :viewed, :saved, :discussed, :cited, :update_date)

    unless params[:info] == "summary"
      json.sources article.filtered_retrieval_statuses do |rs|
        json.cache! ['v5', rs, params[:info]], skip_digest: true do
          json.(rs, :name, :display_name, :group_name, :events_url, :by_day, :by_month, :by_year, :update_date)
          json.metrics rs.new_metrics
          json.(rs, :events, :events_csl) if params[:info] == "detail"
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.13733183856502243, 'fraction_numerical': 0.004484304932735426, 'mean_word_length': 4.014044943820225, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1681494', 'n_tokens_mistral': 635, 'n_tokens_neox': 602, 'n_words': 147}