Provenance

Extract provenance information from the repository.

Activities

class renku.models.provenance.activities.Activity(*, commit=None, client=None, path=None, label=NOTHING, project=NOTHING, id=NOTHING, message=NOTHING, was_informed_by=NOTHING, part_of=None, process=None, outputs=NOTHING, generated=NOTHING, influenced=NOTHING, started_at_time=NOTHING, ended_at_time=NOTHING)[source]

Represent an activity in the repository.

Type:

"prov:Activity"

Context:

{
  "dcterms": "http://purl.org/dc/terms/",
  "prov": "http://www.w3.org/ns/prov#",
  "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
  "path": "prov:atLocation",
  "_label": "rdfs:label",
  "_project": "dcterms:isPartOf",
  "_id": "@id",
  "_message": "rdfs:comment",
  "_was_informed_by": "prov:wasInformedBy",
  "generated": {
    "@reverse": "prov:activity"
  },
  "influenced": "prov:influenced",
  "started_at_time": {
    "@id": "prov:startedAtTime",
    "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
  },
  "ended_at_time": {
    "@id": "prov:endedAtTime",
    "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
  }
}
default_ended_at_time()[source]

Configure calculated properties.

default_generated()[source]

Calculate default values.

default_id()[source]

Configure calculated ID.

default_influenced()[source]

Calculate default values.

default_label()

Generate a default label.

default_message()[source]

Generate a default message.

default_outputs()[source]

Guess default outputs from a commit.

default_project()

Generate a default location.

default_reference()

Create a default reference path.

default_started_at_time()[source]

Configure calculated properties.

default_was_informed_by()[source]

List parent actions.

classmethod from_jsonld(data, __reference__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path)

Return an instance from a YAML file.

classmethod generate_id(commit)[source]

Calculate action ID.

nodes

Return topologically sorted nodes.

parents

Return parent commits.

paths

Return all paths in the commit.

submodules

Proxy to client submodules.

class renku.models.provenance.activities.ProcessRun(*, commit=None, client=None, path=None, label=NOTHING, project=NOTHING, id=NOTHING, message=NOTHING, was_informed_by=NOTHING, part_of=None, process=None, influenced=NOTHING, started_at_time=NOTHING, ended_at_time=NOTHING, inputs=NOTHING, outputs=NOTHING, generated=NOTHING, association=None, qualified_usage=NOTHING)[source]

A process run is a particular execution of a Process description.

Type:

["prov:Activity", "wfprov:ProcessRun"]

Context:

{
  "wfprov": "http://purl.org/wf4ever/wfprov#",
  "dcterms": "http://purl.org/dc/terms/",
  "prov": "http://www.w3.org/ns/prov#",
  "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
  "path": "prov:atLocation",
  "_label": "rdfs:label",
  "_project": "dcterms:isPartOf",
  "_id": "@id",
  "_message": "rdfs:comment",
  "_was_informed_by": "prov:wasInformedBy",
  "generated": {
    "@reverse": "prov:activity"
  },
  "influenced": "prov:influenced",
  "started_at_time": {
    "@id": "prov:startedAtTime",
    "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
  },
  "ended_at_time": {
    "@id": "prov:endedAtTime",
    "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
  },
  "association": "prov:qualifiedAssociation",
  "qualified_usage": "prov:qualifiedUsage"
}
default_ended_at_time()

Configure calculated properties.

default_generated()[source]

Calculate default values.

default_id()

Configure calculated ID.

default_influenced()

Calculate default values.

default_inputs()[source]

Guess default inputs from a process.

default_label()

Generate a default label.

default_message()

Generate a default message.

default_outputs()[source]

Guess default outputs from a process.

default_project()

Generate a default location.

default_qualified_usage()[source]

Generate list of used artifacts.

default_reference()

Create a default reference path.

default_started_at_time()

Configure calculated properties.

default_was_informed_by()

List parent actions.

classmethod from_jsonld(data, __reference__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path)

Return an instance from a YAML file.

classmethod generate_id(commit)

Calculate action ID.

iter_output_files(commit=None)[source]

Yield tuples with output id and path.

nodes

Return topologically sorted nodes.

parents

Return parent commits.

paths

Return all paths in the commit.

submodules

Proxy to client submodules.

class renku.models.provenance.activities.WorkflowRun(*, commit=None, client=None, path=None, label=NOTHING, project=NOTHING, id=NOTHING, message=NOTHING, was_informed_by=NOTHING, part_of=None, process=None, influenced=NOTHING, started_at_time=NOTHING, ended_at_time=NOTHING, inputs=NOTHING, association=None, qualified_usage=NOTHING, children=NOTHING, processes=NOTHING, subprocesses=NOTHING, outputs=NOTHING, generated=NOTHING)[source]

