File: deps.html.j2

package info (click to toggle)
python-azure 20250603%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 851,724 kB
  • sloc: python: 7,362,925; ansic: 804; javascript: 287; makefile: 195; sh: 145; xml: 109
file content (253 lines) | stat: -rw-r--r-- 8,724 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
{% set branch    = env.get('SYSTEM_PULLREQUEST_SOURCEBRANCH') if env.get('SYSTEM_PULLREQUEST_SOURCEBRANCH') else env.get('BUILD_SOURCEBRANCHNAME') %}
{% set build     = env.get('BUILD_BUILDNUMBER') %}
{% set build_url = '%s%s/_build/results?buildId=%s' % (env.get('SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'), env.get('SYSTEM_TEAMPROJECT'), env.get('BUILD_BUILDID')) %}
{% set commit    = env.get('BUILD_SOURCEVERSION') %}
{% set isfork    = env.get('SYSTEM_PULLREQUEST_ISFORK') == 'True' %}
{% set rel_url   = env.get('RELEASE_RELEASEWEBURL') %}
{% set release   = env.get('RELEASE_RELEASENAME') %}
{% set repo      = env.get('BUILD_REPOSITORY_NAME') if isfork else ('Azure/' + repo_name) %}
{% macro pluralize(num, singular, plural) -%}
{% if num == 1 %}{{ singular }}{% else %}{{ plural }}{% endif %}
{%- endmacro %}
<!DOCTYPE html>
<html>
  <head>
    <title>{{ repo_name|capitalize }} Dependency Report</title>
    <meta charset="UTF-8"/>
    <style>
      body {
          font-family: Verdana, sans-serif;
          font-size: 14px;
          text-size-adjust: none;
      }
      table {
          border-spacing: 0px;
          width: 65%;
          font-size: 14px;
      }
      table.condensed tr td {
          padding: 7px 15px;
      }
      th, td {
          padding: 15px;
          border-bottom: 1px solid #ddd;
          vertical-align:top;
      }
      tr:nth-child(even) {
          background-color: #f2f2f2;
      }
      th {
          background-color: #2E7CAF;
          color: white;
          font-weight: 300;
          text-align: left;
      }
      th a {
        color: white;
      }
      th.incompatible {
        background-color: #FF0000;
      }
      td.version {
          width: 75px;
      }
      .tooltip {
          position: relative;
          display: inline-block;
          border-bottom: 1px dotted black;
      }
      .tooltip .tooltiptext {
          visibility: hidden;
          background-color: black;
          color: #fff;
          white-space: nowrap;
          text-align: left;
          padding: 5px;
          font-size: 14px;
          position: absolute;
          z-index: 1;
          margin-top: 7px;
          top: 100%;
          left: 0%;
      }
      .tooltip .tooltiptext::after {
          content: " ";
          position: absolute;
          bottom: 100%;  /* At the top of the tooltip */
          left: 5%;
          margin-left: -5px;
          border-width: 5px;
          border-style: solid;
          border-color: transparent transparent black transparent;
      }
      .tooltip:hover .tooltiptext {
          visibility: visible;
      }

      .success {
          color: #00CC00;
      }
      .fail {
          color: #CC0000;
      }

      .dep_type {
          border: 1px solid gray;
          border-radius: 2px;
          background: lightgray;
          font-size: 10px;
          padding: 1px 2px;
      }

      @media only screen and (max-width: 1350px) {
          body, table {
              font-size: 25px;
          }
          table {
              width: 95%;
          }
          td.version {
              width: 35px;
          }
      }
    </style>
  </head>
  <body>
    <center>
      <h1>{{ repo_name|capitalize }} Dependency Report</h1>
      <h3>
        Generated at {{ curtime.replace(microsecond=0).isoformat() }}Z
        {% if release %}
        for release <a href="{{ rel_url }}">{{ release }}</a>
        {% elif build %}
        for build <a href="{{ build_url }}">{{ build }}</a>
        {% if branch %}
        <br/>from branch <a href="https://github.com/{{ repo }}/tree/{{ branch }}">{{ branch }}</a>
        {% if isfork %}
        in repo <a href="https://github.com/{{ repo }}">{{ repo }}</a>
        {% endif %}
        {% endif %}
        {% if commit %}
        (<a href="https://github.com/{{ repo }}/commit/{{ commit }}">{{ commit[:7] }}</a>)
        {% endif %}
        {% endif %}
      </h3>
      <p>
        {{ dependencies|length - external|length }} internal and {{ external|length }} external package <a href="#dependencies">{{ pluralize(dependencies|length,'dependency</a> was','dependencies</a> were') }} analyzed to determine if any packages declare irreconcilable dependency versions.<br/>
        {% if incompatible %}
        <strong>{{ incompatible|length }} incompatible package dependency {{ pluralize(incompatible|length,'version was','versions were') }} discovered.</strong><br/><br/>
        {% else %}
        No incompatible package dependency versions were discovered.<br/><br/>
        {% endif %}
        {% if known_reqs %}
        {{ known_reqs|length }} {{ pluralize(known_reqs|length,'dependency was','dependencies were') }} discovered in the <a href="#lockfile">Shared Requirements</a>.<br/>
        {% if new_reqs %}
        <strong>{{ new_reqs|length }} {{ pluralize(new_reqs|length,'dependency is','dependencies are') }} missing from the shared requirements.</strong><br/>
        {% endif %}
        {% if not new_reqs %}
        All declared dependencies were validated against those in the shared requirements file.<br/>
        {% endif %}
        {% else %}
        <strong>No shared requirements file present in the repo, known requirements could not be validated.</strong><br/>
        {% endif %}
        <br/>This report scanned {{ packages|length }} <a href="#packages">{{ pluralize(packages|length,'package','packages') }}</a>.
      </p>
      <a name="dependencies"/>
      {% for dep_name in ordered_deps %}
      <a name="dep_{{ dep_name }}"/>
      <table>
        <thead>
          {% if loop.index == 1 %}
          <tr><th colspan="2"><strong>Dependencies Discovered in Packages</strong></th></tr>
          {% endif %}
          <tr>
          {% if dep_name in external %}
          {% set dep_type = "external" %}
          {% else %}
          {% set dep_type = "internal" %}
          {% endif %}
          {% if dep_name in incompatible %}
          {% set dep_type = "incompatible " + dep_type %}
          {% endif %}
          <th colspan="2" class="{{ dep_type }}"><strong>{{ dep_type|title }} Dependency:</strong> {{ dep_name }}</th></tr>
        </thead>
        <tbody>
        {% for requirement, packages in dependencies[dep_name]|dictsort %}
        <tr>
          <td class="version">{{ requirement if requirement else '(empty)' }}</td>
          <td>
            {% for package_name in packages|sort %}
            {{ package_name }}
            {% endfor %}
          </td>
        </tr>
        {% endfor %}
        </tbody>
      </table>
      <br/>
      {% endfor %}
      <br/><br/><hr/><br/><br/>
      <a name="lockfile"/>
      <table class="condensed">
        <thead>
          <tr><th colspan="3"><strong>Known Dependencies</strong></th></tr>
          {% if known_reqs %}
          <tr><th>Dependency</th></tr>
          {% endif %}
        </thead>
        <tbody>
        {% for name in known_reqs|sort %}
        <tr>
          <td><a href="#dep_{{ name }}">{{ name }}</a></td>
        </tr>
        {% endfor %}
        {% if not known_reqs %}
        <tr><td colspan="2">Unable to open shared_requirements.txt, shared requirements have not been validated</td></tr>
        {% endif %}
        </tbody>
      </table>
      {% if new_reqs %}
      <br/>
      {% for name in new_reqs|sort %}
      <table class="condensed">
        <thead>
          {% if loop.index == 1 %}
          <tr><th colspan="2" class="incompatible"><strong>Dependencies Missing from Shared Requirements</strong></th></tr>
          {% endif %}
          <tr><th colspan="2" class="incompatible"><strong>Missing Dependency:</strong> <a href="#dep_{{ name }}">{{ name }}</a></th></tr>
        </thead>
        <tbody>
        {% for requirement, packages in dependencies[name]|dictsort %}
        <tr>
          <td class="version">{{ requirement if requirement else '(empty)' }}</td>
          <td>
            {% for package_name in packages|sort %}
            {{ package_name }}<br/>
            {% endfor %}
          </td>
        </tr>
        {% endfor %}
        </tbody>
      </table>
      {% endfor %}
      {% endif %}
      <br/><br/><hr/><br/><br/>
      <a name="packages"/>
      <table class="condensed">
        <thead>
          <tr><th colspan="3"><strong>Packages Scanned for this Report</strong></th></tr>
          <tr><th>Package Analyzed</th><th>Package Version</th><th>Package Source</th></tr>
        </thead>
        <tbody>
        {% for name, info in packages|dictsort %}
        <tr>
          <td>{{ name }}</td>
          <td>{{ info.version }}</td>
          <td>{{ info.source }}</td>
        </tr>
        {% endfor %}
        </tbody>
      </table>
    </center>
  </body>
</html>