pass edam to EdamToolPanelView directly

This commit is contained in:
Laila Los
2022-08-31 11:05:12 +02:00
parent 3d1325c2de
commit 8cbc5978a7
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -193,7 +193,7 @@ class AbstractToolBox(Dictifiable, ManagesIntegratedToolPanelMixin):
for edam_view in listify(self.app.config.edam_panel_views):
mode = EdamPanelMode[edam_view]
tool_panel_views_list.append(EdamToolPanelView(self.app.datatypes_registry, mode=mode))
tool_panel_views_list.append(EdamToolPanelView(self.app.datatypes_registry.edam, mode=mode))
if view_sources is not None:
for definition in view_sources.get_definitions():
+2 -3
View File
@@ -6,7 +6,6 @@ from typing import (
Tuple,
)
from galaxy.datatypes.registry import Registry
from galaxy.tool_util.edam_util import (
ROOT_OPERATION,
ROOT_TOPIC,
@@ -34,8 +33,8 @@ class EdamPanelMode(str, Enum):
class EdamToolPanelView(ToolPanelView):
def __init__(self, datatypes_registry: Registry, mode: EdamPanelMode = EdamPanelMode.merged):
self.edam = datatypes_registry.edam
def __init__(self, edam: Dict[str, Dict], mode: EdamPanelMode = EdamPanelMode.merged):
self.edam = edam
self.mode = mode
self.include_topics = mode in [EdamPanelMode.merged, EdamPanelMode.topics]
self.include_operations = mode in [EdamPanelMode.merged, EdamPanelMode.operations]