Provenance — Renku 0.15.2.dev42-g8ea0d1bb-dirty documentation

# Provenance

Extract provenance information from the repository.

## Activities

class `renku.core.models.provenance.activities.` `Activity`(*, commit=None, client=None, path=None, label=NOTHING, project=None, id=None, message=NOTHING, was_informed_by=NOTHING, part_of=None, generated=None, invalidated=None, influenced=NOTHING, started_at_time=NOTHING, ended_at_time=NOTHING, agents=NOTHING)

  Represent an activity in the repository.

  Method generated by attrs for class Activity.

  `as_jsonld`()

    Create JSON-LD.

  `default_agents`()

    Set person agent to be the author of the commit.

  `default_ended_at_time`()

    Configure calculated properties.

  `default_generated`()

    Create default `generated`.

  `default_id`()

    Configure calculated ID.

  `default_influenced`()

    Calculate default values.

  `default_invalidated`()

    Entities invalidated by this Action.

  `default_label`()

    Generate a default label.

  `default_message`()

    Generate a default message.

  `default_started_at_time`()

    Configure calculated properties.

  `default_was_informed_by`()

    List parent actions.

  classmethod `from_jsonld`(data, client=None, commit=None)

    Create an instance from JSON-LD data.

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

    Return an instance from a YAML file.

  classmethod `generate_id`(commitsha)

    Calculate action ID.

  `get_output_paths`()

    Gets all output paths generated by this run.

  property `nodes`

    Return topologically sorted nodes.

  property `parents`

    Return parent commits.

  property `paths`

    Return all paths in the commit.

  property `removed_paths`

    Return all paths removed in the commit.

  property `submodules`

    Proxy to client submodules.

  `to_yaml`(path=None)

    Write an instance to the referenced YAML file.

class `renku.core.models.provenance.activities.` `ProcessRun`(*, commit=None, client=None, path=None, label=NOTHING, project=None, id=None, message=NOTHING, was_informed_by=NOTHING, part_of=None, invalidated=None, influenced=NOTHING, started_at_time=NOTHING, ended_at_time=NOTHING, agents=NOTHING, generated=None, association=None, annotations=None, qualified_usage=None, run_parameter=None)

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

  Method generated by attrs for class ProcessRun.

  `add_annotations`(annotations)

    Adds annotations from an external tool.

  `as_jsonld`()

    Create JSON-LD.

  `default_agents`()

    Set person agent to be the author of the commit.

  `default_ended_at_time`()

    Configure calculated properties.

  `default_generated`()

    Create default `generated`.

  `default_id`()

    Configure calculated ID.

  `default_influenced`()

    Calculate default values.

  `default_invalidated`()

    Entities invalidated by this Action.

  `default_label`()

    Generate a default label.

  `default_message`()

    Generate a default message.

  `default_started_at_time`()

    Configure calculated properties.

  `default_was_informed_by`()

    List parent actions.

  classmethod `from_jsonld`(data, client=None, commit=None)

    Create an instance from JSON-LD data.

  classmethod `from_run`(run, client, path, commit=None, subprocess_index=None, update_commits=False)

    Convert a `Run` to a `ProcessRun`.

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

    Return an instance from a YAML file.

  classmethod `generate_id`(commitsha)

    Calculate action ID.

  `get_output_paths`()

    Gets all output paths generated by this run.

  property `nodes`

    Return topologically sorted nodes.

  property `parents`

    Return parent commits.

  property `paths`

    Return all paths in the commit.

  `plugin_annotations`()

    Adds `Annotation``s from plugins to a ``ProcessRun`.

  property `removed_paths`

    Return all paths removed in the commit.

  property `submodules`

    Proxy to client submodules.

  `to_yaml`(path=None)

    Write an instance to the referenced YAML file.

