Comments (5)
Not sure about stdout valueFrom - we already have the stdout property for that. Even the stdout flag - one can just set the glob to exact value or such.
We can't get rid of stdin/stdout properties cause their values might not be inputs/outputs.
Shell and shellquote seem quite useful. Can we extract this into a separate issue for spec discussion? Also seems it should be listed as extension/requirement.
The secondaryFiles might also deserve extension/requirement just to keep the core spec simple.
from common-workflow-language.
Not sure about stdout valueFrom - we already have the stdout property for that. Even the stdout flag - one can just set the glob to exact value or such.
There is a general use case for being able to construct the expected output file name based on the input. For example, one of the inputs to a tool specifies a "-o" (output) option and users may specify arbitrary file names for the tool output. In that case, it's impossible to reliably match the output correctly without referencing the input somehow.
I think the right solution is to involve expressions somehow (see next comment).
We can't get rid of stdin/stdout properties cause their values might not be inputs/outputs.
So in that case I would suggest we reject the proposal for a boolean on input/output bindings indicating stdin/stdout in favor of just keeping stdin/stdout properties on the tool itself; having two ways to specify the same thing just creates confusion.
Shell and shellquote seem quite useful. Can we extract this into a separate issue for spec discussion?
Agreed. Added #39 for shell/shellquote
The secondaryFiles might also deserve extension/requirement just to keep the core spec simple.
I disagree. File handling is a fundamental aspect of CWL since platforms are expected to manage what files are available to the tool. I actually intend to go further with the current reference implementation and bind mount individual files into Docker, so anything not explicit in the input or tool description is not available to the tool.
This will avoid situations where users make workflows that are subtly broken by assuming some secondary file X is next to the primary file and have it work on one platform that is sloppy about file handling (the tool gets the whole directory including files it didn't ask for) but fails on a different platform that is strict about file handling (that only provides the files explicitly requested).
from common-workflow-language.
On further thought, maybe outputBinding glob + loadContents + valueFrom (which is basically the current spec) is already sufficient to cover most of our cases? The outputBinding steps are applied in this order, and each step is optional (but at least one of glob or valueFrom must be provided):
glob
selects files into a list of file objects, for exampleglob: *.txt
yields[{"path": "foo.txt}, {"path":"bar.txt"}]
loadContents: true
loads the first X bytes into thecontents
field for each file (optional) (maybe the value of loadContents should be the number of bytes instead of just a flag?)valueFrom
is an expression which takes the glob + loadContents as thecontext
value and yields the final value.
If the output filename can't be trivially matched with glob
, then don't use glob
but instead provide valueFrom
with an expression which constructs the path based on the inputs.
Use glob: *
to match all files (recursively? maybe glob: **
?) which can be filtered by an expression in valueFrom
.
With that, we can continue to have the stdin
and stdout
fields on the tool object be either a basic string or an expression. We can eliminate ref
in favor of a JsonPointer expression.
Thoughts?
from common-workflow-language.
Agreed, but if we're going that route, why not allow expressions in glob and do away with valueFrom completely? If glob pattern is/resolves to a file name, it will just match that file.
valueFrom seems useful when paired with loadContent to report something other than file, so perhaps worth keeping.
from common-workflow-language.
stdin/stdout flags rejected
glob permits expressions
secondaryFiles pattern matching implemented (more discussion about secondaryFiles in #42)
changed "valueFrom" to "outputEval"
from common-workflow-language.
Related Issues (20)
- Reading filenames from another file in the runtime and treating them as files HOT 2
- Register CWL as an "identified ICT standard" for EU public procurement HOT 4
- rename/alias dockerImageId to dockerImageName HOT 1
- error: error while writing Hello: /var/spool/cwl/Hello.class HOT 16
- $graph: extend schema to represent that cwlVersion must be present at the root?
- conformance tests should not depend on the contents of the 'location' field in Files, Directories
- Gather implementation guidance
- Some tools behave differently if stdin is a plain file versus a device
- Allow not only bind-mounts as inputs but also named volume mounts HOT 2
- Create a "CWL linter" tool HOT 2
- enums as URIs: enhance documentation, fix behaviour
- More custom data types HOT 1
- channels concept HOT 7
- Extract tool and version for cwl provenance
- Support local paths for dockerLoad & dockerImport
- conditional step with `pickValue` method in inputs crashes when condition does not apply HOT 1
- Request for Multiple docker images HOT 1
- cwltool --print-deps fails with workflows having namespaced location steps HOT 1
- schema: explore removing the other values from cwlVersion (except the current version)
- [Output Directory] Output the file on a specific directory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from common-workflow-language.