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.

galaxy.webapps.tool_shed.controllers package

Galaxy tool shed controllers.

Submodules

galaxy.webapps.tool_shed.controllers.admin module

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

Bases: galaxy.web.base.controller.BaseUIController, tool_shed.util.admin_util.Admin

user_list_grid = <tool_shed.grids.admin_grids.UserGrid object>
role_list_grid = <tool_shed.grids.admin_grids.RoleGrid object>
group_list_grid = <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 = <galaxy.web.framework.helpers.grids.GridOperation object>
undelete_operation = <galaxy.web.framework.helpers.grids.GridOperation object>
purge_operation = <galaxy.web.framework.helpers.grids.GridOperation object>
browse_repositories(trans, *args, **kwargs)[source]
browse_repository_metadata(trans, *args, **kwargs)[source]
create_category(trans, *args, **kwargs)[source]
delete_repository(trans, *args, **kwargs)[source]
delete_repository_metadata(trans, *args, **kwargs)[source]
edit_category(trans, *args, **kwargs)[source]

Handle requests to edit TS category name or description

manage_categories(trans, *args, **kwargs)[source]
regenerate_statistics(trans, *args, **kwargs)[source]
manage_role_associations(trans, *args, **kwargs)[source]

Manage users, groups and repositories associated with a role.

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

galaxy.webapps.tool_shed.controllers.groups module

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

Bases: galaxy.web.base.controller.BaseUIController

index(trans, **kwd)[source]

galaxy.webapps.tool_shed.controllers.hg module

class galaxy.webapps.tool_shed.controllers.hg.HgController(app)[source]

Bases: galaxy.web.base.controller.BaseUIController

handle_request(trans, **kwd)[source]

galaxy.webapps.tool_shed.controllers.repository module

galaxy.webapps.tool_shed.controllers.repository.get_mercurial_default_options_dict(command)[source]

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

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

Bases: galaxy.web.base.controller.BaseUIController, galaxy.webapps.tool_shed.util.ratings_util.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>
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.

check_for_updates(trans, **kwd)[source]

Handle a request from a local Galaxy instance.

contact_owner(trans, id, **kwd)[source]
create_galaxy_docker_image(trans, **kwd)[source]
create_repository(trans, **kwd)[source]
deprecate(trans, *args, **kwargs)[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(trans, repository_id, changeset_revision, **kwd)[source]
export_via_api(trans, **kwd)[source]

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

find_tools(trans, **kwd)[source]
find_workflows(trans, **kwd)[source]
generate_workflow_image(trans, workflow_name, repository_metadata_id=None)[source]

Return an svg image representation of a workflow dictionary created when the workflow was exported.

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, *args, **kwargs)[source]
get_latest_downloadable_changeset_revision(trans, *args, **kwargs)[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, *args, **kwargs)[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, *args, **kwargs)[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, *args, **kwargs)[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, *args, **kwargs)[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, *args, **kwargs)[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, *args, **kwargs)[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]
import_capsule(trans, **kwd)[source]
index(trans, **kwd)[source]
install_repositories_by_revision(trans, **kwd)[source]

Send the list of repository_ids and changeset_revisions to Galaxy so it can begin the installation process. If the value of repository_ids is not received, then the name and owner of a single repository must be received to install a single repository.

load_invalid_tool(trans, repository_id, tool_config, changeset_revision, **kwd)[source]
manage_email_alerts(trans, *args, **kwargs)[source]
manage_repository(trans, *args, **kwargs)[source]
manage_repository_admins(trans, *args, **kwargs)[source]
manage_repository_reviews_of_revision(trans, *args, **kwargs)[source]
multi_select_email_alerts(trans, *args, **kwargs)[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, *args, **kwargs)[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, *args, **kwargs)[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]
select_files_to_delete(trans, id, **kwd)[source]
send_to_owner(trans, id, message='')[source]
set_email_alerts(trans, *args, **kwargs)[source]

Set email alerts for selected repositories.