A workflow run typically contains several subprocesses.

Type:

["prov:Activity", "wfprov:ProcessRun", "wfprov:WorkflowRun"]

Context:

{
  "wfprov": "http://purl.org/wf4ever/wfprov#",
  "dcterms": "http://purl.org/dc/terms/",
  "prov": "http://www.w3.org/ns/prov#",
  "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
  "path": "prov:atLocation",
  "_label": "rdfs:label",
  "_project": "dcterms:isPartOf",
  "_id": "@id",
  "_message": "rdfs:comment",
  "_was_informed_by": "prov:wasInformedBy",
  "generated": {
    "@reverse": "prov:activity"
  },
  "influenced": "prov:influenced",
  "started_at_time": {
    "@id": "prov:startedAtTime",
    "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
  },
  "ended_at_time": {
    "@id": "prov:endedAtTime",
    "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
  },
  "association": "prov:qualifiedAssociation",
  "qualified_usage": "prov:qualifiedUsage",
  "_processes": {
    "@reverse": "wfprov:wasPartOfWorkflowRun"
  }
}
default_children()[source]

Load children from process.

default_ended_at_time()

Configure calculated properties.

default_generated()[source]

Calculate default values.

default_id()

Configure calculated ID.

default_influenced()

Calculate default values.

default_inputs()

Guess default inputs from a process.

default_label()

Generate a default label.

default_message()

Generate a default message.

default_outputs()[source]

Guess default outputs from a workflow.

default_project()

Generate a default location.

default_qualified_usage()

Generate list of used artifacts.

default_reference()

Create a default reference path.

default_started_at_time()

Configure calculated properties.

default_subprocesses()[source]

Load subprocesses.

default_was_informed_by()

List parent actions.

classmethod from_jsonld(data, __reference__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path)

Return an instance from a YAML file.

classmethod generate_id(commit)

Calculate action ID.

iter_output_files(commit=None)[source]

Yield tuples with output id and path.

nodes

Yield all graph nodes.

parents

Return parent commits.

paths

Return all paths in the commit.

submodules

Proxy to client submodules.

Entities and Plans

class renku.models.provenance.entities.Entity(*, commit=None, client=None, path=None, id=NOTHING, label=NOTHING, project=NOTHING, parent=None)[source]

Represent a data value or item.

Type:

["prov:Entity", "wfprov:Artifact"]

Context:

{
  "dcterms": "http://purl.org/dc/terms/",
  "prov": "http://www.w3.org/ns/prov#",
  "wfprov": "http://purl.org/wf4ever/wfprov#",
  "path": "prov:atLocation",
  "_id": "@id",
  "_label": "rdfs:label",
  "_project": "dcterms:isPartOf"
}
default_id()

Configure calculated ID.

default_label()

Generate a default label.

default_project()

Generate a default location.

default_reference()

Create a default reference path.

entities

Yield itself.

classmethod from_jsonld(data, __reference__=None)

Instantiate a JSON-LD class from data.

classmethod from_revision(client, path, revision='HEAD', parent=None)[source]

Return dependency from given path and revision.

classmethod from_yaml(path)

Return an instance from a YAML file.

parent

Return the parent object.

submodules

Proxy to client submodules.

class renku.models.provenance.entities.Collection(*, commit=None, client=None, path=None, id=NOTHING, label=NOTHING, project=NOTHING, parent=None, members=NOTHING)[source]

Represent a directory with files.

Type:

["prov:Collection", "prov:Entity", "wfprov:Artifact"]

Context:

{
  "prov": "http://www.w3.org/ns/prov#",
  "dcterms": "http://purl.org/dc/terms/",
  "wfprov": "http://purl.org/wf4ever/wfprov#",
  "path": "prov:atLocation",
  "_id": "@id",
  "_label": "rdfs:label",
  "_project": "dcterms:isPartOf",
  "members": "prov:hadMember"
}
default_id()

Configure calculated ID.

default_label()

Generate a default label.

default_members()[source]

Generate default members as entities from current path.

default_project()

Generate a default location.

default_reference()

Create a default reference path.

entities

Recursively return all files.

classmethod from_jsonld(data, __reference__=None)

Instantiate a JSON-LD class from data.

classmethod from_revision(client, path, revision='HEAD', parent=None)

Return dependency from given path and revision.

classmethod from_yaml(path)

Return an instance from a YAML file.

parent

Return the parent object.

submodules

Proxy to client submodules.

class renku.models.provenance.entities.Process(*, commit=None, client=None, path=None, id=NOTHING, label=NOTHING, project=NOTHING, activity)[source]

Represent a process.

Type:

["prov:Entity", "prov:Plan", "wfdesc:Process"]

Context:

