Warning

This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy.tool_util.toolbox.views package

Submodules

galaxy.tool_util.toolbox.views.definitions module

class galaxy.tool_util.toolbox.views.definitions.StaticToolBoxViewTypeEnum(value)[source]

Bases: str, enum.Enum

An enumeration.

generic = 'generic'
activity = 'activity'
publication = 'publication'
training = 'training'
class galaxy.tool_util.toolbox.views.definitions.ExcludeTool(*, tool_id: str)[source]

Bases: pydantic.main.BaseModel

tool_id: str
class galaxy.tool_util.toolbox.views.definitions.ExcludeToolRegex(*, tool_id_regex: str)[source]

Bases: pydantic.main.BaseModel

tool_id_regex: str
class galaxy.tool_util.toolbox.views.definitions.ExcludeTypes(*, types: List[str])[source]

Bases: pydantic.main.BaseModel

types: List[str]
class galaxy.tool_util.toolbox.views.definitions.Tool(*, type: typing_extensions.Literal[tool] = 'tool', id: str)[source]

Bases: pydantic.main.BaseModel

content_type: typing_extensions.Literal[tool]
id: str
class Config[source]

Bases: object

allow_population_by_field_name = True
class galaxy.tool_util.toolbox.views.definitions.Label(*, type: typing_extensions.Literal[label], id: str = None, text: str)[source]

Bases: pydantic.main.BaseModel

content_type: typing_extensions.Literal[label]
id: Optional[str]
text: str
class Config[source]

Bases: object

allow_population_by_field_name = True
class galaxy.tool_util.toolbox.views.definitions.LabelShortcut(*, label: str, content_type: str = 'simple_label')[source]

Bases: pydantic.main.BaseModel

label: str
class galaxy.tool_util.toolbox.views.definitions.Workflow(*, type: typing_extensions.Literal[workflow], id: str)[source]

Bases: pydantic.main.BaseModel

content_type: typing_extensions.Literal[workflow]
id: str
class Config[source]

Bases: object

allow_population_by_field_name = True
class galaxy.tool_util.toolbox.views.definitions.ItemsFrom(*, items_from: str, excludes: List[Union[galaxy.tool_util.toolbox.views.definitions.ExcludeTool, galaxy.tool_util.toolbox.views.definitions.ExcludeToolRegex, galaxy.tool_util.toolbox.views.definitions.ExcludeTypes]] = None, content_type: str = 'items_from')[source]

Bases: pydantic.main.BaseModel

items_from: str
excludes: Optional[List[Union[galaxy.tool_util.toolbox.views.definitions.ExcludeTool, galaxy.tool_util.toolbox.views.definitions.ExcludeToolRegex, galaxy.tool_util.toolbox.views.definitions.ExcludeTypes]]]
class galaxy.tool_util.toolbox.views.definitions.HasItems[source]

Bases: object

items: Optional[List[Any]]
property items_expanded: Optional[List[Union[galaxy.tool_util.toolbox.views.definitions.Section, galaxy.tool_util.toolbox.views.definitions.SectionAlias, galaxy.tool_util.toolbox.views.definitions.Tool, galaxy.tool_util.toolbox.views.definitions.Label, galaxy.tool_util.toolbox.views.definitions.Workflow, galaxy.tool_util.toolbox.views.definitions.ItemsFrom]]]
class galaxy.tool_util.toolbox.views.definitions.Section(*, type: typing_extensions.Literal[section], id: str = None, name: str = None, items: List[Union[galaxy.tool_util.toolbox.views.definitions.Tool, galaxy.tool_util.toolbox.views.definitions.Label, galaxy.tool_util.toolbox.views.definitions.LabelShortcut, galaxy.tool_util.toolbox.views.definitions.Workflow, galaxy.tool_util.toolbox.views.definitions.ItemsFrom]] = None, excludes: List[Union[galaxy.tool_util.toolbox.views.definitions.ExcludeTool, galaxy.tool_util.toolbox.views.definitions.ExcludeToolRegex, galaxy.tool_util.toolbox.views.definitions.ExcludeTypes]] = None)[source]

Bases: pydantic.main.BaseModel, galaxy.tool_util.toolbox.views.definitions.HasItems

content_type: typing_extensions.Literal[section]
id: Optional[str]
name: Optional[str]
items: Optional[List[Union[galaxy.tool_util.toolbox.views.definitions.Tool, galaxy.tool_util.toolbox.views.definitions.Label, galaxy.tool_util.toolbox.views.definitions.LabelShortcut, galaxy.tool_util.toolbox.views.definitions.Workflow, galaxy.tool_util.toolbox.views.definitions.ItemsFrom]]]
excludes: Optional[List[Union[galaxy.tool_util.toolbox.views.definitions.ExcludeTool, galaxy.tool_util.toolbox.views.definitions.ExcludeToolRegex, galaxy.tool_util.toolbox.views.definitions.ExcludeTypes]]]
class Config[source]

