Graphical visualisation support for prov.model.
This module produces graphical visualisation for provenanve graphs. Requires pydotplus module and Graphviz.
References:
Convert a provenance bundle/document into a DOT graphical representation.
Parameters: |
|
---|---|
Returns: | pydot.Dot – the Dot object. |
Convert a MultiDiGraph back to a ProvDocument.
Parameters: | g – The graph instance to convert. |
---|
Convert a ProvDocument to a MultiDiGraph instance of the NetworkX library.
Parameters: | prov_document – The ProvDocument instance to convert. |
---|
Bases: object
Base class for all identifiers and also represents xsd:anyURI
Python implementation of the W3C Provenance Data Model (PROV-DM), including support for PROV-JSON import/export
References:
PROV-DM: http://www.w3.org/TR/prov-dm/ PROV-JSON: https://provenance.ecs.soton.ac.uk/prov-json/
Bases: dict
Bases: prov.model.ProvElement
Bases: prov.model.ProvElement
Bases: prov.model.ProvRelation
Bases: prov.model.ProvRelation
Bases: prov.model.ProvRelation
Bases: object
Convenience function to plot a prov document.
Parameters: |
|
---|
name (instead of its identifier). :type use_labels: bool :param show_element_attributes: shows attributes of elements. :type show_element_attributes: bool :param show_relation_attributes: shows attributes of relations. :type show_relation_attributes: bool
Unifies all records in the bundle that haves same identifiers
Returns: | ProvBundle – the new unified bundle. |
---|
Append all the records of the other ProvBundle into this bundle.
Parameters: | other (ProvBundle) – the other bundle whose records to be appended. |
---|---|
Returns: | None. |
Bases: prov.model.ProvRelation
Bases: prov.model.ProvRelation
Bases: prov.model.ProvRelation
Bases: prov.model.ProvBundle
Deserialize the ProvDocument from source (a stream or a filepath) or directly from a string content
Format defaults to PROV-JSON.
Flattens the document by moving all the records in its bundles up to the document level.
Returns: | ProvDocument – the (new) flattened document. |
---|
Serialize the ProvDocument to destination
If destination is None serialize method returns the serialization as a string. Format defaults to PROV-JSON.
Returns a new document containing all records having same identifiers unified (including those inside bundles)
Append all the records of the other document/bundle into this document. Bundles having same identifiers will be merged.
Parameters: | other (ProvDocument or ProvBundle) – the other document/bundle whose records to be appended. |
---|---|
Returns: | None. |
Bases: prov.model.ProvRecord
Bases: prov.model.ProvException
Bases: prov.model.ProvRelation
Bases: prov.model.ProvElement
Bases: prov.Error
Base class for PROV model exceptions.
Bases: prov.model.ProvException
Bases: prov.model.ProvRelation
Bases: prov.model.ProvRelation
Bases: prov.model.ProvRelation
Bases: prov.model.ProvRelation
Bases: prov.model.ProvSpecialization
Bases: object
Base class for PROV records.
Bases: prov.model.ProvRecord
Bases: prov.model.ProvRelation
Bases: prov.model.ProvRelation
Bases: prov.model.ProvRelation
Bases: exceptions.Exception
Base class for all errors in this package.
Convenience function returning a ProvDocument instance.
It does a lazy format detection by simply using try/except for all known formats. The deserializers should fail fairly early when data of the wrong type is passed to them thus the try/except is likely cheap. One could of course also do some more advanced format auto-detection but I am not sure that is necessary.
The downside is that no proper error messages will be produced, use the format parameter to get the actual traceback.