{
  "wfdesc": "http://purl.org/wf4ever/wfdesc#",
  "prov": "http://www.w3.org/ns/prov#",
  "path": "prov:atLocation",
  "_id": "@id",
  "_label": "rdfs:label",
  "_project": "dcterms:isPartOf",
  "_activity": "prov:activity"
}
activity

Return the activity object.

default_id()

Configure calculated ID.

default_label()

Generate a default label.

default_project()

Generate a default location.

default_reference()

Create a default reference path.

classmethod from_jsonld(data, __reference__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path)

Return an instance from a YAML file.

submodules

Proxy to client submodules.

class renku.models.provenance.entities.Workflow(*, commit=None, client=None, path=None, id=NOTHING, label=NOTHING, project=NOTHING, activity, subprocesses=NOTHING)[source]

Represent workflow with subprocesses.

Type:

["prov:Entity", "prov:Plan", "wfdesc:Process", "wfdesc:Workflow"]

Context:

{
  "wfdesc": "http://purl.org/wf4ever/wfdesc#",
  "prov": "http://www.w3.org/ns/prov#",
  "path": "prov:atLocation",
  "_id": "@id",
  "_label": "rdfs:label",
  "_project": "dcterms:isPartOf",
  "_activity": "prov:activity",
  "subprocesses": "wfdesc:hasSubProcess"
}
activity

Return the activity object.

default_id()

Configure calculated ID.

default_label()

Generate a default label.

default_project()

Generate a default location.

default_reference()

Create a default reference path.

default_subprocesses()[source]

Load subprocesses.

classmethod from_jsonld(data, __reference__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path)

Return an instance from a YAML file.

submodules

Proxy to client submodules.

Agents

class renku.models.provenance.agents.Person(name, email)[source]

Represent a person.

Type:

["foaf:Person", "prov:Person"]

Context:

{
  "foaf": "http://xmlns.com/foaf/0.1/",
  "prov": "http://purl.org/dc/terms/",
  "name": "rdfs:label",
  "email": {
    "@type": "@id",
    "@id": "foaf:mbox"
  },
  "_id": "@id"
}
check_email(attribute, value)[source]

Check that the email is valid.

default_id()[source]

Configure calculated ID.

default_reference()

Create a default reference path.

classmethod from_commit(commit)[source]

Create an instance from a Git commit.

classmethod from_jsonld(data, __reference__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path)

Return an instance from a YAML file.

class renku.models.provenance.agents.SoftwareAgent(*, label, was_started_by=None, id)[source]

Represent a person.

Type:

["prov:SoftwareAgent", "wfprov:WorkflowEngine"]

Context:

{
  "prov": "http://purl.org/dc/terms/",
  "wfprov": "http://purl.org/wf4ever/wfprov#",
  "label": "rdfs:label",
  "was_started_by": "prov:wasStartedBy",
  "_id": "@id"
}
default_reference()

Create a default reference path.

classmethod from_commit(commit)[source]

Create an instance from a Git commit.

classmethod from_jsonld(data, __reference__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path)

Return an instance from a YAML file.

Relations

class renku.models.provenance.qualified.Usage(*, entity, role=None, id=None)[source]

Represent a dependent path.

Type:

"prov:Usage"

Context:

{
  "prov": "http://www.w3.org/ns/prov#",
  "entity": "prov:entity",
  "role": "prov:hadRole",
  "_id": "@id"
}
default_reference()

Create a default reference path.

classmethod from_jsonld(data, __reference__=None)

Instantiate a JSON-LD class from data.

classmethod from_revision(client, path, revision='HEAD', **kwargs)[source]

Return dependency from given path and revision.

classmethod from_yaml(path)

Return an instance from a YAML file.

class renku.models.provenance.qualified.Generation(entity, role=None, *, activity=None, id=NOTHING)[source]

Represent an act of generating a file.

Type:

"prov:Generation"

Context:

{
  "prov": "http://www.w3.org/ns/prov#",
  "entity": {
    "@reverse": "prov:qualifiedGeneration"
  },
  "role": "prov:hadRole",
  "_id": "@id"
}
activity

Return the activity object.

default_id()[source]

Configure calculated ID.

default_reference()

Create a default reference path.

classmethod from_jsonld(data, __reference__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path)

Return an instance from a YAML file.

Expanded

class renku.models.provenance.expanded.Project(*, id)[source]

Represent a project.

Type:

["foaf:Project", "prov:Location"]

Context:

{
  "foaf": "http://xmlns.com/foaf/0.1/",
  "prov": "http://www.w3.org/ns/prov#",
  "_id": "@id"
}
default_reference()

Create a default reference path.

classmethod from_jsonld(data, __reference__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path)

Return an instance from a YAML file.