Warning

This document is for an in-development version 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.

tool_shed.webapp.controllers package

Galaxy tool shed controllers.

Submodules

tool_shed.webapp.controllers.admin module

class tool_shed.webapp.controllers.admin.AdminController(app)[source]

Bases: BaseUIController, Admin

user_list_grid: Grid | None = <tool_shed.grids.admin_grids.UserGrid object>
role_list_grid: Grid | None = <tool_shed.grids.admin_grids.RoleGrid object>
group_list_grid: Grid | None = <tool_shed.grids.admin_grids.GroupGrid object>
manage_category_grid = <tool_shed.grids.admin_grids.ManageCategoryGrid object>
repository_grid = <tool_shed.grids.admin_grids.AdminRepositoryGrid object>
repository_metadata_grid = <tool_shed.grids.admin_grids.RepositoryMetadataGrid object>
delete_operation: GridOperation | None = <galaxy.web.legacy_framework.grids.GridOperation object>
undelete_operation: GridOperation | None = <galaxy.web.legacy_framework.grids.GridOperation object>
purge_operation: GridOperation | None = <galaxy.web.legacy_framework.grids.GridOperation object>
browse_repositories(trans, **kwd)[source]
browse_repository_metadata(trans, **kwd)[source]
create_category(trans, **kwd)[source]
delete_repository(trans, **kwd)[source]
delete_repository_metadata(trans, **kwd)[source]
edit_category(trans, **kwd)[source]

Handle requests to edit TS category name or description

manage_categories(trans, **kwd)[source]
regenerate_statistics(trans, **kwd)[source]
manage_role_associations(trans, **kwd)[source]

Manage users, groups and repositories associated with a role.

reset_metadata_on_selected_repositories_in_tool_shed(trans, **kwd)[source]
undelete_repository(trans, **kwd)[source]
mark_category_deleted(trans, **kwd)[source]
purge_category(trans, **kwd)[source]
undelete_category(trans, **kwd)[source]

tool_shed.webapp.controllers.groups module

class tool_shed.webapp.controllers.groups.Group(app)[source]

Bases: BaseUIController

index(trans, **kwd)[source]

tool_shed.webapp.controllers.hg module

class tool_shed.webapp.controllers.hg.PortAsStringMiddleware(application)[source]

Bases: object

__init__(application)[source]
class tool_shed.webapp.controllers.hg.HgController(app)[source]

Bases: BaseUIController

handle_request(trans, **kwd)[source]

tool_shed.webapp.controllers.repository module

tool_shed.webapp.controllers.repository.get_mercurial_default_options_dict(command)[source]

Borrowed from repoman - get default parameters for a mercurial command.

class tool_shed.webapp.controllers.repository.RepositoryController(app)[source]

Bases: BaseUIController, ItemRatings

category_grid = <tool_shed.grids.repository_grids.CategoryGrid object>
datatypes_grid = <tool_shed.grids.repository_grids.DatatypesGrid object>
deprecated_repositories_i_own_grid = <tool_shed.grids.repository_grids.DeprecatedRepositoriesIOwnGrid object>
email_alerts_repository_grid = <tool_shed.grids.repository_grids.EmailAlertsRepositoryGrid object>
docker_image_grid = <tool_shed.grids.repository_grids.DockerImageGrid object>
install_matched_repository_grid = <tool_shed.grids.repository_grids.InstallMatchedRepositoryGrid object>
matched_repository_grid = <tool_shed.grids.repository_grids.MatchedRepositoryGrid object>
my_writable_repositories_grid = <tool_shed.grids.repository_grids.MyWritableRepositoriesGrid object>
my_writable_repositories_missing_tool_test_components_grid = <tool_shed.grids.repository_grids.MyWritableRepositoriesMissingToolTestComponentsGrid object>
my_writable_repositories_with_invalid_tools_grid = <tool_shed.grids.repository_grids.MyWritableRepositoriesWithInvalidToolsGrid object>
repositories_by_user_grid = <tool_shed.grids.repository_grids.RepositoriesByUserGrid object>
repositories_i_own_grid = <tool_shed.grids.repository_grids.RepositoriesIOwnGrid object>
repositories_i_can_administer_grid = <tool_shed.grids.repository_grids.RepositoriesICanAdministerGrid object>
repositories_in_category_grid = <tool_shed.grids.repository_grids.RepositoriesInCategoryGrid object>
repositories_missing_tool_test_components_grid = <tool_shed.grids.repository_grids.RepositoriesMissingToolTestComponentsGrid object>
repositories_with_invalid_tools_grid = <tool_shed.grids.repository_grids.RepositoriesWithInvalidToolsGrid object>
repository_dependencies_grid = <tool_shed.grids.repository_grids.RepositoryDependenciesGrid object>
repository_grid = <tool_shed.grids.repository_grids.RepositoryGrid object>
repository_metadata_grid = <tool_shed.grids.repository_grids.RepositoryMetadataGrid object>
tool_dependencies_grid = <tool_shed.grids.repository_grids.ToolDependenciesGrid object>
tools_grid = <tool_shed.grids.repository_grids.ToolsGrid object>
valid_category_grid = <tool_shed.grids.repository_grids.ValidCategoryGrid object>
valid_repository_grid = <tool_shed.grids.repository_grids.ValidRepositoryGrid object>
browse_categories(trans, **kwd)[source]
browse_datatypes(trans, **kwd)[source]
browse_deprecated_repositories_i_own(trans, **kwd)[source]
browse_my_writable_repositories(trans, **kwd)[source]
browse_my_writable_repositories_missing_tool_test_components(trans, **kwd)[source]
browse_my_writable_repositories_with_invalid_tools(trans, **kwd)[source]
browse_repositories(trans, **kwd)[source]
browse_repositories_by_user(trans, **kwd)[source]

