<commit_before><% @page_title = 'Check Headers' %>
<% if @import_job.failed? %>
<div class="row-fluid">
  <%= render(:partial => "import_jobs/issues", :locals => { :issues => @import_job.validation_issues, :issue_type => :headers}) %>
  <%= link_to("Discard Dataset", {:action => 'delete', :id => @import_job.csv_dataset.id}, :class => 'btn btn-danger', :method => :delete) %>
</div>
<% elsif @import_job.validated_headers? %>
<div class="row-fluid">
  <p class="alert alert-success">Headers are valid in <%= @import_job.file_name %>, continue to parse rows</p>
</div>
<div class="row-fluid">
  <%= link_to("Next", next_wizard_path, :class => 'btn') %>
</div>
<% elsif @import_job.running? || @import_job.counted_rows? %>
<div class="row-fluid">
  <p class="alert alert-info">Validating Headers, reload to check status</p>
</div>
<div class="row-fluid">
  <%= link_to("Reload", wizard_path, :class => 'btn') %>
</div>
<% end %>
<commit_msg>Warn about extra headers on import and allow deletion<commit_after><% @page_title = 'Check Headers' %>
<% if @import_job.failed? %>
<div class="row-fluid">
  <%= render(:partial => "import_jobs/issues", :locals => { :issues => @import_job.validation_issues, :issue_type => :headers}) %>
  <%= link_to("Discard Dataset", {:action => 'delete', :id => @import_job.csv_dataset.id}, :class => 'btn btn-danger', :method => :delete) %>
</div>
<% elsif @import_job.validated_headers? %>
<div class="row-fluid">
  <% if @import_job.has_extra_headers? %>
  <p class="alert alert-warning">Warning: Additional headers found in CSV file</p>
    <p>The following columns in your CSV file were not found in the selected import config:</p>
    <ul>
    <% @import_job.extra_headers.each do |extra_header| %>
      <li><%= extra_header %></li>
    <% end %>
    </ul>
    <p>Data in these columns will be ignored.  If you believe this is an error, please check for typographical and case errors in both your CSV file and import config.</p>
    <div class="row-fluid">
      <%= link_to("Continue", next_wizard_path, :class => 'btn') %>
      <%= link_to("Discard Dataset", {:action => 'delete', :id => @import_job.csv_dataset.id}, :class => 'btn btn-danger', :method => :delete) %>
    </div>
  <% else %>
    <p class="alert alert-success">Headers are valid in <%= @import_job.file_name %>, continue to parse rows</p>
    <div class="row-fluid">
      <%= link_to("Next", next_wizard_path, :class => 'btn') %>
    </div>
<% end %>
</div>
<% elsif @import_job.running? || @import_job.counted_rows? %>
<div class="row-fluid">
  <p class="alert alert-info">Validating Headers, reload to check status</p>
</div>
<div class="row-fluid">
  <%= link_to("Reload", wizard_path, :class => 'btn') %>
</div>
<% end %>

{'fraction_non_alphanumeric': 0.20073260073260074, 'fraction_numerical': 0.0, 'mean_word_length': 4.701461377870563, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 96, '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': '4145734', 'n_tokens_mistral': 1001, 'n_tokens_neox': 924, 'n_words': 236}