<commit_before><p id="notice"><%= @notice %></p>

<%= render 'dataset_metadata' %>


<% if @dataset.aips.size == 0 %>
    <p>The researcher has not yet deposited the data.</p>
<% else %>
    <% if @dataset.dips.size == 0 %>

        <p>We need to prepare this data for download. Please provide your email address below and we will contact
          you as soon as the download is ready.</p>
        <p>
          <%= render 'form_email' %>
        </p>
    <% else %>
        <% if @dataset.dips.first.dip_status != 'UPLOADED' %>
            <p>We are preparing this data for download. Please provide your email address to be alerted once the
              data becomes available.</p>
            <p>
              <%= render 'form_email' %>
            </p>

        <% else %>
            <h3>Download the Data</h3>
            <h4>As a zip file</h4>
            <p><%= link_to "Download zip", format: :zip %></p>
            <h4>As individual files</h4>
            <% @dip_files.each do |key, file| %>
                 <%= link_to file[:file_path], file[:file_uri] %> <br/>
            <% end %>
        <% end %>
    <% end %>
<% end %><commit_msg>if there are no files in the dip, for whatever reason, now present message saying so rather than giving zip download option and individual file download option<commit_after><p id="notice"><%= @notice %></p>

<%= render 'dataset_metadata' %>


<% if @dataset.aips.size == 0 %>
    <p>The researcher has not yet deposited the data.</p>
<% else %>
    <% if @dataset.dips.size == 0 %>

        <p>We need to prepare this data for download. Please provide your email address below and we will contact
          you as soon as the download is ready.</p>
        <p>
          <%= render 'form_email' %>
        </p>
    <% else %>
        <% if @dataset.dips.first.dip_status != 'UPLOADED' %>
            <p>We are preparing this data for download. Please provide your email address to be alerted once the
              data becomes available.</p>
            <p>
              <%= render 'form_email' %>
            </p>

        <% else %>
            <h3>Download the Data</h3>
            <% if @dip_files.length > 0 %>
                <h4>As a zip file</h4>
                <p><%= link_to "Download zip", format: :zip %></p>
                <h4>As individual files</h4>
                <% @dip_files.each do |key, file| %>
                    <%= link_to file[:file_path], file[:file_uri] %> <br/>
                <% end %>
            <% else %>
                <p>There are currently no downloadable files</p>
            <% end %>
        <% end %>
    <% end %>
<% end %>
{'fraction_non_alphanumeric': 0.14535768645357686, 'fraction_numerical': 0.006468797564687975, 'mean_word_length': 1.8087606837606838, 'pattern_counts': {'":': 0, '<': 84, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 13, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '341329', 'n_tokens_mistral': 847, 'n_tokens_neox': 750, 'n_words': 255}