Display the list of repositories owned by a specified user.

browse_repositories_i_can_administer(trans, **kwd)[source]
browse_repositories_i_own(trans, **kwd)[source]
browse_repositories_in_category(trans, **kwd)[source]
browse_repositories_missing_tool_test_components(trans, **kwd)[source]
browse_repositories_with_invalid_tools(trans, **kwd)[source]
browse_repository(trans, id, **kwd)[source]
browse_repository_dependencies(trans, **kwd)[source]
browse_tools(trans, **kwd)[source]
browse_tool_dependencies(trans, **kwd)[source]
browse_valid_categories(trans, **kwd)[source]

Filter repositories per category by those that are valid for installing into Galaxy.

browse_valid_repositories(trans, **kwd)[source]

Filter repositories to those that are installable into Galaxy.

create_galaxy_docker_image(trans, **kwd)[source]
create_repository(trans, **kwd)[source]
deprecate(trans, **kwd)[source]

Mark a repository in the tool shed as deprecated or not deprecated.

display_image_in_repository(trans, **kwd)[source]

Open an image file that is contained in repository or that is referenced by a URL for display. The image can be defined in either a README.rst file contained in the repository or the help section of a Galaxy tool config that is contained in the repository. The following image definitions are all supported. The former $PATH_TO_IMAGES is no longer required, and is now ignored. .. image:: https://raw.github.com/galaxy/some_image.png .. image:: $PATH_TO_IMAGES/some_image.png .. image:: /static/images/some_image.gif .. image:: some_image.jpg .. image:: /deep/some_image.png

display_tool(trans, repository_id, tool_config, changeset_revision, **kwd)[source]
download(trans, repository_id, changeset_revision, file_type, **kwd)[source]

Download an archive of the repository files compressed as zip, gz or bz2.

export_via_api(trans, **kwd)[source]

Return an exported gzip compressed repository archive file opened for reading.

find_tools(trans, **kwd)[source]
get_changeset_revision_and_ctx_rev(trans, **kwd)[source]

Handle a request from a local Galaxy instance to retrieve the changeset revision hash to which an installed repository can be updated.

get_ctx_rev(trans, **kwd)[source]

Given a repository and changeset_revision, return the correct ctx.rev() value.

get_file_contents(trans, file_path, repository_id)[source]
get_latest_downloadable_changeset_revision(trans, **kwd)[source]

Return the latest installable changeset revision for the repository associated with the received name and owner. This method is called from Galaxy when attempting to install the latest revision of an installed repository.

get_readme_files(trans, **kwd)[source]

This method is called when installing or re-installing a single repository into a Galaxy instance. If the received changeset_revision includes one or more readme files, return them in a dictionary.

get_repository_dependencies(trans, **kwd)[source]

Return an encoded dictionary of all repositories upon which the contents of the received repository depends.

get_repository_id(trans, **kwd)[source]

Given a repository name and owner, return the encoded repository id.

get_repository_information(trans, repository_ids, changeset_revisions, **kwd)[source]

Generate a list of dictionaries, each of which contains the information about a repository that will be necessary for installing it into a local Galaxy instance.

get_repository_type(trans, **kwd)[source]

Given a repository name and owner, return the type.

get_required_repo_info_dict(trans, encoded_str=None)[source]

Retrieve and return a dictionary that includes a list of dictionaries that each contain all of the information needed to install the list of repositories defined by the received encoded_str.

get_tool_dependencies(trans, **kwd)[source]

Handle a request from a Galaxy instance to get the tool_dependencies entry from the metadata for a specified changeset revision.

get_tool_dependencies_config_contents(trans, **kwd)[source]

Handle a request from a Galaxy instance to get the tool_dependencies.xml file contents for a specified changeset revision.

get_tool_dependency_definition_metadata(trans, **kwd)[source]

Given a repository name and ownerof a repository whose type is tool_dependency_definition, return the current metadata.

get_tool_versions(trans, **kwd)[source]

