Django migration: #47 (closed).
This MR re-adds the plugin implementation (not all the plugins itself) to django.
We have:
- The plugin result model (
PluginResults) - A plugin manager (
PluginManager) that will:- Load the plugins registered in the settings
- Run the plugins
- Report the results (as a list of
PluginResults)
- A base class with:
- A few helper method for the plugins (
failed,add_result) - An abstract method (
run) and an abstract property (name) that all plugin must implement
- A few helper method for the plugins (
- A default template for plugin without customized one
Plugin results are now being rendered in the package page.
The following changes have been made:
- Possibility to run a plugin at a particular step has been removed. All plugin runs after the upload has been validated with the
Changesand theSourceobject. The rational behind that is that code that requires more than consulting and reporting from processed upload should be in implemented as core and not plugins (such as the retrieval of origin tarball).
The distribution plugin has been implemented as an example. I've added a check for consistency between change{log,s} distributions.
Tests have been updated (for this MR, one statement is not covered by the tests, it will when plugin using a custom template will be added, later).