<commit_before><!DOCTYPE html>
<html lang="en">
<!--
  Copyright (c) 2016 The Hyve B.V.
  This code is licensed under the GNU Affero General Public License as
  published by the Free Software Foundation, version 3,
  or (at your option) any later version.
-->

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="<KEY>" crossorigin="anonymous">
  <style type="text/css">
  </style>
  <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <![endif]-->
  <title>cBioPortal validation report: study in '{{ study_dir }}'</title>
</head>

<body>
  <script src="http://code.jquery.com/jquery-1.12.1.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="<KEY>" crossorigin="anonymous"></script>
  <div class="container">
    <div class="header">
      <h1>cBioPortal validation report</h1>
      <div class="jumbotron">
        <p>Study directory:<br />{{ study_dir }}</p>
        <p>For details, please see <a href='https://github.com/cbioportal/cbioportal/wiki/File%20Formats'>the documentation on file formats supported by cBioPortal</a></p>
      </div>
    </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">Legend</h4>
      </div>
      <div class="panel-body">
        <p>
	  Click on a filename below to see a table of messages about the data
	  in the file. The colors in the tables have the following meanings:
        </p>
        <table class="table">
          <tbody>
            <tr class="danger"><td><strong>Error:</strong> cBioPortal will not know how to load this, please revise or remove</td></tr>
            <tr class="warning"><td><strong>Warning:</strong> possible cause of confusion, please check whether this is intended</td></tr>
            <tr class="success"><td><strong>Info:</strong> this looks good, no action required (filename header will be green)</td></tr>
            <tr class="info"><td><strong>Verbose output:</strong> details on the progress of the validation script</td></tr>
          </tbody>
        </table>
      </div>
    </div>

    {% if max_level in ['ERROR','CRITICAL'] %}
      {% set study_level = 'danger' %}
    {% elif max_level == 'WARNING' %}
      {% set study_level = 'warning' %}
    {% elif max_level == 'INFO' %}
      {% set study_level = 'success' %}
    {% else %}
      {% set study_level = 'info' %}
    {% endif %}
    <div class="alert alert-{{ study_level }}">
      Validation status:
      <strong>
      {% if study_level == 'danger' %}
        Failed
      {% elif study_level == 'warning' %}
        Please check
      {% elif study_level == 'success' %}
        Success
      {% else %}
        Unknown
      {% endif %}
      </strong>
    </div>

    <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
    {% macro generate_group_html(filename, file_record_list) %}
      {% set file_level_list = file_record_list|map(attribute='levelname')|list %}
      {% if 'ERROR' in file_level_list or 'CRITICAL' in file_level_list %}
        {% set file_level = 'danger' %}
      {% elif 'WARNING' in file_level_list %}
        {% set file_level = 'warning' %}
      {# I can't think of a way to check if any values are not INFO right now #}
      {% elif 'INFO' in file_level_list %}
        {% set file_level = 'success' %}
      {% else %}
        {% set file_level = 'info' %}
      {% endif %}
      <div class="panel panel-{{ file_level }}">
        <div class="panel-heading" role="tab"
             {{ {'id': 'heading_%s'|format(filename.__hash__())}|xmlattr }}>
          <a role="button" data-toggle="collapse" aria-expanded="true"
             data-parent="#accordion"
             {{ {'href': '#collapse_%s'|format(filename.__hash__()),
                 'aria-controls': 'collapse_%s'|format(filename.__hash__())}|xmlattr }}>
            <span class="label label-{{ file_level }}" style="float: right;">{{ file_level_list|length }}</span>
            <h4 class="panel-title">{{ filename|e }}</h4>
          </a>
        </div>
        <div class="panel-collapse collapse" role="tabpanel"
             {{ {'id':  'collapse_%s'|format(filename.__hash__()),
                 'aria-labelledby': 'heading_%s'|format(filename.__hash__())}|xmlattr }}>
          <div class="panel-body">
            <table class="table">
            <thead>
              <tr>
                <th>Line Number</th>
                <th>Column Number</th>
                <th>Message</th>
                <th>Value Encountered</th>
              </tr>
            </thead>
            <tbody>
              {% for record in file_record_list %}
              {% if record.levelname  == 'ERROR' or record.levelname == 'CRITICAL' %}
                {% set record_class = 'danger' %}
              {% elif record.levelname == 'WARNING' %}
                {% set record_class = 'warning' %}
              {% elif record.levelname == 'INFO' %}
                {% set record_class = 'success' %}
              {% else %}<commit_msg>Allow multiple file tabs to be uncollapsed simultaneously<commit_after><!DOCTYPE html>
<html lang="en">
<!--
  Copyright (c) 2016 The Hyve B.V.
  This code is licensed under the GNU Affero General Public License as
  published by the Free Software Foundation, version 3,
  or (at your option) any later version.
-->

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="<KEY>" crossorigin="anonymous">
  <style type="text/css">
  </style>
  <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <![endif]-->
  <title>cBioPortal validation report: study in '{{ study_dir }}'</title>
</head>

<body>
  <script src="http://code.jquery.com/jquery-1.12.1.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="<KEY>" crossorigin="anonymous"></script>
  <div class="container">
    <div class="header">
      <h1>cBioPortal validation report</h1>
      <div class="jumbotron">
        <p>Study directory:<br />{{ study_dir }}</p>
        <p>For details, please see <a href='https://github.com/cbioportal/cbioportal/wiki/File%20Formats'>the documentation on file formats supported by cBioPortal</a></p>
      </div>
    </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">Legend</h4>
      </div>
      <div class="panel-body">
        <p>
	  Click on a filename below to see a table of messages about the data
	  in the file. The colors in the tables have the following meanings:
        </p>
        <table class="table">
          <tbody>
            <tr class="danger"><td><strong>Error:</strong> cBioPortal will not know how to load this, please revise or remove</td></tr>
            <tr class="warning"><td><strong>Warning:</strong> possible cause of confusion, please check whether this is intended</td></tr>
            <tr class="success"><td><strong>Info:</strong> this looks good, no action required (filename header will be green)</td></tr>
            <tr class="info"><td><strong>Verbose output:</strong> details on the progress of the validation script</td></tr>
          </tbody>
        </table>
      </div>
    </div>

    {% if max_level in ['ERROR','CRITICAL'] %}
      {% set study_level = 'danger' %}
    {% elif max_level == 'WARNING' %}
      {% set study_level = 'warning' %}
    {% elif max_level == 'INFO' %}
      {% set study_level = 'success' %}
    {% else %}
      {% set study_level = 'info' %}
    {% endif %}
    <div class="alert alert-{{ study_level }}">
      Validation status:
      <strong>
      {% if study_level == 'danger' %}
        Failed
      {% elif study_level == 'warning' %}
        Please check
      {% elif study_level == 'success' %}
        Success
      {% else %}
        Unknown
      {% endif %}
      </strong>
    </div>

    <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
    {% macro generate_group_html(filename, file_record_list) %}
      {% set file_level_list = file_record_list|map(attribute='levelname')|list %}
      {% if 'ERROR' in file_level_list or 'CRITICAL' in file_level_list %}
        {% set file_level = 'danger' %}
      {% elif 'WARNING' in file_level_list %}
        {% set file_level = 'warning' %}
      {# I can't think of a way to check if any values are not INFO right now #}
      {% elif 'INFO' in file_level_list %}
        {% set file_level = 'success' %}
      {% else %}
        {% set file_level = 'info' %}
      {% endif %}
      <div class="panel panel-{{ file_level }}">
        <div class="panel-heading" role="tab"
             {{ {'id': 'heading_%s'|format(filename.__hash__())}|xmlattr }}>
          <a role="button" data-toggle="collapse" aria-expanded="true"
             {{ {'href': '#collapse_%s'|format(filename.__hash__()),
                 'aria-controls': 'collapse_%s'|format(filename.__hash__())}|xmlattr }}>
            <span class="label label-{{ file_level }}" style="float: right;">{{ file_level_list|length }}</span>
            <h4 class="panel-title">{{ filename|e }}</h4>
          </a>
        </div>
        <div class="panel-collapse collapse" role="tabpanel"
             {{ {'id':  'collapse_%s'|format(filename.__hash__()),
                 'aria-labelledby': 'heading_%s'|format(filename.__hash__())}|xmlattr }}>
          <div class="panel-body">
            <table class="table">
            <thead>
              <tr>
                <th>Line Number</th>
                <th>Column Number</th>
                <th>Message</th>
                <th>Value Encountered</th>
              </tr>
            </thead>
            <tbody>
              {% for record in file_record_list %}
              {% if record.levelname  == 'ERROR' or record.levelname == 'CRITICAL' %}
                {% set record_class = 'danger' %}
              {% elif record.levelname == 'WARNING' %}
                {% set record_class = 'warning' %}
              {% elif record.levelname == 'INFO' %}
                {% set record_class = 'success' %}
              {% else %}
{'fraction_non_alphanumeric': 0.16733907940583165, 'fraction_numerical': 0.006235099944984412, 'mean_word_length': 2.586649128576126, 'pattern_counts': {'":': 0, '<': 219, '<?xml version=': 0, '>': 219, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '829735', 'n_tokens_mistral': 3527, 'n_tokens_neox': 3288, 'n_words': 792}