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_shed.galaxy_install package


galaxy.tool_shed.galaxy_install.install_manager module

class galaxy.tool_shed.galaxy_install.install_manager.InstallRepositoryManager(app, tpm=None)[source]

Bases: object

__init__(app, tpm=None)[source]
get_repository_components_for_installation(encoded_tsr_id, encoded_tsr_ids, repo_info_dicts, tool_panel_section_keys)[source]

The received encoded_tsr_ids, repo_info_dicts, and tool_panel_section_keys are 3 lists that contain associated elements at each location in the list. This method will return the elements from repo_info_dicts and tool_panel_section_keys associated with the received encoded_tsr_id by determining its location in the received encoded_tsr_ids list.

install(tool_shed_url, name, owner, changeset_revision, install_options)[source]
install_repositories(tsr_ids, decoded_kwd, reinstalling, install_options=None)[source]
install_tool_shed_repository(tool_shed_repository, repo_info_dict, tool_panel_section_key, shed_tool_conf, tool_path, install_resolver_dependencies, install_tool_dependencies, reinstalling=False, tool_panel_section_mapping=None, install_options=None)[source]
update_tool_shed_repository(repository, tool_shed_url, latest_ctx_rev, latest_changeset_revision, install_new_dependencies=True, install_options=None)[source]
order_components_for_installation(tsr_ids, repo_info_dicts, tool_panel_section_keys)[source]

Some repositories may have repository dependencies that are required to be installed before the dependent repository. This method will inspect the list of repositories about to be installed and make sure to order them appropriately. For each repository about to be installed, if required repositories are not contained in the list of repositories about to be installed, then they are not considered. Repository dependency definitions that contain circular dependencies should not result in an infinite loop, but obviously prior installation will not be handled for one or more of the repositories that require prior installation.

update_tool_shed_repository_status(tool_shed_repository, status, error_message=None)[source]

Update the status of a tool shed repository in the process of being installed into Galaxy.

exception galaxy.tool_shed.galaxy_install.install_manager.RepositoriesInstalledException[source]

Bases: RequestParameterInvalidException


galaxy.tool_shed.galaxy_install.installed_repository_manager module

Class encapsulating the management of repositories installed into Galaxy from the Tool Shed.

class galaxy.tool_shed.galaxy_install.installed_repository_manager.InstalledRepositoryManager(app)[source]

Bases: object


Among other things, keep in in-memory sets of tuples defining installed repositories and tool dependencies along with the relationships between each of them. This will allow for quick discovery of those repositories or components that can be uninstalled. The feature allowing a Galaxy administrator to uninstall a repository should not be available to repositories or tool dependency packages that are required by other repositories or their contents (packages). The uninstall feature should be available only at the repository hierarchy level where every dependency will be uninstalled. The exception for this is if an item (repository or tool dependency package) is not in an INSTALLED state - in these cases, the specific item can be uninstalled in order to attempt re-installation.

property tool_paths

Return all possible tool_path attributes of all tool config files.


Activate an installed tool shed repository that has been marked as deactivated.


Add an entry to self.installed_repository_dependencies_of_installed_repositories. A side-effect of this method is the population of self.installed_dependent_repositories_of_installed_repositories. Since this method discovers all repositories required by the received repository, it can use the list to add entries to the reverse dictionary.


Add an entry to self.repository_dependencies_of_installed_repositories.

get_dependencies_for_repository(tool_shed_url, repo_info_dict, includes_tool_dependencies, updating=False)[source]

Return dictionaries containing the sets of installed and missing tool dependencies and repository dependencies associated with the repository defined by the received repo_info_dict.


Return the installed and missing repository dependencies for a tool shed repository that has a record in the Galaxy database, but may or may not be installed. In this case, the repository dependencies are associated with the repository in the database. Do not include a repository dependency if it is required only to compile a tool dependency defined for the dependent repository since these special kinds of repository dependencies are really a dependency of the dependent repository’s contained tool dependency, and only if that tool dependency requires compilation.


Parse the received repository_dependencies dictionary that is associated with a repository being installed into Galaxy for the first time and attempt to determine repository dependencies that are already installed and those that are not.


Return the lists of installed tool dependencies and missing tool dependencies for a set of repositories being installed into Galaxy.

get_repository_dependency_tups_for_installed_repository(repository, dependency_tups=None, status=None)[source]

Return a list of of tuples defining tool_shed_repository objects (whose status can be anything) required by the received repository. The returned list defines the entire repository dependency tree. This method is called only from Galaxy.

get_runtime_dependent_tool_dependency_tuples(tool_dependency, status=None)[source]

Return the list of tool dependency objects that require the received tool dependency at run time. The returned list will be filtered by the received status if it is not None. This method is called only from Galaxy.

handle_existing_tool_dependencies_that_changed_in_update(repository, original_dependency_dict, new_dependency_dict)[source]

This method is called when a Galaxy admin is getting updates for an installed tool shed repository in order to cover the case where an existing tool dependency was changed (e.g., the version of the dependency was changed) but the tool version for which it is a dependency was not changed. In this case, we only want to determine if any of the dependency information defined in original_dependency_dict was changed in new_dependency_dict. We don’t care if new dependencies were added in new_dependency_dict since they will just be treated as missing dependencies for the tool.

uninstall_repository(repository, remove_from_disk=True)[source]

Purge a repository with status New (a white ghost) from the database.


Remove an entry from self.installed_repository_dependencies_of_installed_repositories. A side-effect of this method is removal of appropriate value items from self.installed_dependent_repositories_of_installed_repositories.


Remove an entry from self.repository_dependencies_of_installed_repositories.

repository_dependency_needed_only_for_compiling_tool_dependency(repository, repository_dependency)[source]
set_only_if_compiling_contained_td(repository, required_repository)[source]

Return True if the received required_repository is only needed to compile a tool dependency defined for the received repository.

set_prior_installation_required(repository, required_repository)[source]

Return True if the received required_repository must be installed before the received repository.

update_existing_tool_dependency(repository, original_dependency_dict, new_dependencies_dict)[source]

Update an exsiting tool dependency whose definition was updated in a change set pulled by a Galaxy administrator when getting updates to an installed tool shed repository. The original_dependency_dict is a single tool dependency definition, an example of which is:

{"name": "bwa",
 "readme": "\nCompiling BWA requires zlib and libpthread to be present on your system.\n        ",
 "type": "package",
 "version": "0.6.2"}

The new_dependencies_dict is the dictionary generated by the metadata_util.generate_tool_dependency_metadata method.

galaxy.tool_shed.galaxy_install.update_repository_manager module

Determine if installed tool shed repositories have updates available in their respective tool sheds.

class galaxy.tool_shed.galaxy_install.update_repository_manager.UpdateRepositoryManager(app)[source]

Bases: object


Return the changeset revision hash to which the repository can be updated.

update_repository_record(repository, updated_metadata_dict, updated_changeset_revision, updated_ctx_rev)[source]

Update a tool_shed_repository database record with new information retrieved from the Tool Shed. This happens when updating an installed repository to a new changeset revision.

class galaxy.tool_shed.galaxy_install.update_repository_manager.Sleeper[source]

Bases: object

Provides a ‘sleep’ method that sleeps for a number of seconds unless the notify method is called (from a different thread).