Changed the structure of toolbox received from the backend
ToolBox is now an object of ToolSections (and Tools) by id
Also consolidated `ToolBox` and `ToolBoxWorkflow` into one `ToolBox`
that is contained within a `ToolPanel`. Removed Tool panel providers
and ProviderAware tool boxes
And remove the step.type is None condition, which I don't think can
happen and even if it can, would have already failed at the module
inection in module_factory.from_workflow_step.
Fixes:
```
Message
Uncaught exception in exposed API method:
Stack Trace(most recent call first)
TypeError: Object of type method is not JSON serializable
File "galaxy/util/json.py", line 74, in safe_dumps
dumped = json.dumps(obj, allow_nan=False, **kwargs)
File "__init__.py", line 234, in dumps
return cls(
File "json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type method is not JSON serializable
File "galaxy/web/framework/decorators.py", line 341, in decorator
rval = format_return_as_json(rval, jsonp_callback, pretty=trans.debug)
File "galaxy/web/framework/decorators.py", line 378, in format_return_as_json
json = safe_dumps(rval, **dumps_kwargs)
File "galaxy/util/json.py", line 77, in safe_dumps
dumped = json.dumps(obj, allow_nan=False, **kwargs)
File "__init__.py", line 234, in dumps
return cls(
File "json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
```
from https://sentry.galaxyproject.org/share/issue/665556bc240f4a04978f7c81c2be629c/
Fixes:
```
Traceback (most recent call last):
File "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/webapps/galaxy/buildapp.py", line 59, in app_pair
app = galaxy.app.UniverseApplication(global_conf=global_conf, is_webapp=True, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/app.py", line 691, in __init__
self._configure_toolbox()
File "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/app.py", line 309, in _configure_toolbox
self._toolbox = tools.ToolBox(self.config.tool_configs, self.config.tool_path, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/tools/__init__.py", line 420, in __init__
super().__init__(
File "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/tool_util/toolbox/base.py", line 237, in __init__
self._load_tool_panel_views()
File "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/tool_util/toolbox/base.py", line 600, in _load_tool_panel_views
self._tool_panel_view_rendered[key] = view.apply_view(self._integrated_tool_panel, registry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/tool_util/toolbox/views/static.py", line 195, in apply_view
return definition_with_items_to_panel(root_defintion, items=root_items)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/tool_util/toolbox/views/static.py", line 87, in definition_with_items_to_panel
panel = definition_with_items_to_panel(section_def, allow_sections=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/tool_util/toolbox/views/static.py", line 142, in definition_with_items_to_panel
tool = toolbox_registry.get_tool(tool_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/tool_util/toolbox/base.py", line 107, in get_tool
return self.__toolbox.get_tool(tool_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/tool_util/toolbox/base.py", line 719, in get_tool
tool_lineage = self._lineage_map.get(tool_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/tool_util/toolbox/lineages/factory.py", line 47, in get
tool = self.app.toolbox._tools_by_id.get(tool_id)
^^^^^^^^^^^^^^^^
File "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/app.py", line 351, in toolbox
return self._toolbox
^^^^^^^^^^^^^
AttributeError: 'UniverseApplication' object has no attribute '_toolbox'
```
when attempting to apply a panel view that contains tools that aren't
installed on a server.