<commit_before><%=
@xml.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8"
@xml.Workbook({
  'xmlns'      => "urn:schemas-microsoft-com:office:spreadsheet",
  'xmlns:o'    => "urn:schemas-microsoft-com:office:office",
  'xmlns:x'    => "urn:schemas-microsoft-com:office:excel",
  'xmlns:html' => "http://www.w3.org/TR/REC-html40",
  'xmlns:ss'   => "urn:schemas-microsoft-com:office:spreadsheet"
  }) do

  @xml.Styles do
   @xml.Style 'ss:ID' => 'Default', 'ss:Name' => 'Normal' do
     @xml.Alignment 'ss:Vertical' => 'Top', 'ss:WrapText' => '1'
     @xml.Borders
     @xml.Font 'ss:FontName' => 'Verdana'
     @xml.Interior
     @xml.NumberFormat
     @xml.Protection
   end
   @xml.Style 'ss:ID' => 's62', 'ss:Name' => 'Header' do
     @xml.Font  'ss:Color'=>'#FFFFFF', 'ss:Bold'=>"1"
     @xml.Interior 'ss:Color'=>"#000000", 'ss:Pattern'=>'Solid'
   end
  end

# Requirements

  @xml.Worksheet 'ss:Name' => 'Requirements' do
    @xml.Table do
      # Columns width
      for width in ['30','130','430','120','120','120','120'] do
        @xml.Column nil, {'ss:Width' => width}
      end

      # Header
      @xml.Row 'ss:StyleID' => 's62' do
        for column in ['ID','Short Name', 'Requirement','Status', 'Type', 'Wave', 'Source'] do
          @xml.Cell do
            @xml.Data column, 'ss:Type' => 'String'
            @xml.NamedCell 'ss:Name' => 'FilterDatabase'
          end
        end
      end

      # Rows
      for r in @reqs
        style = {}
        #style = {'ss:StyleID' => 's75'} if p.done==1
        @xml.Row(style) do
          for column in ['id', 'short_name', 'description', 'status_name', 'req_category.label', 'req_wave.name', 'source_name'] do
            @xml.Cell do
              @xml.Data cascade_send(r, column), 'ss:Type' => 'String'; @xml.NamedCell 'ss:Name' => 'FilterDatabase'
            end
          end
        end
      end

    end
  @xml.AutoFilter 'x:Range' => 'R1C1:R2000C7', 'xmlns' => 'urn:schemas-microsoft-com:office:excel'
  end

end
%>
<commit_msg>adding a column to the req excel export<commit_after><%=
@xml.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8"
@xml.Workbook({
  'xmlns'      => "urn:schemas-microsoft-com:office:spreadsheet",
  'xmlns:o'    => "urn:schemas-microsoft-com:office:office",
  'xmlns:x'    => "urn:schemas-microsoft-com:office:excel",
  'xmlns:html' => "http://www.w3.org/TR/REC-html40",
  'xmlns:ss'   => "urn:schemas-microsoft-com:office:spreadsheet"
  }) do

  @xml.Styles do
   @xml.Style 'ss:ID' => 'Default', 'ss:Name' => 'Normal' do
     @xml.Alignment 'ss:Vertical' => 'Top', 'ss:WrapText' => '1'
     @xml.Borders
     @xml.Font 'ss:FontName' => 'Verdana'
     @xml.Interior
     @xml.NumberFormat
     @xml.Protection
   end
   @xml.Style 'ss:ID' => 's62', 'ss:Name' => 'Header' do
     @xml.Font  'ss:Color'=>'#FFFFFF', 'ss:Bold'=>"1"
     @xml.Interior 'ss:Color'=>"#000000", 'ss:Pattern'=>'Solid'
   end
  end

# Requirements

  @xml.Worksheet 'ss:Name' => 'Requirements' do
    @xml.Table do
      # Columns width
      for width in ['30','130','130','430','120','120','120','120'] do
        @xml.Column nil, {'ss:Width' => width}
      end

      # Header
      @xml.Row 'ss:StyleID' => 's62' do
        for column in ['ID','Source ID','Short Name', 'Requirement','Status', 'Type', 'Wave', 'Source'] do
          @xml.Cell do
            @xml.Data column, 'ss:Type' => 'String'
            @xml.NamedCell 'ss:Name' => 'FilterDatabase'
          end
        end
      end

      # Rows
      for r in @reqs
        style = {}
        #style = {'ss:StyleID' => 's75'} if p.done==1
        @xml.Row(style) do
          for column in ['id','source_identifier', 'short_name', 'description', 'status_name', 'req_category.label', 'req_wave.name', 'source_name'] do
            @xml.Cell do
              @xml.Data cascade_send(r, column), 'ss:Type' => 'String'; @xml.NamedCell 'ss:Name' => 'FilterDatabase'
            end
          end
        end
      end

    end
  @xml.AutoFilter 'x:Range' => 'R1C1:R2000C7', 'xmlns' => 'urn:schemas-microsoft-com:office:excel'
  end

end
%>

{'fraction_non_alphanumeric': 0.1963235294117647, 'fraction_numerical': 0.02426470588235294, 'mean_word_length': 2.7682363804247463, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 64}, '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': '6020122', 'n_tokens_mistral': 1588, 'n_tokens_neox': 1482, 'n_words': 296}