Bases: object

allow_population_by_field_name = True
class galaxy.tool_util.toolbox.views.definitions.SectionAlias(*, section: str, excludes: List[Union[galaxy.tool_util.toolbox.views.definitions.ExcludeTool, galaxy.tool_util.toolbox.views.definitions.ExcludeToolRegex, galaxy.tool_util.toolbox.views.definitions.ExcludeTypes]] = None, content_type: str = 'section_alias')[source]

Bases: pydantic.main.BaseModel

section: str
excludes: Optional[List[Union[galaxy.tool_util.toolbox.views.definitions.ExcludeTool, galaxy.tool_util.toolbox.views.definitions.ExcludeToolRegex, galaxy.tool_util.toolbox.views.definitions.ExcludeTypes]]]
class galaxy.tool_util.toolbox.views.definitions.SectionAliases(*, sections: List[str], excludes: List[Union[galaxy.tool_util.toolbox.views.definitions.ExcludeTool, galaxy.tool_util.toolbox.views.definitions.ExcludeToolRegex, galaxy.tool_util.toolbox.views.definitions.ExcludeTypes]] = None, content_type: str = 'section_aliases')[source]

Bases: pydantic.main.BaseModel

sections: List[str]
excludes: Optional[List[Union[galaxy.tool_util.toolbox.views.definitions.ExcludeTool, galaxy.tool_util.toolbox.views.definitions.ExcludeToolRegex, galaxy.tool_util.toolbox.views.definitions.ExcludeTypes]]]
class galaxy.tool_util.toolbox.views.definitions.StaticToolBoxView(*, id: str, name: str, description: str = None, type: galaxy.tool_util.toolbox.views.definitions.StaticToolBoxViewTypeEnum, items: List[Union[galaxy.tool_util.toolbox.views.definitions.Section, galaxy.tool_util.toolbox.views.definitions.SectionAlias, galaxy.tool_util.toolbox.views.definitions.SectionAliases, galaxy.tool_util.toolbox.views.definitions.Tool, galaxy.tool_util.toolbox.views.definitions.Label, galaxy.tool_util.toolbox.views.definitions.LabelShortcut, galaxy.tool_util.toolbox.views.definitions.Workflow, galaxy.tool_util.toolbox.views.definitions.ItemsFrom]] = None, excludes: List[Union[galaxy.tool_util.toolbox.views.definitions.ExcludeTool, galaxy.tool_util.toolbox.views.definitions.ExcludeToolRegex, galaxy.tool_util.toolbox.views.definitions.ExcludeTypes]] = None)[source]

Bases: pydantic.main.BaseModel, galaxy.tool_util.toolbox.views.definitions.HasItems

id: str
name: str
description: Optional[str]
view_type: galaxy.tool_util.toolbox.views.definitions.StaticToolBoxViewTypeEnum
items: Optional[List[Union[galaxy.tool_util.toolbox.views.definitions.Section, galaxy.tool_util.toolbox.views.definitions.SectionAlias, galaxy.tool_util.toolbox.views.definitions.SectionAliases, galaxy.tool_util.toolbox.views.definitions.Tool, galaxy.tool_util.toolbox.views.definitions.Label, galaxy.tool_util.toolbox.views.definitions.LabelShortcut, galaxy.tool_util.toolbox.views.definitions.Workflow, galaxy.tool_util.toolbox.views.definitions.ItemsFrom]]]
excludes: Optional[List[Union[galaxy.tool_util.toolbox.views.definitions.ExcludeTool, galaxy.tool_util.toolbox.views.definitions.ExcludeToolRegex, galaxy.tool_util.toolbox.views.definitions.ExcludeTypes]]]
static from_dict(as_dict)[source]
class Config[source]

Bases: object

allow_population_by_field_name = True

galaxy.tool_util.toolbox.views.edam module

class galaxy.tool_util.toolbox.views.edam.EdamPanelMode(value)[source]

Bases: str, enum.Enum

An enumeration.

merged = 'merged'
topics = 'topics'
operations = 'operations'
class galaxy.tool_util.toolbox.views.edam.EdamToolPanelView(edam_ontology_path: Optional[str], mode: galaxy.tool_util.toolbox.views.edam.EdamPanelMode = EdamPanelMode.merged)[source]

Bases: galaxy.tool_util.toolbox.views.interface.ToolPanelView

__init__(edam_ontology_path: Optional[str], mode: galaxy.tool_util.toolbox.views.edam.EdamPanelMode = EdamPanelMode.merged)[source]
apply_view(base_tool_panel: galaxy.tool_util.toolbox.panel.ToolPanelElements, toolbox_registry: galaxy.tool_util.toolbox.views.interface.ToolBoxRegistry) galaxy.tool_util.toolbox.panel.ToolPanelElements[source]

Consume tool panel state and return custom tool panel view.

to_model() galaxy.tool_util.toolbox.views.interface.ToolPanelViewModel[source]

Convert abstract description to dictionary description to emit via the API.

galaxy.tool_util.toolbox.views.interface module

class galaxy.tool_util.toolbox.views.interface.ToolPanelViewModelType(value)[source]

Bases: str, enum.Enum

An enumeration.

default_type = 'default'
generic = 'generic'
activity = 'activity'
ontology = 'ontology'
publication = 'publication'
training = 'training'
class galaxy.tool_util.toolbox.views.interface.ToolPanelViewModel(*, id: str, model_class: str, name: str, description: str = None, view_type: galaxy.tool_util.toolbox.views.interface.ToolPanelViewModelType, searchable: bool)[source]

Bases: pydantic.main.BaseModel

A view of ToolPanelView objects serialized for the API.

id: str
model_class: str
name: str
description: Optional[str]
view_type: galaxy.tool_util.toolbox.views.interface.ToolPanelViewModelType
searchable: bool
class galaxy.tool_util.toolbox.views.interface.ToolBoxRegistry[source]

Bases: object

View of ToolBox provided to ToolPanelView to reason about tools loaded.

abstract has_tool(tool_id: str) bool[source]

Return bool indicating if tool with specified id is loaded.

abstract get_tool(tool_id: str)[source]

Return tool with supplied tool id.

abstract get_workflow(id: str)[source]

Return workflow from panel with supplied id.

abstract add_tool_to_tool_panel_view(tool, tool_panel_component: galaxy.tool_util.toolbox.panel.HasPanelItems) None[source]

Add tool to the tool panel view component (root or section).

class galaxy.tool_util.toolbox.views.interface.ToolPanelView[source]

Bases: object

abstract apply_view(base_tool_panel: galaxy.tool_util.toolbox.panel.ToolPanelElements, toolbox_registry: galaxy.tool_util.toolbox.views.interface.ToolBoxRegistry) galaxy.tool_util.toolbox.panel.ToolPanelElements[source]

Consume tool panel state and return custom tool panel view.

abstract to_model() galaxy.tool_util.toolbox.views.interface.ToolPanelViewModel[source]

Convert abstract description to dictionary description to emit via the API.

galaxy.tool_util.toolbox.views.interface.walk_loaded_tools(tool_panel: galaxy.tool_util.toolbox.panel.ToolPanelElements, toolbox_registry: galaxy.tool_util.toolbox.views.interface.ToolBoxRegistry)[source]

galaxy.tool_util.toolbox.views.sources module

class galaxy.tool_util.toolbox.views.sources.StaticToolBoxViewSources(view_directories=None, view_dicts=None)[source]

Bases: object

__init__(view_directories=None, view_dicts=None)[source]
view_directories: List[str]
view_dicts: List[Dict]
get_definitions() List[galaxy.tool_util.toolbox.views.definitions.StaticToolBoxView][source]
galaxy.tool_util.toolbox.views.sources.looks_like_view_source_filename(filename: str) bool[source]

galaxy.tool_util.toolbox.views.static module

galaxy.tool_util.toolbox.views.static.build_filter(excludes_)[source]
class galaxy.tool_util.toolbox.views.static.StaticToolPanelView(definition: galaxy.tool_util.toolbox.views.definitions.StaticToolBoxView)[source]

Bases: galaxy.tool_util.toolbox.views.interface.ToolPanelView

__init__(definition: galaxy.tool_util.toolbox.views.definitions.StaticToolBoxView)[source]
apply_view(base_tool_panel: galaxy.tool_util.toolbox.panel.ToolPanelElements, toolbox_registry: galaxy.tool_util.toolbox.views.interface.ToolBoxRegistry) galaxy.tool_util.toolbox.panel.ToolPanelElements[source]

Consume tool panel state and return custom tool panel view.

to_model() galaxy.tool_util.toolbox.views.interface.ToolPanelViewModel[source]

Convert abstract description to dictionary description to emit via the API.