PLUGIN_MODULES = [
# ('autopeak', True),
-# ('curvetools', True),
+ ('convfilt', True),
('cut', True),
+# ('fclamp', True),
# ('fit', True),
# ('flatfilts-rolf', True),
-# ('flatfilts', True),
-# ('generalclamp', True),
-# ('generaltccd', True),
-# ('generalvclamp', True),
+ ('flatfilt', True),
# ('jumpstat', True),
# ('macro', True),
# ('massanalysis', True),
# ('multidistance', True),
# ('multifit', True),
# ('pcluster', True),
-# ('peakspot', True),
# ('procplots', True),
# ('review', True),
# ('showconvoluted', True),
# ('superimpose', True),
+# ('tccd', True),
# ('tutorial', True),
+ ('vclamp', True),
]
"""List of plugin modules and whether they should be included by
default. TODO: autodiscovery
BUILTIN_MODULES = [
'config',
+ 'curve',
'debug',
'note',
'playlist',
self.name = name
self.setting_section = '%s plugin' % self.name
self.config = {}
+ self._commands = []
def dependencies(self):
- """Return a list of :class:`Plugin`\s we require."""
+ """Return a list of names of :class:`Plugin`\s we require."""
return []
def default_settings(self):
def commands(self):
"""Return a list of :class:`hooke.command.Command`\s provided.
"""
- return []
+ return list(self._commands)
class Builtin (Plugin):
"""A required collection of Hooke commands.
"""
pass
+# Plugin utility functions
+
+def argument_to_setting(section_name, argument):
+ """Convert an :class:`~hooke.command.Argument` to a
+ `~hooke.conf.Setting`.
+
+ This is a lossy transition, because
+ :class:`~hooke.command.Argument`\s store more information than
+ `~hooke.conf.Setting`\s.
+ """
+ return Setting(section_name, option=argument.name, value=argument.default,
+ help=argument._help)
+
# Construct plugin dependency graph and load plugin instances.
PLUGIN_GRAPH = construct_graph(