Commit 50d801c1 authored by Nicolas Dandrimont's avatar Nicolas Dandrimont 🤔
Browse files

Merge branch 'plugin-api' into tentative-merge

Conflicts:
	debexpo/lib/utils.py
	debexpo/plugins/qa/distribution.py
parents 24fab0f6 83327073
......@@ -147,16 +147,19 @@
% endif
</table>
% if package_version.package_info:
% if len(c.plugins[package_version.id]) > 0:
<h3 class="qa-toplevel-header">${ _('QA information') }</h3>
<ul class="qa">
## Print result from plugins
% for pkginfo in sorted(package_version.package_info, key = lambda i: i.from_plugin):
<li class="severity-${ h.constants.PLUGIN_SEVERITY[pkginfo.severity].lower() }">
<span class="visibility" title="${h.constants.PLUGIN_SEVERITY[pkginfo.severity]}">–</span>
${ pkginfo.render("html") | n }
% for name, plugin in c.plugins[package_version.id].iteritems():
% if plugin.test_result is not None:
<li class="severity-${ h.constants.PLUGIN_SEVERITY[plugin.test_severity].lower() }">
<span class="visibility" title="${h.constants.PLUGIN_SEVERITY[plugin.test_severity]}">–</span>
${ plugin.render('html') | n }
</li>
% endif
% endfor
</ul>
% endif
......
<div class="qa-header">
Buildsystem: ${o.outcome}
${test_result}
</div>
%if o.rich_data["build-system"] == "debhelper":
<div class="qa-content">
%if o.rich_data["compat-level"]:
Debhelper compatibility level ${o.rich_data["compat-level"]}
%else:
No compatibility level set!
%endif
</div>
%endif
% if test_result['buildsystem'] == "debhelper":
<div class="qa-content">
<%
compat_level = test_result.get('compat_level', None)
%>
% if compat_level is not None:
Debhelper compatibility level ${compat_level}
% else:
No compatibility level set!
% endif
</div>
% endif
<div class="qa-header">
${o.outcome}
${test_result}
</div>
<div class="qa-content">
%if o.rich_data["errors"]:
Errors:
<ul class="bugs-errors">
% for error in o.rich_data["errors"]:
<li>${error}</li>
% endfor
</ul>
%endif
<ul class="bugs-closed">
%for package in o.rich_data["bugs"]:
<li>
<a href="http://bugs.debian.org/${package}">${package}</a>:
<ul>
%for bugnum, title, severity in o.rich_data["bugs"][package]:
<li>
<a href="http://bugs.debian.org/${bugnum}">#${bugnum}</a> (${severity}): ${title}
</li>
%endfor
</ul>
</li>
%endfor
% if test_result.nb_errors:
Errors:
<ul class="bugs-errors">
% for bug in filter(lambda bug: bug.is_error, results['closed_bug']):
<li>${bug}</li>'
% endfor
</ul>
% endif
<ul class="bugs-closed">
<%
bugs = test_result.get_bugs()
%>
% for package in bugs:
<li>
<a href="http://bugs.debian.org/${package}">${package}</a>:
<ul>
% for bug in bugs[package]:
<li>
<a href="http://bugs.debian.org/${bug.number}">
#${bug.number}
</a>
(${bug['severity']}): ${bug['subject']}
</li>
% endfor
</ul>
</li>
% endfor
</ul>
</div>
<div class="qa-header">
${str(o.outcome)}
${test_result}
</div>
%if o.rich_data:
<div class="qa-content">
<dl>
%for field, contents in sorted(o.rich_data.items()):
<dt>${field}</dt>
<dd><a href="${contents}" rel="nofollow">${contents}</a></dd>
%for control_field in sorted(results['control_field'], key=lambda x: x.field):
<dt>${control_field.field}</dt>
<dd><a href="${control_field.data}" rel="nofollow">${control_field.data}</a></dd>
%endfor
</dl>
</div>
%endif
</div>
\ No newline at end of file
<div class="qa-header">
${str(o.outcome)}
${test_result}
</div>
%if o.rich_data["in-debian"]:
% if test_result.in_debian:
<div class="qa-content debian-qa">
<ul>
%if o.rich_data["nmu"]:
<li>Detected as a non-maintainer upload</li>
%endif
<li>The package uploader is ${"not" if not o.rich_data["is-debian-maintainer"] else ""} currently maintaining <a href="http://packages.qa.debian.org/${o.package_version.package.name}">${o.package_version.package.name} in Debian</a></li>
<ul>
% if test_result.is_nmu:
<li>Detected as a non-maintainer upload</li>
% endif
<li>The package uploader is ${"not" if not test_result.is_debian_maintainer else ""} currently maintaining <a href="http://packages.qa.debian.org/${test_result.package_version.package.name}">${test_result.package_version.package.name} in Debian</a></li>
</ul>
</div>
%endif
<div class="qa-header">
${o.from_plugin}: ${str(o.outcome)}
${test_result.entity}: ${test_result}
</div>
%if o.rich_data:
%if test_result.as_dict:
<div class="qa-content">
${h.converters.nl2br(str(o.rich_data))}
${h.converters.nl2br(str(test_result.as_dict))}
</div>
%endif
<div class="qa-header">
${str(o.outcome)}
${test_result}
</div>
%if o.rich_data["dirty"]:
%if test_result.dirty:
<div class="qa-content">
<table>
<th><td>Modified file</td><td>diffstat</td></th>
%for filename, stat in o.rich_data["modified-files"]:
<tr><td>${filename}</td><td>${stat}</td></tr>
%for diff_file in results['diff_file']:
<tr><td>${diff_file.filename}</td><td>${diff_file.stat}</td></tr>
%endfor
</table>
</div>
......
<div class="qa-header">
${o.outcome}
${test_result}
</div>
<div class="qa-header">
${o.outcome}
${test_result}
</div>
%if not o.rich_data["user-is-maintainer"]:
%if not test_resut.user_is_maintainer:
<div class="qa-content">
<dl>
<dt>User email</dt>
<dd><a href="mailto:${o.rich_data["user-email"]}">${o.rich_data["user-email"]}</a></dd>
<dd><a href="mailto:${test_result['user-email']}">${test_result['user-email']}</a></dd>
<dt>"Maintainer" email</dt>
<dd><a href="mailto:${o.rich_data["maintainer-email"]}">${o.rich_data["maintainer-email"]}</a></dd>
%if o.rich_data["uploader-emails"]:
<dd><a href="mailto:${test_result['maintainer-email']}">${test_result['maintainer-email']}</a></dd>
%
<dt>"Uploaders" emails</dt>
<dd>
<ul>
%for email in o.rich_data["uploader-emails"]:
%for email in results['uploader_email']:
<li><a href="mailto:${email}">${email}</a></li>
%endfor
</ul>
......
<div class="qa-header">
${o.outcome}
</div>
${test_result}
</div>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment