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

Submodules

galaxy.tool_shed.metadata.metadata_generator module

class galaxy.tool_shed.metadata.metadata_generator.MetadataGenerator(app, repository=None, changeset_revision=None, repository_clone_url=None, shed_config_dict=None, relative_install_dir=None, repository_files_dir=None, resetting_all_metadata_on_repository=False, updating_installed_repository=False, persist=False, metadata_dict=None, user=None)[source]

Bases: object

__init__(app, repository=None, changeset_revision=None, repository_clone_url=None, shed_config_dict=None, relative_install_dir=None, repository_files_dir=None, resetting_all_metadata_on_repository=False, updating_installed_repository=False, persist=False, metadata_dict=None, user=None)[source]
generate_data_manager_metadata(repo_dir, data_manager_config_filename, metadata_dict, shed_config_dict=None)[source]

Update the received metadata_dict with information from the parsed data_manager_config_filename.

generate_datatypes_metadata(tv, repository_files_dir, datatypes_config, metadata_dict)[source]

Update the received metadata_dict with information from the parsed datatypes_config.

generate_environment_dependency_metadata(elem, valid_tool_dependencies_dict)[source]

The value of env_var_name must match the value of the “set_environment” type in the tool config’s <requirements> tag set, or the tool dependency will be considered an orphan.

generate_guid_for_object(guid_type, obj_id, version)[source]
generate_metadata_for_changeset_revision()[source]

Generate metadata for a repository using its files on disk. To generate metadata for changeset revisions older than the repository tip, the repository will have been cloned to a temporary location and updated to a specified changeset revision to access that changeset revision’s disk files, so the value of self.repository_files_dir will not always be self.repository.repo_path( self.app ) (it could be an absolute path to a temporary directory containing a clone). If it is an absolute path, the value of self.relative_install_dir must contain repository.repo_path( self.app ).

The value of self.persist will be True when the installed repository contains a valid tool_data_table_conf.xml.sample file, in which case the entries should ultimately be persisted to the file referred to by self.app.config.shed_tool_data_table_config.

generate_package_dependency_metadata(elem, valid_tool_dependencies_dict, invalid_tool_dependencies_dict)[source]

Generate the metadata for a tool dependencies package defined for a repository. The value of package_name must match the value of the “package” type in the tool config’s <requirements> tag set.

generate_repository_dependency_metadata(repository_dependencies_config, metadata_dict)[source]

Generate a repository dependencies dictionary based on valid information defined in the received repository_dependencies_config. This method is called from the tool shed as well as from Galaxy.

generate_tool_metadata(tool_config, tool, metadata_dict)[source]

Update the received metadata_dict with changes that have been applied to the received tool.

generate_tool_dependency_metadata(tool_dependencies_config, metadata_dict, original_repository_metadata=None)[source]

If the combination of name, version and type of each element is defined in the <requirement> tag for at least one tool in self.repository, then update the received metadata_dict with information from the parsed tool_dependencies_config.

generate_workflow_metadata(relative_path, exported_workflow_dict, metadata_dict)[source]

Update the received metadata_dict with changes that have been applied to the received exported_workflow_dict.

get_invalid_file_tups()[source]
get_metadata_dict()[source]
get_relative_path_to_repository_file(root, name, relative_install_dir, work_dir, shed_config_dict)[source]
get_sample_files_from_disk(repository_files_dir, tool_path=None, relative_install_dir=None)[source]
handle_repository_elem(repository_elem, only_if_compiling_contained_td=False)[source]

Process the received repository_elem which is a <repository> tag either from a repository_dependencies.xml file or a tool_dependencies.xml file. If the former, we’re generating repository dependencies metadata for a repository in the Tool Shed. If the latter, we’re generating package dependency metadata within Galaxy or the Tool Shed.

set_add_to_tool_panel_attribute_for_tool(tool, guid, datatypes)[source]

Determine if a tool should be loaded into the Galaxy tool panel. Examples of valid tools that should not be displayed in the tool panel are datatypes converters and DataManager tools.

set_changeset_revision(changeset_revision)[source]
set_relative_install_dir(relative_install_dir)[source]
set_repository(repository, relative_install_dir=None, changeset_revision=None)[source]
set_repository_clone_url(repository_clone_url)[source]
set_repository_files_dir(repository_files_dir=None)[source]
update_repository_dependencies_metadata(metadata, repository_dependency_tups, is_valid, description)[source]