{"action":"created","issue":{"url":"https://api.github.com/repos/Factual/drake/issues/179","labels_url":"https://api.github.com/repos/Factual/drake/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/Factual/drake/issues/179/comments","events_url":"https://api.github.com/repos/Factual/drake/issues/179/events","html_url":"https://github.com/Factual/drake/issues/179","id":91401558,"number":179,"title":"Optional inputs not working?","user":{"login":"chen-factual","id":3902082,"avatar_url":"https://avatars.githubusercontent.com/u/3902082?v=3","gravatar_id":"","url":"https://api.github.com/users/chen-factual","html_url":"https://github.com/chen-factual","followers_url":"https://api.github.com/users/chen-factual/followers","following_url":"https://api.github.com/users/chen-factual/following{/other_user}","gists_url":"https://api.github.com/users/chen-factual/gists{/gist_id}","starred_url":"https://api.github.com/users/chen-factual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chen-factual/subscriptions","organizations_url":"https://api.github.com/users/chen-factual/orgs","repos_url":"https://api.github.com/users/chen-factual/repos","events_url":"https://api.github.com/users/chen-factual/events{/privacy}","received_events_url":"https://api.github.com/users/chen-factual/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"mavericklou","id":855457,"avatar_url":"https://avatars.githubusercontent.com/u/855457?v=3","gravatar_id":"","url":"https://api.github.com/users/mavericklou","html_url":"https://github.com/mavericklou","followers_url":"https://api.github.com/users/mavericklou/followers","following_url":"https://api.github.com/users/mavericklou/following{/other_user}","gists_url":"https://api.github.com/users/mavericklou/gists{/gist_id}","starred_url":"https://api.github.com/users/mavericklou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavericklou/subscriptions","organizations_url":"https://api.github.com/users/mavericklou/orgs","repos_url":"https://api.github.com/users/mavericklou/repos","events_url":"https://api.github.com/users/mavericklou/events{/privacy}","received_events_url":"https://api.github.com/users/mavericklou/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2015-06-27T02:12:36Z","updated_at":"2015-06-29T22:45:59Z","closed_at":"2015-06-29T20:55:21Z","body":"Example given in the [Drake Google doc](https://docs.google.com/document/d/1bF-OKNLIG10v_lMes_m4yyaJtAaJKtdK0Jizvi_MNsg/edit#) indicates a question mark before an input makes it optional:\r\n\r\n```\r\nDrakefile:\r\n\r\n; Providing an optional synonym list to the command\r\noutput <- input_data, ?synonym_list, model_data\r\n  # A sample command line\r\n  # Playing a trick with variable expansion here (see Bash manual)\r\n  echo INPUT2=$INPUT2\r\n  echo “mytool $INPUT1 --model $INPUT3 ${INPUT2:+--synonyms $INPUT2}\r\n\r\n```\r\n\r\nIn my workflow, I have:\r\n\r\n```\r\nworkflow_meta.json <- train-results.json, ?metadata.json\r\n  python scripts/workflow-meta.py \\\r\n    --training-results $INPUT1 \\\r\n    --misc-meta $INPUT2 \\\r\n    --output $OUTPUT\r\n```\r\n\r\nAnd I get the output:\r\n```\r\ndrake: no input data found in locations: /home/chen/code/predict/workflow/resolve/test-dir/?metadata.json\r\n```\r\n\r\nI'm using a base directory, if that affects things. Is there something special I need to do if I'm using a base directory?\r\n"},"comment":{"url":"https://api.github.com/repos/Factual/drake/issues/comments/116872672","html_url":"https://github.com/Factual/drake/issues/179#issuecomment-116872672","issue_url":"https://api.github.com/repos/Factual/drake/issues/179","id":116872672,"user":{"login":"amalloy","id":368685,"avatar_url":"https://avatars.githubusercontent.com/u/368685?v=3","gravatar_id":"","url":"https://api.github.com/users/amalloy","html_url":"https://github.com/amalloy","followers_url":"https://api.github.com/users/amalloy/followers","following_url":"https://api.github.com/users/amalloy/following{/other_user}","gists_url":"https://api.github.com/users/amalloy/gists{/gist_id}","starred_url":"https://api.github.com/users/amalloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amalloy/subscriptions","organizations_url":"https://api.github.com/users/amalloy/orgs","repos_url":"https://api.github.com/users/amalloy/repos","events_url":"https://api.github.com/users/amalloy/events{/privacy}","received_events_url":"https://api.github.com/users/amalloy/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T22:45:59Z","updated_at":"2015-06-29T22:45:59Z","body":"Sure, I can answer questions."}}