weaver.provenance
Definitions related to Provenance features and the W3C PROV
specification.
Module Contents
- class weaver.provenance.ProvenancePathType[source]
Constants container that provides similar functionalities to
ExtendedEnum
without explicit Enum membership.- classmethod get(prov: weaver.typedefs.AnyKey | weaver.base.EnumType | ProvenancePathType, default: Any | None = None, run_id: str | None = None) ProvenancePathType | None [source]
- class weaver.provenance.ProvenanceFormat[source]
Constants container that provides similar functionalities to
ExtendedEnum
without explicit Enum membership.- classmethod get(prov_format: AnyProvenanceFormat | None, default: Any | None = None, allow_media_type: bool = False) ProvenanceFormat | None [source]
- classmethod media_types() List[weaver.formats.ContentType] [source]
- classmethod formats() List[ProvenanceFormat] [source]
- classmethod as_media_type(prov_format: AnyProvenanceFormat | None) weaver.formats.AnyContentType | None [source]
- classmethod resolve_compatible_formats(prov: ProvenancePathType | str | None, prov_format: ProvenanceFormat | str | None, output_format: weaver.formats.OutputFormat | str | None) Tuple[ProvenanceFormat | None, str | None] [source]
Resolves multiple
OutputFormat
andProvenanceFormat
combinations for compatible formats.Compatible formats depend on the PROV endpoint being requested. If output format is not specified, apply the corresponding PROV format that will work transparently. Otherwise, ensure they are aligned against the expected PROV endpoints and supported Media-Types.
- Returns:
Tuple of a resolved PROV format if only the output format was specified, and the relevant error detail if they are incompatible.
- class weaver.provenance.WeaverResearchObject(job: weaver.datatype.Job, settings: weaver.typedefs.AnySettingsContainer, fs_access: cwltool.stdfsaccess.StdFsAccess, temp_prefix_ro: str = 'tmp', orcid: str = '', full_name: str = '')[source]
Defines extended Provenance details with Weaver operations and referencing the active server instance.
Initialize the ResearchObject.
- static sha1_uuid(document: prov.model.ProvDocument, identifier: str) str [source]
Generate a prefixed SHA1 hash from the identifier value.