fair-workflows / fairworkflows

A python library for constructing, modifying and publishing scientific workflows described using semantic technologies.
Apache License 2.0
12 stars 3 forks source link

Fix retrospective logging #181

Closed svenvanderburg closed 3 years ago

svenvanderburg commented 3 years ago

Use logging to track retrospective provenance during execution. Provenance RDF for test_workflow_construction_and_execution now includes:

:assertion {
    :retroprov a prov:Activity ;
        rdfs:label """2021-02-11 12:21:30,506 - Running step: add
2021-02-11 12:21:30,506 - Running step: sub
2021-02-11 12:21:30,506 - Running step: weird
2021-02-11 12:21:30,507 - Running step: mul
""" ;
        prov:wasDerivedFrom <http://www.example.org/unpublishedworkflow> .
}

NB: I tried to make noodles log this, or inject information into noodles by passing display: 'message' to the schedule decorator as hint. This was quite a painful ride, hampered by lots of bugs in noodles in combination with an incomplete documentation. So, I decided to just work around it :)