Skip to content

Instantly share code, notes, and snippets.

@natefoo
Created April 17, 2025 19:38
Show Gist options
  • Save natefoo/099d793269cdb52f210c6a64f5ca3399 to your computer and use it in GitHub Desktop.
Save natefoo/099d793269cdb52f210c6a64f5ca3399 to your computer and use it in GitHub Desktop.
Minimal script to operate on toolbox
from galaxy.app import GalaxyManagerApplication
from galaxy.tool_shed.cache import ToolShedRepositoryCache
global_conf = {
"shed_tool_config_file": "shed_tool_conf.xml",
}
app = GalaxyManagerApplication(**global_conf)
app.tool_shed_repository_cache = app._register_singleton(ToolShedRepositoryCache)
app._configure_tool_data_tables(from_shed_config=False)
app._configure_toolbox()
toolbox = app.toolbox
diff --git a/lib/galaxy/tool_util/toolbox/base.py b/lib/galaxy/tool_util/toolbox/base.py
index 4257795d29..1c8d6c1f46 100644
--- a/lib/galaxy/tool_util/toolbox/base.py
+++ b/lib/galaxy/tool_util/toolbox/base.py
@@ -194,8 +194,8 @@ class AbstractToolBox(ManagesIntegratedToolPanelMixin):
# (e.g., shed_tool_conf.xml) files include the tool_path attribute within the <toolbox> tag.
self._tool_root_dir = tool_root_dir
self.app = app
- self._tool_watcher = self.app.watchers.tool_watcher
- self._tool_config_watcher = self.app.watchers.tool_config_watcher
+ self._tool_watcher = None
+ self._tool_config_watcher = None
self._filter_factory = FilterFactory(self)
self._tool_tag_manager = self.tool_tag_manager()
self._init_tools_from_configs(config_filenames)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment