1
0
mirror of https://github.com/gsi-upm/senpy synced 2025-09-17 20:12:22 +00:00

Fix list of plugins

Closes #17
This commit is contained in:
J. Fernando Sánchez
2017-03-14 13:05:52 +01:00
parent 1a582c0843
commit 603e086606
5 changed files with 34 additions and 13 deletions

View File

@@ -13,7 +13,7 @@ from .. import models
logger = logging.getLogger(__name__)
class SenpyPlugin(models.Plugin):
class Plugin(models.Plugin):
def __init__(self, info=None):
"""
Provides a canonical name for plugins and serves as base for other
@@ -24,7 +24,7 @@ class SenpyPlugin(models.Plugin):
"information for the plugin."))
logger.debug("Initialising {}".format(info))
id = 'plugins/{}_{}'.format(info['name'], info['version'])
super(SenpyPlugin, self).__init__(id=id, **info)
super(Plugin, self).__init__(id=id, **info)
self.is_activated = False
def get_folder(self):
@@ -37,7 +37,10 @@ class SenpyPlugin(models.Plugin):
pass
class AnalysisPlugin(SenpyPlugin):
SenpyPlugin = Plugin
class AnalysisPlugin(Plugin):
def analyse(self, *args, **kwargs):
raise NotImplemented(
@@ -58,7 +61,7 @@ class AnalysisPlugin(SenpyPlugin):
yield i
class ConversionPlugin(SenpyPlugin):
class ConversionPlugin(Plugin):
pass

View File

@@ -37,6 +37,9 @@
"@type": "@id",
"@container": "@set"
},
"plugins": {
"@container": "@list"
},
"prov:wasGeneratedBy": {
"@type": "@id"
},

View File

@@ -6,6 +6,7 @@
"properties": {
"plugins": {
"type": "array",
"default": [],
"items": {
"$ref": "plugin.json"
}