class `renku.core.models.provenance.activities.` `WorkflowRun`(*, commit=None, client=None, path=None, label=NOTHING, project=None, id=None, message=NOTHING, was_informed_by=NOTHING, part_of=None, invalidated=None, influenced=NOTHING, started_at_time=NOTHING, ended_at_time=NOTHING, agents=NOTHING, generated=None, association=None, annotations=None, qualified_usage=None, run_parameter=None, processes=NOTHING)

  A workflow run typically contains several subprocesses.

  Method generated by attrs for class WorkflowRun.

  `add_annotations`(annotations)

    Adds annotations from an external tool.

  `as_jsonld`()

    Create JSON-LD.

  `default_agents`()

    Set person agent to be the author of the commit.

  `default_ended_at_time`()

    Configure calculated properties.

  `default_generated`()

    Create default `generated`.

  `default_id`()

    Configure calculated ID.

  `default_influenced`()

    Calculate default values.

  `default_invalidated`()

    Entities invalidated by this Action.

  `default_label`()

    Generate a default label.

  `default_message`()

    Generate a default message.

  `default_started_at_time`()

    Configure calculated properties.

  `default_was_informed_by`()

    List parent actions.

  classmethod `from_jsonld`(data, client=None, commit=None)

    Create an instance from JSON-LD data.

  classmethod `from_run`(run, client, path, commit=None, subprocess_index=None, update_commits=False)

    Convert a `Run` to a `WorkflowRun`.

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

    Return an instance from a YAML file.

  classmethod `generate_id`(commitsha)

    Calculate action ID.

  `get_output_paths`()

    Gets all output paths generated by this run.

  property `nodes`

    Yield all graph nodes.

  property `parents`

    Return parent commits.

  property `paths`

    Return all paths in the commit.

  `plugin_annotations`()

    Adds `Annotation``s from plugins to a ``ProcessRun`.

  property `removed_paths`

    Return all paths removed in the commit.

  property `submodules`

    Proxy to client submodules.

  property `subprocesses`

    Subprocesses of this `WorkflowRun`.

  `to_yaml`(path=None)

    Write an instance to the referenced YAML file.

## Entities

class `renku.core.models.entities.` `Entity`(*, commit=None, client=None, path=None, id=None, label=NOTHING, project=None, parent=None, checksum=None)

  Represent a data value or item.

  Method generated by attrs for class Entity.

  `default_id`()

    Configure calculated ID.

  `default_label`()

    Generate a default label.

  property `entities`

    Yield itself.

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

    Return dependency from given path and revision.

  property `parent`

    Return the parent object.

  `set_client`(client)

    Sets the clients on this entity.

  property `submodules`

    Proxy to client submodules.

class `renku.core.models.entities.` `Collection`(*, commit=None, client=None, path=None, id=None, label=NOTHING, project=None, parent=None, checksum=None, members=None)

  Represent a directory with files.

  Method generated by attrs for class Collection.

  `default_id`()

    Configure calculated ID.

  `default_label`()

    Generate a default label.

  `default_members`()

    Generate default members as entities from current path.

  property `entities`

    Recursively return all files.

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

    Return dependency from given path and revision.

  property `parent`

    Return the parent object.

  `set_client`(client)

    Sets the clients on this entity.

  property `submodules`

    Proxy to client submodules.

## Agents

class `renku.core.models.provenance.agents.` `Person`(*, affiliation=None, alternate_name=None, email=None, id=None, label=None, name)

  Represent a person.

  classmethod `from_commit`(commit)

    Create an instance from a Git commit.

  classmethod `from_dict`(data)

    Create and instance from a dictionary.

  classmethod `from_git`(git)

    Create an instance from a Git repo.

  classmethod `from_jsonld`(data)

    Create an instance from JSON-LD data.

  classmethod `from_string`(string)

    Create an instance from a ‘Name <email>’ string.

  property `full_identity`

    Return name, email, and affiliation.

  static `generate_id`(email, full_identity, hostname)

    Generate identifier for Person.

  property `short_name`

    Gives full name in short form.

  static `validate_email`(email)

    Check that the email is valid.

class `renku.core.models.provenance.agents.` `SoftwareAgent`(*, id, label)

  Represent executed software.

  classmethod `from_commit`(commit)

    Create an instance from a Git commit.

## Relations

class `renku.core.models.provenance.qualified.` `Usage`(*, entity, role=None, id=None)

  Represent a dependent path.

  Method generated by attrs for class Usage.

  `as_jsonld`()

    Create JSON-LD.

  classmethod `from_jsonld`(data)

    Create an instance from JSON-LD data.

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

    Return dependency from given path and revision.

class `renku.core.models.provenance.qualified.` `Generation`(entity, role=None, *, activity=None, id=NOTHING)

  Represent an act of generating a file.

  Method generated by attrs for class Generation.

  property `activity`

    Return the activity object.

  `as_jsonld`()

    Create JSON-LD.

  `default_id`()

    Configure calculated ID.

  classmethod `from_jsonld`(data)

    Create an instance from JSON-LD data.