<commit_before>%section
  .page-header
    %h1
      = Challenge.model_name.human


.row
  .span6
    %h2= @challenge.name
    %p
      %b= Challenge.human_attribute_name :start_date
      =l @challenge.start_date, format: :long
    %p
      %b= Challenge.human_attribute_name :end_date
      =l @challenge.end_date, format: :long
    %p
      %b= Challenge.human_attribute_name :week_days
      = @challenge.week_days
    %table.table.table-striped
      %thead
        %tr
          %th= Challenge.human_attribute_name(:longest_streak)
          %th= Challenge.human_attribute_name(:current_streak)
      %tbody
        %tr
          %td= @challenge.longest_streak(Date.today)
          %td= @challenge.current_streak(Date.today)
  .span6
    = render partial: 'milestones', locals: {milestones: @challenge.milestones}

%br

= link_to t('edit'), edit_challenge_path(@challenge)
\|
= link_to t('back'), challenges_path<commit_msg>add completeness percentage to challenges show view<commit_after>%section
  .page-header
    %h1
      = Challenge.model_name.human


.row
  .span6
    %h2= @challenge.name
    %p
      %b= Challenge.human_attribute_name :start_date
      =l @challenge.start_date, format: :long
    %p
      %b= Challenge.human_attribute_name :end_date
      =l @challenge.end_date, format: :long
    %p
      %b= Challenge.human_attribute_name :week_days
      = @challenge.week_days
    %table.table.table-striped
      %thead
        %tr
          %th= Challenge.human_attribute_name(:completeness)
          %th= Challenge.human_attribute_name(:longest_streak)
          %th= Challenge.human_attribute_name(:current_streak)
      %tbody
        %tr
          %td= number_to_percentage(@challenge.completeness_by_date(Date.today), precision: 1)
          %td= @challenge.longest_streak(Date.today)
          %td= @challenge.current_streak(Date.today)
  .span6
    = render partial: 'milestones', locals: {milestones: @challenge.milestones}

%br

= link_to t('edit'), edit_challenge_path(@challenge)
\|
= link_to t('back'), challenges_path
{'fraction_non_alphanumeric': 0.11527237354085604, 'fraction_numerical': 0.004377431906614786, 'mean_word_length': 3.0813492063492065, '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': '2958392', 'n_tokens_mistral': 731, 'n_tokens_neox': 675, 'n_words': 123}