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