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

Define abstraction for capturing the metadata of job’s output datasets.

galaxy.metadata.get_metadata_compute_strategy(app, job_id)[source]
class galaxy.metadata.MetadataCollectionStrategy[source]

Bases: object

Interface describing the abstract process of writing out and collecting output metadata.

invalidate_external_metadata(datasets, sa_session)[source]

Invalidate written files.

set_job_runner_external_pid(pid, sa_session)[source]
cleanup_external_metadata(sa_session)[source]
setup_external_metadata(datasets_dict, sa_session, exec_dir=None, tmp_dir=None, dataset_files_path=None, output_fnames=None, config_root=None, config_file=None, datatypes_config=None, job_metadata=None, compute_tmp_dir=None, include_command=True, max_metadata_value_size=0, kwds=None)[source]

Setup files needed for external metadata collection.

If include_command is True, return full Python command to externally compute metadata otherwise just the arguments to galaxy_ext.metadata.set_metadata required to build.

external_metadata_set_successfully(dataset, name, sa_session, working_directory)[source]

Return boolean indicating if metadata for specified dataset was written properly.

load_metadata(dataset, name, sa_session, working_directory, remote_metadata_directory=None)[source]

Load metadata calculated externally into specified dataset.

class galaxy.metadata.PortableDirectoryMetadataGenerator(job_id)[source]

Bases: galaxy.metadata.MetadataCollectionStrategy

portable = True
__init__(job_id)[source]
setup_external_metadata(datasets_dict, sa_session, exec_dir=None, tmp_dir=None, dataset_files_path=None, output_fnames=None, config_root=None, config_file=None, datatypes_config=None, job_metadata=None, compute_tmp_dir=None, include_command=True, max_metadata_value_size=0, kwds=None)[source]
load_metadata(dataset, name, sa_session, working_directory, remote_metadata_directory=None)[source]
external_metadata_set_successfully(dataset, name, sa_session, working_directory)[source]
class galaxy.metadata.JobExternalOutputMetadataWrapper(job_id)[source]

Bases: galaxy.metadata.MetadataCollectionStrategy

Class with methods allowing set_meta() to be called externally to the Galaxy head. This class allows access to external metadata filenames for all outputs associated with a job. We will use JSON as the medium of exchange of information, except for the DatasetInstance object which will use pickle (in the future this could be JSONified as well)

portable = False
__init__(job_id)[source]
invalidate_external_metadata(datasets, sa_session)[source]
setup_external_metadata(datasets_dict, sa_session, exec_dir=None, tmp_dir=None, dataset_files_path=None, output_fnames=None, config_root=None, config_file=None, datatypes_config=None, job_metadata=None, compute_tmp_dir=None, include_command=True, max_metadata_value_size=0, kwds=None)[source]
external_metadata_set_successfully(dataset, name, sa_session, working_directory)[source]
cleanup_external_metadata(sa_session)[source]
set_job_runner_external_pid(pid, sa_session)[source]
load_metadata(dataset, name, sa_session, working_directory, remote_metadata_directory=None)[source]