Skip to content

allow PROV to be carried forward with update in certain scenarios #131

@jeanetteclark

Description

@jeanetteclark

(carryover from this issue: NCEAS/metacatui#310)

Scenario A: update package with new object not part of existing PROV trace
O1 <---derivedFrom--- O3 (using script S1 during execution E2)
O4 added as new object
Metadata updated

Scenario B: update metadata for a package without changing objects
O1 <---derivedFrom--- O3 (using script S1 during execution E2)
Metadata updated

In both situations, all prov relationships between O1 and O3 should be included in the new version of the package.

There is some code in arcticdatautils already that will carry forward PROV - see this commit but it needs to be expanded a bit to allow for PROV to be carried over in the scenarios above, but not in other scenarios where pids involved in the PROV trace are updated with new versions.

So, before adding the carried over PROV statements from the old resource map to the new resource map, I think we need to check that the pids contained within those statements all exist in the data_pids argument for update_resource_map

If not all of the pids involved in the PROV trace exist in the data_pids arguement, the function will drop all of the PROV statements in the updated version of the resource map. In this case should the function:

  • print a warning
  • error
  • stop and ask user if they really want to get rid of PROV

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions