galaxy.tours package

galaxy.tours.build_tours_registry(tour_directories: str)[source]
class galaxy.tours.ToursRegistry[source]

Bases: ABC

abstract get_tours() TourList[source]

Return list of tours.

abstract tour_contents(tour_id: str) TourDetails[source]

Return tour contents.

abstract load_tour(tour_id: str) TourDetails[source]

Reload tour and return its contents.

class galaxy.tours.Tour(*, name: str, description: str, tags: List[str], requirements: List[Requirement], id: str)[source]

Bases: TourCore

id: str
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'use_enum_values': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'description': FieldInfo(annotation=str, required=True, title='Description', description='Tour description'), 'id': FieldInfo(annotation=str, required=True, title='Identifier', description='Tour identifier'), 'name': FieldInfo(annotation=str, required=True, title='Name', description='Name of tour'), 'requirements': FieldInfo(annotation=List[galaxy.tours._schema.Requirement], required=True, title='Requirements', description='Requirements to run the tour.'), 'tags': FieldInfo(annotation=List[str], required=True, title='Tags', description='Topic topic tags')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class galaxy.tours.TourCore(*, name: str, description: str, tags: List[str], requirements: List[Requirement])[source]

Bases: BaseModel

name: str
description: str
tags: List[str]
requirements: List[Requirement]
model_config: ClassVar[ConfigDict] = {'use_enum_values': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_fields: ClassVar[dict[str, FieldInfo]] = {'description': FieldInfo(annotation=str, required=True, title='Description', description='Tour description'), 'name': FieldInfo(annotation=str, required=True, title='Name', description='Name of tour'), 'requirements': FieldInfo(annotation=List[galaxy.tours._schema.Requirement], required=True, title='Requirements', description='Requirements to run the tour.'), 'tags': FieldInfo(annotation=List[str], required=True, title='Tags', description='Topic topic tags')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class galaxy.tours.TourDetails(*, name: str, description: str, tags: List[str], requirements: List[Requirement], title_default: str | None = None, steps: List[TourStep])[source]

Bases: TourCore

title_default: str | None
steps: List[TourStep]
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'use_enum_values': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'description': FieldInfo(annotation=str, required=True, title='Description', description='Tour description'), 'name': FieldInfo(annotation=str, required=True, title='Name', description='Name of tour'), 'requirements': FieldInfo(annotation=List[galaxy.tours._schema.Requirement], required=True, title='Requirements', description='Requirements to run the tour.'), 'steps': FieldInfo(annotation=List[galaxy.tours._schema.TourStep], required=True, title='Steps', description='Tour steps'), 'tags': FieldInfo(annotation=List[str], required=True, title='Tags', description='Topic topic tags'), 'title_default': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Default title', description='Default title for each step')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class galaxy.tours.TourList(root: RootModelRootType = PydanticUndefined)[source]

Bases: RootModel

root: List[Tour]
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'root': FieldInfo(annotation=List[galaxy.tours._schema.Tour], required=False, default=[], title='List of tours')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class galaxy.tours.TourStep(*, title: str | None = None, content: str | None = None, element: str | None = None, placement: str | None = None, preclick: bool | List[str] | None = None, postclick: bool | List[str] | None = None, textinsert: str | None = None)[source]

Bases: BaseModel

title: str | None
content: str | None
element: str | None
placement: str | None
preclick: bool | List[str] | None
postclick: bool | List[str] | None
textinsert: str | None
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'content': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Content', description='Text shown to the user'), 'element': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Element', description='CSS selector for the element to be described/clicked'), 'placement': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Placement', description='Placement of the text box relative to the selected element'), 'postclick': FieldInfo(annotation=Union[bool, List[str], NoneType], required=False, default=None, title='Post-click', description='Elements that receive a click() event after the step is shown'), 'preclick': FieldInfo(annotation=Union[bool, List[str], NoneType], required=False, default=None, title='Pre-click', description='Elements that receive a click() event before the step is shown'), 'textinsert': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Text-insert', description='Text to insert if element is a text box (e.g. tool search or upload)'), 'title': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Title', description='Title displayed in the header of the step container')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

Submodules

galaxy.tours.validate module

galaxy.tours.validate.main(argv=None)[source]