diff --git a/openflexure_microscope/api/v1/blueprints/plugins.py b/openflexure_microscope/api/v1/blueprints/plugins.py index f172b79b..86be7241 100644 --- a/openflexure_microscope/api/v1/blueprints/plugins.py +++ b/openflexure_microscope/api/v1/blueprints/plugins.py @@ -112,7 +112,6 @@ def construct_blueprint(microscope_obj): # Store the complete form in Microscope().plugin.form microscope_obj.plugins.forms.append(api_form_info) - print(microscope_obj.plugins.forms) else: warnings.warn( diff --git a/openflexure_microscope/api/v2/blueprints/plugins.py b/openflexure_microscope/api/v2/blueprints/plugins.py index b4709ce7..cfc94d16 100644 --- a/openflexure_microscope/api/v2/blueprints/plugins.py +++ b/openflexure_microscope/api/v2/blueprints/plugins.py @@ -21,8 +21,6 @@ def plugins_representation(plugin_loader_object: PluginLoader): """ plugins = [] - print(plugin_loader_object.active) - for plugin in plugin_loader_object.active: logging.info(f"Representing plugin {plugin._name}") d = { @@ -42,12 +40,8 @@ def plugins_representation(plugin_loader_object: PluginLoader): d["views"][view_id] = view_d - print("\n") - print(d) - print("\n") plugins.append(d) - print(plugins) return plugins @@ -93,30 +87,4 @@ def construct_blueprint(microscope_obj): ), ) - """ - # If plugin includes an API form - if hasattr(plugin_obj, "api_form") and isinstance( - plugin_obj.api_form, dict - ): - # TODO: We deep copy this to avoid clashing between API versions. Can be removed when v1 is removed. - api_form_info = copy.deepcopy(plugin_obj.api_form) - api_form_info["id"] = plugin_name - if "forms" in api_form_info and isinstance( - api_form_info["forms"], list - ): - for form in api_form_info["forms"]: - if "route" in form and form["route"] in expanded_routes.keys(): - form["route"] = expanded_routes[form["route"]] - else: - logging.warn( - "No valid expandable route found for {}".format( - form["route"] - ) - ) - - # Store the complete form in Microscope().plugin.form - plugin_representation["form"] = api_form_info - print(microscope_obj.plugins.forms) - """ - return blueprint diff --git a/openflexure_microscope/plugins/loader.py b/openflexure_microscope/plugins/loader.py index 2a2eac05..b09ba839 100644 --- a/openflexure_microscope/plugins/loader.py +++ b/openflexure_microscope/plugins/loader.py @@ -229,8 +229,8 @@ class BasePlugin: """ def __init__(self): - self._views = {} - self._rules = {} + self._views = {} # Key: Full, Python-safe ID. Val: Original rule, and view class + self._rules = {} # Key: Original rule. Val: View class self._form = None # If old api_views dictionary is found @@ -242,10 +242,6 @@ class BasePlugin: # Convert to new format self._convert_old_api_form() - print("\n\n NAME: " + self._name + "\n\n") - print(self.views) - print(self.form) - @property def views(self): return self._views