<commit_before>{% extends "/pyshop/layout.html" %}

{% block subnav %}
    <a href="{{ route_url('list_package')}}">
        {% trans %}package{% endtrans %}
    </a>
    <h2>{{package.name}} {{release.version}}</h2>
{% endblock %}

{% block toolbar %}
        {% set display = 0 %}
        {% for r in package.sorted_releases %}
            {% if r.id == release.id %}
                {% set idx = loop.index0 %}
                {% set display = 1%}
                {% if idx > 0 %}
                    <a href="{{ route_url('show_package_version',
                        package_name=package.name,
                        release_version=package.sorted_releases[0].version)}}">
                        {{package.sorted_releases[0].version}}
                    </a>
                    ...
                {% endif %}
            {% endif %}
            {% if display and loop.index <= idx + 10 %}
                <a href="{{ route_url('show_package_version', package_name=package.name, release_version=r.version)}}">
                    {{r.version}}
                </a>
            {% endif %}
            {% if loop.last and idx + 10 < loop.index %}
                ...
            {% endif %}
        {% endfor %}
{% endblock %}

{% block main %}
<section id="release-download" class="release-download">
    <h5>download</h5>
    <a class="anchor" href="#release-files">&darr;</a>
    {% for f in release.files %}
        {% if f.package_type == 'sdist' %}
            <a class="download"
               href="{{ route_url('repository', file_id=f.id, filename=f.filename)
                       }}#{{ f.md5_digest }}">{{f.filename}}</a>
        {% endif %}
    {% endfor %}
</section>


<section id="release-summary" class="release-summary">
    <h5> {{ release.summary }} </h5>
    <ul class="classifiers">
        {% for c in release.classifiers %}
            {% if not c.childs %}
                <li>{{c.name}}</li>
            {% endif %}
        {% endfor %}
    </ul>
    <div> {{ parse_rest(release.description) }} </div>
</section>

<section id="release-files" class="release-files">
    <h5>{% trans %}release files{% endtrans %}</h5>
    <table>
        <colgroup>
            <col class="label"></col>
            <col class="version"></col>
            <col class="author"></col>
            <col class="download"></col>
        </colgroup>
        <tr>
            <th>{% trans %} files {% endtrans %}</th>
            <th>{% trans %} version {% endtrans %}</th>
            <th>{% trans %} author {% endtrans %}</th>
            <th>{% trans %} downloads {% endtrans %}</th>
        </tr>
        {% for release in package.sorted_releases %}
        <tr>
            <td>
                {% for f in release.files %}
                    <a class="download"
                       href="{{ route_url('repository', file_id=f.id,
                                filename=f.filename)
                               }}#{{ f.md5_digest }}">{{f.filename}}
                    </a>
                {% endfor %}
            </td>
            <td class="num">
                v{{ release.version }}
            </td>
            <td>
                {{ release.author.login }}
            </td>
            <td class="num">{{ release.downloads }}</td>
        </tr>
        {% endfor %}
    </table>
</section
{% endblock %}<commit_msg>Display release file of current release on a package show route<commit_after>{% extends "/pyshop/layout.html" %}

{% block subnav %}
    <a href="{{ route_url('list_package')}}">
        {% trans %}package{% endtrans %}
    </a>
    <h2>{{package.name}} {{release.version}}</h2>
{% endblock %}

{% block toolbar %}
        {% set display = 0 %}
        {% for r in package.sorted_releases %}
            {% if r.id == release.id %}
                {% set idx = loop.index0 %}
                {% set display = 1%}
                {% if idx > 0 %}
                    <a href="{{ route_url('show_package_version',
                        package_name=package.name,
                        release_version=package.sorted_releases[0].version)}}">
                        {{package.sorted_releases[0].version}}
                    </a>
                    ...
                {% endif %}
            {% endif %}
            {% if display and loop.index <= idx + 10 %}
                <a href="{{ route_url('show_package_version', package_name=package.name, release_version=r.version)}}">
                    {{r.version}}
                </a>
            {% endif %}
            {% if loop.last and idx + 10 < loop.index %}
                ...
            {% endif %}
        {% endfor %}
{% endblock %}

{% block main %}
<section id="release-download" class="release-download">
    <h5>download</h5>
    <a class="anchor" href="#release-files">&darr;</a>
    {% for f in release.files %}
        {% if f.package_type == 'sdist' %}
            <a class="download"
               href="{{ route_url('repository', file_id=f.id, filename=f.filename)
                       }}#{{ f.md5_digest }}">{{f.filename}}</a>
        {% endif %}
    {% endfor %}
</section>


<section id="release-summary" class="release-summary">
    <h5> {{ release.summary }} </h5>
    <ul class="classifiers">
        {% for c in release.classifiers %}
            {% if not c.childs %}
                <li>{{c.name}}</li>
            {% endif %}
        {% endfor %}
    </ul>
    <div> {{ parse_rest(release.description) }} </div>
</section>

<section id="release-files" class="release-files">
    <h5>{% trans %}release files{% endtrans %}</h5>
    <table>
        <colgroup>
            <col class="label"></col>
            <col class="version"></col>
            <col class="author"></col>
            <col class="download"></col>
        </colgroup>
        <tr>
            <th>{% trans %} files {% endtrans %}</th>
            <th>{% trans %} version {% endtrans %}</th>
            <th>{% trans %} author {% endtrans %}</th>
            <th>{% trans %} downloads {% endtrans %}</th>
        </tr>
        {% for file in release.files %}
        <tr>
            <td>
                <a class="download"
                   href="{{ route_url('repository', file_id=file.id,
                            filename=file.filename)
                           }}#{{ file.md5_digest }}">{{file.filename}}
                </a>
            </td>
            <td class="num">
                v{{ release.version }}
            </td>
            <td>
                {{ release.author.login }}
            </td>
            <td class="num">{{ file.downloads }}</td>
        </tr>
        {% endfor %}
    </table>
</section
{% endblock %}
{'fraction_non_alphanumeric': 0.17844257366205651, 'fraction_numerical': 0.006013229104028864, 'mean_word_length': 1.4889637111859335, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2354366', 'n_tokens_mistral': 2095, 'n_tokens_neox': 1843, 'n_words': 401}