{"action":"created","issue":{"url":"https://api.github.com/repos/datalad/datalad/issues/2464","repository_url":"https://api.github.com/repos/datalad/datalad","labels_url":"https://api.github.com/repos/datalad/datalad/issues/2464/labels{/name}","comments_url":"https://api.github.com/repos/datalad/datalad/issues/2464/comments","events_url":"https://api.github.com/repos/datalad/datalad/issues/2464/events","html_url":"https://github.com/datalad/datalad/pull/2464","id":318978829,"number":2464,"title":"ENH: Add --input flag","user":{"login":"kyleam","id":1297788,"avatar_url":"https://avatars2.githubusercontent.com/u/1297788?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleam","html_url":"https://github.com/kyleam","followers_url":"https://api.github.com/users/kyleam/followers","following_url":"https://api.github.com/users/kyleam/following{/other_user}","gists_url":"https://api.github.com/users/kyleam/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleam/subscriptions","organizations_url":"https://api.github.com/users/kyleam/orgs","repos_url":"https://api.github.com/users/kyleam/repos","events_url":"https://api.github.com/users/kyleam/events{/privacy}","received_events_url":"https://api.github.com/users/kyleam/received_events","type":"User","site_admin":false},"labels":[{"id":449733138,"url":"https://api.github.com/repos/datalad/datalad/labels/WIP","name":"WIP","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-30T17:56:47Z","updated_at":"2018-05-12T06:55:30Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/datalad/datalad/pulls/2464","html_url":"https://github.com/datalad/datalad/pull/2464","diff_url":"https://github.com/datalad/datalad/pull/2464.diff","patch_url":"https://github.com/datalad/datalad/pull/2464.patch"},"body":"This is a first pass at allowing inputs to be specified when calling `datalad run`.\r\n\r\nWIP because\r\n\r\n- [ ] I haven't tested it too thoroughly\r\n\r\n- [x] I haven't yet tried to add `--output`, but we might want to do that here (as opposed to a separate PR)\r\n\r\n- [ ] I'm not sure how we should handle glob expansion.\r\n\r\n  If a glob is given as the input value, it is expanded at the time of the run.  As an example, if '*' was used to indicate all annex files, a rerun would consider the inputs to be all of the annex files at the time of the initial run.\r\n\r\n\r\n    Expansion during the initial run seems appropriate because most of the time re-executing a command should only require those inputs.  However, it's possible that the caller would want to rerun a command that uses globs itself to get its input files, in which case files that were added after the initial run wouldn't be retrieved.\r\n\r\n    Perhaps we could also store the unexpanded inputs and add a rerun flag that says to use the unexpanded set.\r\n\r\nNote: #2432 mentioned --input=. as meaning all annex files should be present, but I didn't end up adding that because it's possible with globbing (`--input='*'`).\r\n\r\nre: #2158, #2432\r\n"},"comment":{"url":"https://api.github.com/repos/datalad/datalad/issues/comments/388535225","html_url":"https://github.com/datalad/datalad/pull/2464#issuecomment-388535225","issue_url":"https://api.github.com/repos/datalad/datalad/issues/2464","id":388535225,"user":{"login":"mih","id":136479,"avatar_url":"https://avatars1.githubusercontent.com/u/136479?v=4","gravatar_id":"","url":"https://api.github.com/users/mih","html_url":"https://github.com/mih","followers_url":"https://api.github.com/users/mih/followers","following_url":"https://api.github.com/users/mih/following{/other_user}","gists_url":"https://api.github.com/users/mih/gists{/gist_id}","starred_url":"https://api.github.com/users/mih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mih/subscriptions","organizations_url":"https://api.github.com/users/mih/orgs","repos_url":"https://api.github.com/users/mih/repos","events_url":"https://api.github.com/users/mih/events{/privacy}","received_events_url":"https://api.github.com/users/mih/received_events","type":"User","site_admin":false},"created_at":"2018-05-12T06:55:30Z","updated_at":"2018-05-12T06:55:30Z","author_association":"OWNER","body":"Playing with the beast. Observations:\r\n\r\nIn a plain Git repo:\r\n```\r\n% datalad run --input . bash -c \"ls -l dicoms > this\"\r\nget(notneeded): . [no dataset annex, content already present]\r\n[INFO   ] == Command start (output follows) ===== \r\n[INFO   ] == Command exit (modification check follows) ===== \r\nadd(ok): this (file)\r\nsave(ok): /tmp/func (dataset)\r\naction summary:\r\n  add (ok: 1)\r\n  get (notneeded: 1)\r\n  save (ok: 1)\r\n(datalad3-dev) mih@meiner /tmp/func (git)-[master] % datalad run --input '*' bash -c \"ls -l dicoms > that\"\r\n[ERROR  ] 'GitRepo' object has no attribute 'is_under_annex' [run.py:<lambda>:153] (AttributeError) \r\n```\r\n\r\nThe latter code path assumes the presence of an `AnnexRepo`."}}
{"actor":{"display_login":"mih"}}