{"action":"created","issue":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4426","repository_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy","labels_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4426/labels{/name}","comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4426/comments","events_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4426/events","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4426","id":127952194,"number":4426,"title":"Extenstions to populate metadata 52","user":{"login":"joshmoore","id":88113,"avatar_url":"https://avatars.githubusercontent.com/u/88113?v=3","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/labels/develop","name":"develop","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-21T15:39:31Z","updated_at":"2016-02-09T14:07:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4426","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4426","diff_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4426.diff","patch_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4426.patch"},"body":"A rebase to 5.2 of @emilroz' port of all `metadata` PRs involving `populate_metadata`.\r\n\r\n----\r\n\r\nThis includes:\r\n\r\n * [New CLI plugin: `metadata`](https://github.com/openmicroscopy/openmicroscopy/pull/4426/files#diff-14ca86402c0d762d3b1cdaa4c9890fdfR30) and\r\n * [New CLI command: `fs ls`](https://github.com/openmicroscopy/openmicroscopy/pull/4426/files#diff-8b2f1200f3424459187cc6f91a80fbedR686) which need design thought\r\n * [A workaround for binary download](https://github.com/openmicroscopy/openmicroscopy/pull/4426/files#diff-68d677662210452db071b951f04e9a4fR105) which likely needs discussion\r\n * As well as:\r\n   * Numerous fixes to `populate_metadata.py` incl. a yml config format (**Requires PyYAML**)\r\n   * Fixes to `populate_roi.py`\r\n   * A number of new tests\r\n\r\n----\r\n\r\nDescription of cherry-picking:\r\n\r\n> Extensions to the populate metadata functionality.\r\n> \r\n> Cherry-picked from:\r\n> * https://github.com/openmicroscopy/openmicroscopy/pull/3876,\r\n> * https://github.com/openmicroscopy/openmicroscopy/pull/3889, \r\n> * https://github.com/openmicroscopy/openmicroscopy/pull/4037, \r\n> * https://github.com/openmicroscopy/openmicroscopy/pull/4240,\r\n> * https://github.com/openmicroscopy/openmicroscopy/pull/4251\r\n>\r\n> To ensure no merge conflicts also picked a commit https://github.com/openmicroscopy/openmicroscopy/commit/6ed797d365186737d9a6b53a5c653c32792974e5 from https://github.com/openmicroscopy/openmicroscopy/pull/3875\r\n>\r\n> https://github.com/openmicroscopy/openmicroscopy/pull/4251 and  https://github.com/openmicroscopy/openmicroscopy/pull/4240 are conflicting so added extra commit from @joshmoore at the end here.\r\n>\r\n> Because of some weirdness trying to git merge Simon's branch for https://github.com/openmicroscopy/openmicroscopy/pull/4240 was also causing some merge conflicts but they looked absurd so I cherry-picked the branch."},"comment":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/comments/181877238","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4426#issuecomment-181877238","issue_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4426","id":181877238,"user":{"login":"ximenesuk","id":1065145,"avatar_url":"https://avatars.githubusercontent.com/u/1065145?v=3","gravatar_id":"","url":"https://api.github.com/users/ximenesuk","html_url":"https://github.com/ximenesuk","followers_url":"https://api.github.com/users/ximenesuk/followers","following_url":"https://api.github.com/users/ximenesuk/following{/other_user}","gists_url":"https://api.github.com/users/ximenesuk/gists{/gist_id}","starred_url":"https://api.github.com/users/ximenesuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ximenesuk/subscriptions","organizations_url":"https://api.github.com/users/ximenesuk/orgs","repos_url":"https://api.github.com/users/ximenesuk/repos","events_url":"https://api.github.com/users/ximenesuk/events{/privacy}","received_events_url":"https://api.github.com/users/ximenesuk/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T14:07:13Z","updated_at":"2016-02-09T14:07:13Z","body":"The help for `populate` looks a bit odd:\r\n```\r\n$ omero metadata populate -h\r\nusage: /Users/colin/Work/repos/openmicroscopy/dist/bin/omero metadata populate\r\n       [-h] [--report] [-n | -f] [--context {csv,bulkmap,deletemap}]\r\n       [--file FILE | --fileid FILEID [--cfg CFG | --cfgid CFGID] [--attach]\r\n       obj\r\n```\r\nThe square brackets don't look balanced. Is it possible to use the form:\r\n```\r\n$ omero metadata populate Plate:1\r\n...\r\n$ omero metadata populate Plate:1\r\n```\r\nand if so what is expected to be present for the command to succeed? Could the help be improved here?\r\n\r\nSimilarly with:\r\n```\r\n$ omero metadata populateroi Plate:1\r\n```\r\nwhat is expected? Incidentally,\r\n```\r\nls30778:openmicroscopy colin$ omero metadata populateroi Plate:1\r\nUsing session 2f18cac9-b7be-4032-973f-b08c78d7f443 (user-0@localhost:4064). Idle timeout: 10 min. Current group: pg-0\r\nTraceback (most recent call last):\r\n  File \"/Users/colin/Work/repos/openmicroscopy/dist/bin/omero\", line 125, in <module>\r\n    rv = omero.cli.argv()\r\n  File \"/Users/colin/Work/repos/openmicroscopy/dist/lib/python/omero/cli.py\", line 1438, in argv\r\n    cli.invoke(args[1:])\r\n  File \"/Users/colin/Work/repos/openmicroscopy/dist/lib/python/omero/cli.py\", line 952, in invoke\r\n    stop = self.onecmd(line, previous_args)\r\n  File \"/Users/colin/Work/repos/openmicroscopy/dist/lib/python/omero/cli.py\", line 1029, in onecmd\r\n    self.execute(line, previous_args)\r\n  File \"/Users/colin/Work/repos/openmicroscopy/dist/lib/python/omero/cli.py\", line 1111, in execute\r\n    args.func(args)\r\n  File \"/Users/colin/Work/repos/openmicroscopy/dist/lib/python/omero/plugins/metadata.py\", line 482, in populateroi\r\n    ctx = factory.get_analysis_ctx(md.get_id())\r\n  File \"/Users/colin/Work/repos/openmicroscopy/dist/lib/python/omero/util/populate_roi.py\", line 566, in get_analysis_ctx\r\n    plate_id)\r\nomero.util.populate_roi.MeasurementError: Unable to find suitable analysis context for plate: 1\r\n```\r\nIs a Plate the expected object type?\r\n"}}