Open gijzelaerr opened 7 years ago
The writable
flag means in this context is that the Directory is writable (you can add/delete/rename files, as opposed to a read-only directory) but that doesn't apply recursively to the file contents.
You should be able to use a Javascript expression in the entry
field to return a Directory object with the "writable" flag set for each file.
ok I'll try. But that seems to be quite a workaround hack to try to accomplish something quite simple? We are going to be using this quite often. Lets chat in the chat channel about extending the standard.
I agree that a shortcut for a recursively writable input directory is useful and a worthy addition to the spec
2017-02-02 9:30 GMT+01:00 Gijs Molenaar notifications@github.com:
ok I'll try. But that seems to be quite a workaround hack to try to accomplish something quite simple? We are going to be using this quite often. Lets chat in the chat channel about extending the standard.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/common-workflow-language/cwltool/issues/282#issuecomment-276896635, or mute the thread https://github.com/notifications/unsubscribe-auth/ABROCA9ojHty4K9-lNcRJw4UOozkTMS8ks5rYZQzgaJpZM4LxM88 .
-- Michael R. Crusoe Community Engineer & Co-founder Common Workflow Language project http://www.commonwl.org/ https://impactstory.org/u/0000-0002-2961-9670 michael.crusoe@gmail.com +1 480 627 9108 +32 2 808 25 58
would adding a recursivewritable: true
option make sense? Or fullywritable
?
My vote would be for recursiveWritable: true
A couple points:
writable
is only a property on Dirent
objects in CWL 1.0, and not anywhere else
But the spec says that when the InitialWorkDirRequirement
listing
is an Expression it can only return File
s and/or Directory
s, not Dirent
s.
However, cwltool
does accept and process correctly an Expression for listing
that returns an array containing a Dirent
But playing with this beyond-spec behavior I am not seeing a way to specify writable: true
recursively for an entire directory. You can't put a Dirent
object inside a synthetic Directory
object, for example.
bonus: even with writable: false
, cwltool
doesn't make directories read-only, one can delete files from them
To summarize: We have a clear user story for marking an entire Directory tree as writable. One way forward is to issue a clarification that writable: true
for a Directory is recursive and then to update the implementations to match.
@tetron while tracing the code, I came across some strangness: https://github.com/common-workflow-language/cwltool/blob/master/cwltool/pathmapper.py#L153
@gijzelaerr wrong button, sorry!
I guess this issue can be closed? it looks working now for the new release.
hi!
When I define an input folder as writable it is still being symlinked. Example:
But if I then look inside the intermediate cached results, the recursive directory structure is created but all files are symlinked: