<commit_before><% @page_title = "Results: #{@person.name}: #{@year}" %>

<%= render_page "person_years", :locals => { :person => @person } %>

<%= table :caption => @person.name, :class => "person_results", :id => "person_results", :collection => @event_results do %>
  <tr>
    <th>&nbsp;</th>
    <th>Race</th>
    <th>Category</th>
    <th>Date</th>
  </tr>
  <% @event_results.sort_by(&:event_end_date).reverse.each do |result| -%>
  <tr class="<%= cycle("even", "odd") %>">
    <td class="place right"><%= result.place %></td>
    <td class="standings"><%= link_to(result.event_full_name, event_results_path(:event_id => result.event_id, :anchor => "race_#{result.race_id}")) %></td>
    <td class="category"><%= result.race_name %></td>
    <td class="dates"><%= result.event_date_range_s %></td>
  </tr>
  <%- end -%>
<% end -%>

<% @competition_results.sort_by(&:event_end_date).reverse.each do |result| %>
<br/><br/>
<%= table :caption => link_to("#{result.place.to_i.ordinalize} &mdash; #{result.race_full_name}".html_safe, event_results_path(result.event)).html_safe do %>
  <tr>
    <th>&nbsp;</th>
    <th>Race</th>
    <th>Category</th>
    <th>Date</th>
    <th class="right">Points</th>
  </tr>
  <% result.scores.sort_by(&:source_event_date).each do |score| %>
  <tr class="<%= cycle("even", "odd") %>">
    <td class="place right" width="24"><%= score.source_result.place %></td>
    <td class="standings">
      <%= link_to(score.source_result.event_full_name, 
                  event_results_path(:event_id => score.source_result.event_id, 
                  :anchor => "race_#{score.source_result.race_id}")) unless score.source_result.competition_result? %>
      <%= link_to(score.source_result.race_full_name, 
                  event_person_results_path(:event_id => score.source_result.event_id, :person_id => @person.id, 
                  :anchor => "race_#{score.source_result.race_id}")) if score.source_result.competition_result? %></td>
    <td class="category"><%= score.source_result.race_name %></td>
    <td class="dates"><%= score.source_result.event_date_range_s %></td>
    <td class="right"><%= number_with_precision(score.points, :precision => 1) %></td>
  </tr>
  <% end %>
  <tr>
    <td></td><commit_msg>Add comment about tests<commit_after><% @page_title = "Results: #{@person.name}: #{@year}" %>

<%= render_page "person_years", :locals => { :person => @person } %>

<%= table :caption => @person.name, :class => "person_results", :id => "person_results", :collection => @event_results do %>
  <tr>
    <th>&nbsp;</th>
    <th>Race</th>
    <th>Category</th>
    <th>Date</th>
  </tr>
  <% @event_results.sort_by(&:event_end_date).reverse.each do |result| -%>
  <tr class="<%= cycle("even", "odd") %>">
    <td class="place right"><%= result.place %></td>
    <td class="standings"><%= link_to(result.event_full_name, event_results_path(:event_id => result.event_id, :anchor => "race_#{result.race_id}")) %></td>
    <td class="category"><%= result.race_name %></td>
    <td class="dates"><%= result.event_date_range_s %></td>
  </tr>
  <%- end -%>
<% end -%>

<% @competition_results.sort_by(&:event_end_date).reverse.each do |result| %>
<br/><br/>
<%= table :caption => link_to("#{result.place.to_i.ordinalize} &mdash; #{result.race_full_name}".html_safe, event_results_path(result.event)).html_safe do %>
  <tr>
    <th>&nbsp;</th>
    <th>Race</th>
    <th>Category</th>
    <th>Date</th>
    <th class="right">Points</th>
  </tr>
  <%# FIXME Add test for rendering this page with lots of results %>
  <% result.scores.sort_by(&:source_event_date).each do |score| %>
  <tr class="<%= cycle("even", "odd") %>">
    <td class="place right" width="24"><%= score.source_result.place %></td>
    <td class="standings">
      <%= link_to(score.source_result.event_full_name, 
                  event_results_path(:event_id => score.source_result.event_id, 
                  :anchor => "race_#{score.source_result.race_id}")) unless score.source_result.competition_result? %>
      <%= link_to(score.source_result.race_full_name, 
                  event_person_results_path(:event_id => score.source_result.event_id, :person_id => @person.id, 
                  :anchor => "race_#{score.source_result.race_id}")) if score.source_result.competition_result? %></td>
    <td class="category"><%= score.source_result.race_name %></td>
    <td class="dates"><%= score.source_result.event_date_range_s %></td>
    <td class="right"><%= number_with_precision(score.points, :precision => 1) %></td>
  </tr>
  <% end %>
  <tr>
    <td></td>
{'fraction_non_alphanumeric': 0.21389556478042385, 'fraction_numerical': 0.0013109023377758358, 'mean_word_length': 4.126539753639418, 'pattern_counts': {'":': 0, '<': 146, '<?xml version=': 0, '>': 176, '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': '3289700', 'n_tokens_mistral': 1739, 'n_tokens_neox': 1633, 'n_words': 265}