X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;ds=sidebyside;f=hooke%2Fplugin%2F__init__.py;h=111b99bdac5f5ff7ab61f1c63a64c8f4a6f44ad6;hb=23bcfd05915a61e3a41d01babd291fd3089ba329;hp=54cce666b926fb86b0a604d03fbbd1c885f089d1;hpb=a4c366adfd1bc04bc574c88d71455d1005418dab;p=hooke.git diff --git a/hooke/plugin/__init__.py b/hooke/plugin/__init__.py index 54cce66..111b99b 100644 --- a/hooke/plugin/__init__.py +++ b/hooke/plugin/__init__.py @@ -1,20 +1,19 @@ -# Copyright (C) 2010 W. Trevor King +# Copyright (C) 2010-2012 W. Trevor King # # This file is part of Hooke. # -# Hooke is free software: you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# Hooke is free software: you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) any +# later version. # -# Hooke is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General -# Public License for more details. +# Hooke is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. # -# You should have received a copy of the GNU Lesser General Public -# License along with Hooke. If not, see -# . +# You should have received a copy of the GNU Lesser General Public License +# along with Hooke. If not, see . """The `plugin` module provides optional submodules that add new Hooke commands. @@ -34,21 +33,17 @@ PLUGIN_MODULES = [ ('convfilt', True), ('cut', True), # ('fclamp', True), -# ('fit', True), -# ('flatfilts-rolf', True), ('flatfilt', True), # ('jumpstat', True), -# ('macro', True), # ('massanalysis', True), # ('multidistance', True), # ('multifit', True), # ('pcluster', True), -# ('procplots', True), -# ('review', True), + ('polymer_fit', True), # ('showconvoluted', True), # ('superimpose', True), # ('tccd', True), -# ('tutorial', True), + ('tutorial', True), ('vclamp', True), ] """List of plugin modules and whether they should be included by @@ -56,9 +51,11 @@ default. TODO: autodiscovery """ BUILTIN_MODULES = [ + 'command_stack', 'config', 'curve', 'debug', + 'engine', 'license', 'note', 'playlist', @@ -124,11 +121,15 @@ def argument_to_setting(section_name, argument): """Convert an :class:`~hooke.command.Argument` to a `~hooke.conf.Setting`. - This is a lossy transition, because + This is useful if, for example, you want to define arguments with + configurable default values. + + Conversion is 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, + type=argument.type, count=argument.count, help=argument._help) @@ -173,7 +174,6 @@ def load_graph(graph, config, include_section): except configparser.NoOptionError: include = True # non-optional include (e.g. a Builtin) enabled[item.name] = include - print item.name, include if include == True: for dependency in node: if enabled.get(dependency.data.name, None) != True: @@ -183,9 +183,5 @@ def load_graph(graph, config, include_section): % (item.name, dependency.data.name)) enabled[item.name] = False continue - try: - item.config = dict(config.items(item.setting_section)) - except configparser.NoSectionError: - pass items.append(item) return items