On Wed, 2014-12-10 at 15:35 +0100, Nebojsa Tijanic wrote:
> [01] Rename job.json to job.cwl.json (less chance of conflict with
> tools).
Agree.
> [02] Rename "$expr" to "@expr". Less conflict with js/json stuff like
> angularjs and mongodb.
Do angular and mongo db already explicitly have an $expr key? Also
"@expr" seems like it would similarly have potential conflict with
json-ld.
Go ahead. I haven't used github pages I would appreciate it if you can
take care of that.
> [04] Add "@type" field for File, CommandLineTool and JobOrder
> entities.
This looks like taking baby steps towards using json-ld. Rather than
just adding in a few bits and pieces, it would make more sense to start
the conversation about json-ld and Avro for draft 2?
> [05] Use only cpu and mem for resources initially to keep things
> simple.
Agree.
> [06] Enumerate secondary files by naming convention (see below).
> [07] Include certain fields in output.adapter for output file metadata
> (see below).
Can I propose this be put on the TODO for draft 2 or 3, when we tackle
metadata?
> [08] Apart from "$job", expressions should have a "$self" variable if
> used in context of input.adapter.transform (bound to value for that
> input) or output.adapter.metadata (bound to path of file matching
> glob, see below).
Agree on $self for inputs (I remember seeing a $context variable in the
Rabix code and not understanding what it was for and taking it out, now
that you've explained it,
> [09] Restrict use of expressions to specific places:
> - input.adapter.transform
> - adapter.baseCmd[]
> - adapter.stdin
> - adapter.stdout
> - adapter.args[].value
> - output.adapter.glob
> - output.adapter.metadata[]
> - output.adapter.value
Agree. Schema validation should already be checking that? If there are
gaps, go ahead and bring the spec and schema in line.
> [10] Replace docker image URI with imageRepo and imageTag (I think
> docker doesn't quite have URIs).
Agree. These are going to be Docker-specific keys, then? We should
also include an option for a custom Docker registry.
> [11] It might be more consistent to specify that Files have a default
> transform of "$self.path".
Agree. This also got me thinking that all the adapter transformations
could be defined in the spec in terms of default transform expressions.
> [12] Represent expressions and $job references as {"@type":
> "Transform", "lang": "<javascript or jsonpointer>", "value": "<js_expr
> or jsonpointer_expr>"}
This seems cumbersome to write. Same comment from earlier about
introducing @type tags without going to full json-ld. Also if we use
json-ld then we can rid of jsonpointer, and might define this whole
fragment differently. I took out the "lang" when I was writing draft 1
specifically to make it clear that expressions are only Javascript.
Needs further discussion.
> [13] Remove adapter.transform and only use adapter.value
Agree. I don't think my reference implementation or the spec even talks
about adapter.transform?
> [14] Specify that if, after running the tool, working dir contains a
> "result.cwl.json" file, no output adapters should be used and the file
> content must be the result that matchers outputs schema. This seems
> quite useful for very complex tools where a wrapper is needed, since
> the wrapper can also report the outputs.
Agree.
Regarding outputs, what do you think about specifying a required
"status" field in the output record which indicates "success" or
"failure"?
> If there's general agreement about any of these points, I'll gladly
> make a pull request for specs as well as the reference implementation.
> Sorry I wasn't of any help during initial writeup, had a very busy
> week.
Agree on 1, 3, 5, 8, 9, 10, 11, 13, 14. Others need further discussion.
Thanks,
Peter