# ('autopeak', True),
# ('curvetools', True),
('cut', True),
- ('debug', True),
# ('fit', True),
# ('flatfilts-rolf', True),
# ('flatfilts', True),
# ('multidistance', True),
# ('multifit', True),
# ('pcluster', True),
+# ('peakspot', True),
# ('procplots', True),
# ('review', True),
# ('showconvoluted', True),
# ('superimpose', True),
- ('system', True),
# ('tutorial', True),
-# ('viewer', True),
]
"""List of plugin modules and whether they should be included by
default. TODO: autodiscovery
"""
BUILTIN_MODULES = [
+ 'debug',
+ 'note',
'playlist',
+ 'system',
]
"""List of builtin modules. TODO: autodiscovery
"""
+PLUGIN_SETTING_SECTION = 'plugins'
+"""Name of the config section which controls plugin selection.
+"""
+
# Plugins and settings
'Instance name %s does not match module name %s'
% (instance.name, submodname))
instances[instance.name] = instance
- graph = Graph([Node([instances[name] for name in i.dependencies()],
- data=i)
- for i in instances.values()])
+ nodes = {}
+ for i in instances.values(): # make nodes for each instance
+ nodes[i.name] = Node(data=i)
+ for n in nodes.values(): # fill in dependencies for each node
+ n.extend([nodes[name] for name in n.data.dependencies()])
+ graph = Graph(nodes.values())
graph.topological_sort()
return graph
"""
def default_settings():
- settings = [Setting(
- 'plugins', help='Enable/disable default plugins.')]
+ settings = [Setting(PLUGIN_SETTING_SECTION,
+ help='Enable/disable default plugins.')]
for pnode in PLUGIN_GRAPH:
if pnode.data.name in BUILTIN_MODULES:
continue # builtin inclusion is not optional
if mod_name == plugin.name][0]
help = 'Commands: ' + ', '.join([c.name for c in plugin.commands()])
settings.append(Setting(
- section='plugins',
+ section=PLUGIN_SETTING_SECTION,
option=plugin.name,
value=str(default_include),
help=help,