Closed raar1 closed 3 years ago
Actually, we should also implement this for inputs and outputs of fairworkflows! I think it should be easy to implement that in this PR, if you think otherwise you can also create a new issue!
Actually, we should also implement this for inputs and outputs of fairworkflows! I think it should be easy to implement that in this PR, if you think otherwise you can also create a new issue!
Agreed - added issue #161
Addresses #143 and #134
See end of noodles_fw.ipynb notebook for examples/explanation of new functionality.
Essentially, one or more semantic types may be (optionally) assigned to input/output parameters of
is_fairstep
decorated functions, by using that variable name as parameter to the decorator.For example, here we assign semantic types to input parameter
a
and the output of the function,out1
:Note that you can pass lists to each of these, so any number of semantic types may be provided for each parameter (including none).
In this PR I have also changed the original 'type' member var of
FairVariable
tocomputational_type
, and in triples it appears after therdfs:comment
predicate rather thanrdf:type
. This is still a placeholder for a better solution, but as mentioned in #134 therdf:type
was incorrect for a string literal, so we had to change it.