For each valid /downloadable change set (up to the received changeset_revision) in the repository’s change log, append the changeset tool_versions dictionary to the list that will be returned.

get_updated_repository_information(trans, name, owner, changeset_revision, **kwd)[source]

Generate a dictionary that contains the information about a repository that is necessary for installing it into a local Galaxy instance.

help(trans, **kwd)[source]
index(trans, **kwd)[source]
load_invalid_tool(trans, repository_id, tool_config, changeset_revision, **kwd)[source]
manage_email_alerts(trans, **kwd)[source]
manage_repository(trans, id, **kwd)[source]
manage_repository_admins(trans, id, **kwd)[source]
multi_select_email_alerts(trans, **kwd)[source]
next_installable_changeset_revision(trans, **kwd)[source]

Handle a request from a Galaxy instance where the changeset_revision defined for a repository in a dependency definition file is older than the changeset_revision associated with the installed repository.

open_folder(trans, folder_path, repository_id)[source]
preview_tools_in_changeset(trans, repository_id, **kwd)[source]
previous_changeset_revisions(trans, from_tip=False, **kwd)[source]

Handle a request from a local Galaxy instance. This method will handle two scenarios: (1) the repository was previously installed using an older changeset_revsion, but later the repository was updated in the tool shed and the Galaxy admin is trying to install the latest changeset revision of the same repository instead of updating the one that was previously installed. (2) the admin is attempting to get updates for an installed repository that has a repository dependency and both the repository and its dependency have available updates. In this case, the from_tip parameter will be True because the repository dependency definition may define a changeset hash for the dependency that is newer than the installed changeset revision of the dependency (this is due to the behavior of “Tool dependency definition” repositories, whose metadata is always the tip), so the complete list of changset hashes in the changelog must be returned.

rate_repository(trans, **kwd)[source]

Rate a repository and return updated rating data.

reset_all_metadata(trans, id, **kwd)[source]

Reset all metadata on the complete changelog for a single repository in the tool shed.

reset_metadata_on_my_writable_repositories_in_tool_shed(trans, **kwd)[source]
set_email_alerts(trans, **kwd)[source]

Set email alerts for selected repositories.

set_malicious(trans, id, ctx_str, **kwd)[source]
sharable_owner(trans, owner)[source]

Support for sharable URL for each repository owner’s tools, e.g. http://example.org/view/owner.

sharable_repository(trans, owner, name)[source]

Support for sharable URL for a specified repository, e.g. http://example.org/view/owner/name.

sharable_repository_revision(trans, owner, name, changeset_revision)[source]

Support for sharable URL for a specified repository revision, e.g. http://example.org/view/owner/name/changeset_revision.

updated_changeset_revisions(trans, **kwd)[source]

Handle a request from a local Galaxy instance to retrieve the list of changeset revisions to which an installed repository can be updated. This method will return a string of comma-separated changeset revision hashes for all available updates to the received changeset revision. Among other things , this method handles the scenario where an installed tool shed repository’s tool_dependency definition file defines a changeset revision for a complex repository dependency that is outdated. In other words, a defined changeset revision is older than the current changeset revision for the required repository, making it impossible to discover the repository without knowledge of revisions to which it could have been updated.

view_changelog(trans, id, **kwd)[source]
view_changeset(trans, id, ctx_str, **kwd)[source]
view_or_manage_repository(trans, **kwd)[source]
view_repository(trans, id, **kwd)[source]
view_tool_metadata(trans, repository_id, changeset_revision, tool_id, **kwd)[source]
validate_changeset_revision(trans, changeset_revision, repository_id)[source]

In case changeset revision is invalid send them to the repository page

tool_shed.webapp.controllers.repository.get_first_repository_metadata(session)[source]
tool_shed.webapp.controllers.repository.get_current_repositories(session)[source]
tool_shed.webapp.controllers.repository.get_current_email_alert_repositories(session)[source]

tool_shed.webapp.controllers.repository_review module

tool_shed.webapp.controllers.upload module

tool_shed.webapp.controllers.user module

class tool_shed.webapp.controllers.user.User(app: StructuredApp)[source]

Bases: User

index(trans, cntrller='user', **kwd)[source]
login(trans, refresh_frames=None, **kwd)[source]

Handle Galaxy Log in

create(trans, cntrller='user', redirect_url='', refresh_frames=None, **kwd)[source]
reset_password(trans, email=None, **kwd)[source]

Reset the user’s password. Send an email with token that allows a password change.

manage_user_info(trans, cntrller, **kwd)[source]

Manage a user’s login, password, public username, type, addresses, etc.

api_keys(trans, cntrller, **kwd)[source]
edit_username(trans, cntrller, **kwd)[source]
edit_info(trans, cntrller, **kwd)[source]

Edit user information = username, email or password.

change_password(trans, token=None, id=None, **kwd)[source]

Provides a form with which one can change their password. If token is provided, don’t require current password.

logout(trans, logout_all=False, **kwd)[source]