From c8659d1d4af9baca3d98e07873809235f799a576 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 28 Sep 2022 08:37:31 -0400 Subject: [PATCH] Add toolbox_auto_sort config option, expose in config manager. --- doc/source/admin/galaxy_options.rst | 30 ++++++++++----------- lib/galaxy/config/sample/galaxy.yml.sample | 7 +++++ lib/galaxy/config/schemas/config_schema.yml | 11 ++++++++ lib/galaxy/managers/configuration.py | 1 + 4 files changed, 33 insertions(+), 16 deletions(-) diff --git a/doc/source/admin/galaxy_options.rst b/doc/source/admin/galaxy_options.rst index 951592c5a1e..b63e07ac2ba 100644 --- a/doc/source/admin/galaxy_options.rst +++ b/doc/source/admin/galaxy_options.rst @@ -592,22 +592,6 @@ :Type: str -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -``load_tool_shed_datatypes`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:Description: - This option controls whether legacy datatypes are loaded from - installed tool shed repositories. We're are in the process of - disabling Tool Shed datatypes. This option with a default of true - will be added in 22.01, we will disable the datatypes on the big - public servers during that release. This option will be switched - to False by default in 22.05 and this broken functionality will be - removed all together during some future release. -:Default: ``true`` -:Type: bool - - ~~~~~~~~~~~~~~~ ``watch_tools`` ~~~~~~~~~~~~~~~ @@ -4672,6 +4656,20 @@ :Type: bool +~~~~~~~~~~~~~~~~~~~~~ +``toolbox_auto_sort`` +~~~~~~~~~~~~~~~~~~~~~ + +:Description: + If true, the toolbox will be sorted by tool id when the toolbox is + loaded. This is useful for ensuring that tools are always + displayed in the same order in the UI. If false, the order of + tools in the toolbox will be preserved as they are loaded from the + tool config files. +:Default: ``true`` +:Type: bool + + ~~~~~~~~~~~~~~~~ ``tool_filters`` ~~~~~~~~~~~~~~~~ diff --git a/lib/galaxy/config/sample/galaxy.yml.sample b/lib/galaxy/config/sample/galaxy.yml.sample index d1ed27adfc1..5947f999cfe 100644 --- a/lib/galaxy/config/sample/galaxy.yml.sample +++ b/lib/galaxy/config/sample/galaxy.yml.sample @@ -2345,6 +2345,13 @@ galaxy: # if running many handlers. #cache_user_job_count: false + # If true, the toolbox will be sorted by tool id when the toolbox is + # loaded. This is useful for ensuring that tools are always displayed + # in the same order in the UI. If false, the order of tools in the + # toolbox will be preserved as they are loaded from the tool config + # files. + #toolbox_auto_sort: true + # Define toolbox filters # (https://galaxyproject.org/user-defined-toolbox-filters/) that # admins may use to restrict the tools to display. diff --git a/lib/galaxy/config/schemas/config_schema.yml b/lib/galaxy/config/schemas/config_schema.yml index d73f00840e0..979b749f8fd 100644 --- a/lib/galaxy/config/schemas/config_schema.yml +++ b/lib/galaxy/config/schemas/config_schema.yml @@ -3397,6 +3397,17 @@ mapping: greater possibility that jobs will be dispatched past the configured limits if running many handlers. + toolbox_auto_sort: + type: bool + default: true + required: false + reloadable: true + desc: | + If true, the toolbox will be sorted by tool id when the toolbox is loaded. + This is useful for ensuring that tools are always displayed in the same + order in the UI. If false, the order of tools in the toolbox will be + preserved as they are loaded from the tool config files. + tool_filters: type: str required: false diff --git a/lib/galaxy/managers/configuration.py b/lib/galaxy/managers/configuration.py index 98fb57338a5..4c3af386422 100644 --- a/lib/galaxy/managers/configuration.py +++ b/lib/galaxy/managers/configuration.py @@ -189,6 +189,7 @@ class ConfigSerializer(base.ModelSerializer): "python": _defaults_to((sys.version_info.major, sys.version_info.minor)), "select_type_workflow_threshold": _use_config, "file_sources_configured": lambda item, key, **context: self.app.file_sources.custom_sources_configured, + "toolbox_auto_sort": _use_config, "panel_views": lambda item, key, **context: self.app.toolbox.panel_view_dicts(), "default_panel_view": _use_config, "upload_from_form_button": _use_config,