Fix failing conversion if author name is not set #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When running
cwltool --provenance
with a set orcid, but not a full name (i.e.cwltool --provenance prov --orcid ORCID ...
vscwltool --provenance prov --orcid ORCID --full-name "Max Mustermann" ...
), the resulting metadata in the CWLProv will have an ORCID set, but no corresponding name property. Trying to convert such an object to an ro-crate fails:The reason is that the type of the label property from the prov library depends on whether the name is set or not (it is either the full name as string, or a QualifiedName Object of format
orcid:<id>
.This PR fixes the exception by only writing the agent's name if the name was actually set in the CWLProv and omitting it if it is not set.