set_malicious(trans, *args, **kwargs)[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.

upload_capsule(trans, **kwd)[source]
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]
view_workflow(trans, workflow_name, repository_metadata_id, **kwd)[source]

Retrieve necessary information about a workflow from the database so that it can be displayed in an svg image.

validate_changeset_revision(trans, changeset_revision, repository_id)[source]

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

galaxy.webapps.tool_shed.controllers.repository_review module

class galaxy.webapps.tool_shed.controllers.repository_review.RepositoryReviewController(app)[source]

Bases: galaxy.web.base.controller.BaseUIController, galaxy.webapps.tool_shed.util.ratings_util.ItemRatings

component_grid = <tool_shed.grids.repository_review_grids.ComponentGrid object>
repositories_ready_for_review_grid = <tool_shed.grids.repository_review_grids.RepositoriesReadyForReviewGrid object>
repositories_reviewed_by_me_grid = <tool_shed.grids.repository_review_grids.RepositoriesReviewedByMeGrid object>
repositories_with_reviews_grid = <tool_shed.grids.repository_review_grids.RepositoriesWithReviewsGrid object>
repositories_without_reviews_grid = <tool_shed.grids.repository_review_grids.RepositoriesWithoutReviewsGrid object>
repository_reviews_by_user_grid = <tool_shed.grids.repository_review_grids.RepositoryReviewsByUserGrid object>
reviewed_repositories_i_own_grid = <tool_shed.grids.repository_review_grids.ReviewedRepositoriesIOwnGrid object>
repositories_with_no_tool_tests_grid = <tool_shed.grids.repository_review_grids.RepositoriesWithNoToolTestsGrid object>
approve_repository_review(trans, *args, **kwargs)[source]
browse_components(trans, *args, **kwargs)[source]
browse_review(trans, *args, **kwargs)[source]
copy_review(trans, review_to_copy, review)[source]
create_component(trans, *args, **kwargs)[source]
create_review(trans, *args, **kwargs)[source]
edit_component(trans, *args, **kwargs)[source]
edit_review(trans, *args, **kwargs)[source]
manage_components(trans, *args, **kwargs)[source]
manage_repositories_ready_for_review(trans, *args, **kwargs)[source]

A repository is ready to be reviewed if one of the following conditions is met: 1) It contains no tools 2) It contains tools the tools_functionally_correct flag is set to True. This implies that the repository metadata revision was installed and tested

by the Tool Shed’s install and test framework.
manage_repositories_reviewed_by_me(trans, *args, **kwargs)[source]
manage_repositories_with_invalid_tests(trans, *args, **kwargs)[source]

Display a list of repositories that contain tools, have not yet been reviewed, and have invalid functional tests. Tests are defined as invalid if they are missing from the tool config or if defined test data is not included in the repository.

manage_repositories_with_reviews(trans, *args, **kwargs)[source]
manage_repositories_without_reviews(trans, *args, **kwargs)[source]
manage_repository_reviews(trans, *args, **kwargs)[source]
manage_repository_reviews_of_revision(trans, *args, **kwargs)[source]
repository_reviews_by_user(trans, *args, **kwargs)[source]
reviewed_repositories_i_own(trans, *args, **kwargs)[source]
select_previous_review(trans, *args, **kwargs)[source]
view_or_manage_repository(trans, *args, **kwargs)[source]

galaxy.webapps.tool_shed.controllers.upload module

class galaxy.webapps.tool_shed.controllers.upload.UploadController(app)[source]

Bases: galaxy.web.base.controller.BaseUIController

upload(trans, *args, **kwargs)[source]
upload_directory(trans, rdah, tdah, repository, uploaded_directory, upload_point, remove_repo_files_not_in_tar, commit_message, new_repo_alert)[source]

galaxy.webapps.tool_shed.controllers.user module

class galaxy.webapps.tool_shed.controllers.user.User(app)[source]

Bases: galaxy.webapps.galaxy.controllers.user.User

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

Handle Galaxy Log in

create(trans, cntrller='user', redirect_url='', refresh_frames=[], **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, *args, **kwargs)[source]
edit_username(trans, *args, **kwargs)[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]