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, agent=SoftwareAgent(label='renku 0.6.1.dev1', was_started_by=None, _id='https://github.com/swissdatasciencecenter/renku-python/tree/v0.6.1.dev1'), person_agent=NOTHING)[source]

Represent an activity in the repository.

Type:

"prov:Activity"

Context:

{
  "prov": "http://www.w3.org/ns/prov#",
  "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
  "path": "prov:atLocation",
  "_label": "rdfs:label",
  "_project": "schema: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"
  },
  "agent": "prov:agent",
  "person_agent": "prov:agent"
}
asjsonld()

Create JSON-LD with the original source data.

default_ended_at_time()[source]

Configure calculated properties.

default_generated()[source]

Entities generated by this Action.

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_person_agent()[source]

Set person agent to be the author of the 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, client=None, commit=None, __reference__=None, __source__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path, client=None, commit=None)

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.

to_yaml()

Store an instance to the referenced YAML file.

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, agent=SoftwareAgent(label='renku 0.6.1.dev1', was_started_by=None, _id='https://github.com/swissdatasciencecenter/renku-python/tree/v0.6.1.dev1'), person_agent=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#",
  "prov": "http://www.w3.org/ns/prov#",
  "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
  "path": "prov:atLocation",
  "_label": "rdfs:label",
  "_project": "schema: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"
  },
  "agent": "prov:agent",
  "person_agent": "prov:agent",
  "association": "prov:qualifiedAssociation",
  "qualified_usage": "prov:qualifiedUsage"
}
asjsonld()

Create JSON-LD with the original source data.

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_person_agent()

Set person agent to be the author of the commit.

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, client=None, commit=None, __reference__=None, __source__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path, client=None, commit=None)

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.

to_yaml()

Store an instance to the referenced YAML file.

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, agent=SoftwareAgent(label='renku 0.6.1.dev1', was_started_by=None, _id='https://github.com/swissdatasciencecenter/renku-python/tree/v0.6.1.dev1'), person_agent=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#",
  "prov": "http://www.w3.org/ns/prov#",
  "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
  "path": "prov:atLocation",
  "_label": "rdfs:label",
  "_project": "schema: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"
  },
  "agent": "prov:agent",
  "person_agent": "prov:agent",
  "association": "prov:qualifiedAssociation",
  "qualified_usage": "prov:qualifiedUsage",
  "_processes": {
    "@reverse": "wfprov:wasPartOfWorkflowRun"
  }
}
asjsonld()

Create JSON-LD with the original source data.

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_person_agent()

Set person agent to be the author of the commit.

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, client=None, commit=None, __reference__=None, __source__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path, client=None, commit=None)

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.

to_yaml()

Store an instance to the referenced YAML file.

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:

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

Create JSON-LD with the original source data.

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, client=None, commit=None, __reference__=None, __source__=None)

Instantiate a JSON-LD class from data.

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

Return dependency from given path and revision.

classmethod from_yaml(path, client=None, commit=None)

Return an instance from a YAML file.

parent

Return the parent object.

submodules

Proxy to client submodules.

to_yaml()

Store an instance to the referenced YAML file.

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#",
  "schema": "http://schema.org/",
  "wfprov": "http://purl.org/wf4ever/wfprov#",
  "path": "prov:atLocation",
  "_id": "@id",
  "_label": "rdfs:label",
  "_project": "schema:isPartOf",
  "members": "prov:hadMember"
}
asjsonld()

Create JSON-LD with the original source data.

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, client=None, commit=None, __reference__=None, __source__=None)

Instantiate a JSON-LD class from data.

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

Return dependency from given path and revision.

classmethod from_yaml(path, client=None, commit=None)

Return an instance from a YAML file.

parent

Return the parent object.

submodules

Proxy to client submodules.

to_yaml()

Store an instance to the referenced YAML file.

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": "schema:isPartOf",
  "_activity": "prov:activity"
}
activity

Return the activity object.

asjsonld()

Create JSON-LD with the original source data.

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, client=None, commit=None, __reference__=None, __source__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path, client=None, commit=None)

Return an instance from a YAML file.

submodules

Proxy to client submodules.

to_yaml()

Store an instance to the referenced YAML file.

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": "schema:isPartOf",
  "_activity": "prov:activity",
  "subprocesses": "wfdesc:hasSubProcess"
}
activity

Return the activity object.

asjsonld()

Create JSON-LD with the original source data.

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, client=None, commit=None, __reference__=None, __source__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path, client=None, commit=None)

Return an instance from a YAML file.

submodules

Proxy to client submodules.

to_yaml()

Store an instance to the referenced YAML file.

Agents

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

Represent a person.

Type:

["prov:Person", "schema:Person"]

Context:

{
  "schema": "http://schema.org/",
  "prov": "http://www.w3.org/ns/prov#",
  "name": "rdfs:label",
  "email": "schema:email",
  "_id": "@id"
}
asjsonld()

Create JSON-LD with the original source data.

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, client=None, commit=None, __reference__=None, __source__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path, client=None, commit=None)

Return an instance from a YAML file.

to_yaml()

Store an instance to the referenced YAML file.

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

Represent executed software.

Type:

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

Context:

{
  "prov": "http://www.w3.org/ns/prov#",
  "wfprov": "http://purl.org/wf4ever/wfprov#",
  "label": "rdfs:label",
  "was_started_by": "prov:wasStartedBy",
  "_id": "@id"
}
asjsonld()

Create JSON-LD with the original source data.

default_reference()

Create a default reference path.

classmethod from_commit(commit)[source]

Create an instance from a Git commit.

classmethod from_jsonld(data, client=None, commit=None, __reference__=None, __source__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path, client=None, commit=None)

Return an instance from a YAML file.

to_yaml()

Store an instance to the referenced 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"
}
asjsonld()

Create JSON-LD with the original source data.

default_reference()

Create a default reference path.

classmethod from_jsonld(data, client=None, commit=None, __reference__=None, __source__=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, client=None, commit=None)

Return an instance from a YAML file.

to_yaml()

Store an instance to the referenced 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.

asjsonld()

Create JSON-LD with the original source data.

default_id()[source]

Configure calculated ID.

default_reference()

Create a default reference path.

classmethod from_jsonld(data, client=None, commit=None, __reference__=None, __source__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path, client=None, commit=None)

Return an instance from a YAML file.

to_yaml()

Store an instance to the referenced 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"
}
asjsonld()

Create JSON-LD with the original source data.

default_reference()

Create a default reference path.

classmethod from_jsonld(data, client=None, commit=None, __reference__=None, __source__=None)

Instantiate a JSON-LD class from data.

classmethod from_yaml(path, client=None, commit=None)

Return an instance from a YAML file.

to_yaml()

Store an instance to the referenced YAML file.