{"action":"opened","number":324,"pull_request":{"url":"https://api.github.com/repos/IDR/idr-metadata/pulls/324","id":209374064,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5Mzc0MDY0","html_url":"https://github.com/IDR/idr-metadata/pull/324","diff_url":"https://github.com/IDR/idr-metadata/pull/324.diff","patch_url":"https://github.com/IDR/idr-metadata/pull/324.patch","issue_url":"https://api.github.com/repos/IDR/idr-metadata/issues/324","number":324,"state":"open","locked":false,"title":"idr0038 metadata update and multi-study parsing","user":{"login":"sbesson","id":1355463,"node_id":"MDQ6VXNlcjEzNTU0NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/1355463?v=4","gravatar_id":"","url":"https://api.github.com/users/sbesson","html_url":"https://github.com/sbesson","followers_url":"https://api.github.com/users/sbesson/followers","following_url":"https://api.github.com/users/sbesson/following{/other_user}","gists_url":"https://api.github.com/users/sbesson/gists{/gist_id}","starred_url":"https://api.github.com/users/sbesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbesson/subscriptions","organizations_url":"https://api.github.com/users/sbesson/orgs","repos_url":"https://api.github.com/users/sbesson/repos","events_url":"https://api.github.com/users/sbesson/events{/privacy}","received_events_url":"https://api.github.com/users/sbesson/received_events","type":"User","site_admin":false},"body":"## Summary\r\n\r\nSee https://trello.com/c/Zk2cX2gr/3-metadata-updates-part-2\r\n\r\nPrimarily this PR makes updates the the idr0038 study file to match the lieve annotations and add the metadata of the [recent publication](https://www.ncbi.nlm.nih.gov/pubmed/30048451). To validate this, this PR also tackles the problem of parsing and checking multi-screens and/or multi-experiments studies using the `study_parser`.\r\n\r\n## Changes\r\n\r\nThe main changes are around API of the `study_parser` to accomodate for multi-screen/multi-experiment studies and also validate top-level study containers when existing:\r\n- the legacy `TextPrinter` is completely dropped in favor of the JSON serialization\r\n- the logic of `JsonPrinter` and `Object` is combined into a single class (currently `Formatter` - better name welcome) which constructs a dictionary representation of a StudyParser object\r\n- the JSON output of a study with the `--report` option now has the study metadata at the top-level. Study screens and experiments are contained within the corresponding fields.\r\n- the `map` field is modified from a dictionary to a list of dictionaries with single-key value pairs. This change is required to conserve the key/value pairs ordering as well as handle duplicate keys like publications.\r\n\r\n## Testing\r\n\r\nThe metadata update changes for idr0038 have been applied on the testing resource. The description/map of the various projects can be compared to the ones on the production resource. In addition, the various arguments of the study_parser script should be reviewed including the validation argument:\r\n\r\n```\r\n\r\nPYTHONPATH=/path/to/OMERO.py/lib/python/ python pyidr/study_parser.py idr0038-held-kidneylightsheet/idr0038-study.txt --check\r\n```\r\n\r\nand the report argument:\r\n\r\n```\r\nPYTHONPATH=/path/to/OMERO.py/lib/python/ python pyidr/study_parser.py idr0038-held-kidneylightsheet/idr0038-study.txt --report [--inspect]\r\n```\r\n\r\nThese changes should not affect the parsing of existing studies (tested by Travis) as well as the validation of existing studies. To test the latter, the `--check` command above can be executed against a few of the [reviewed studies](https://trello.com/c/I2rbYM9L/48-metadata-updates).","created_at":"2018-08-19T18:55:31Z","updated_at":"2018-08-19T18:55:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/IDR/idr-metadata/pulls/324/commits","review_comments_url":"https://api.github.com/repos/IDR/idr-metadata/pulls/324/comments","review_comment_url":"https://api.github.com/repos/IDR/idr-metadata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IDR/idr-metadata/issues/324/comments","statuses_url":"https://api.github.com/repos/IDR/idr-metadata/statuses/ad4b4793e0acf488d8eed5524e978025fa449782","head":{"label":"sbesson:idr0038_publication","ref":"idr0038_publication","sha":"ad4b4793e0acf488d8eed5524e978025fa449782","user":{"login":"sbesson","id":1355463,"node_id":"MDQ6VXNlcjEzNTU0NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/1355463?v=4","gravatar_id":"","url":"https://api.github.com/users/sbesson","html_url":"https://github.com/sbesson","followers_url":"https://api.github.com/users/sbesson/followers","following_url":"https://api.github.com/users/sbesson/following{/other_user}","gists_url":"https://api.github.com/users/sbesson/gists{/gist_id}","starred_url":"https://api.github.com/users/sbesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbesson/subscriptions","organizations_url":"https://api.github.com/users/sbesson/orgs","repos_url":"https://api.github.com/users/sbesson/repos","events_url":"https://api.github.com/users/sbesson/events{/privacy}","received_events_url":"https://api.github.com/users/sbesson/received_events","type":"User","site_admin":false},"repo":{"id":110953639,"node_id":"MDEwOlJlcG9zaXRvcnkxMTA5NTM2Mzk=","name":"idr-metadata","full_name":"sbesson/idr-metadata","owner":{"login":"sbesson","id":1355463,"node_id":"MDQ6VXNlcjEzNTU0NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/1355463?v=4","gravatar_id":"","url":"https://api.github.com/users/sbesson","html_url":"https://github.com/sbesson","followers_url":"https://api.github.com/users/sbesson/followers","following_url":"https://api.github.com/users/sbesson/following{/other_user}","gists_url":"https://api.github.com/users/sbesson/gists{/gist_id}","starred_url":"https://api.github.com/users/sbesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbesson/subscriptions","organizations_url":"https://api.github.com/users/sbesson/orgs","repos_url":"https://api.github.com/users/sbesson/repos","events_url":"https://api.github.com/users/sbesson/events{/privacy}","received_events_url":"https://api.github.com/users/sbesson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sbesson/idr-metadata","description":"Curated metadata for the Image Data Resource","fork":true,"url":"https://api.github.com/repos/sbesson/idr-metadata","forks_url":"https://api.github.com/repos/sbesson/idr-metadata/forks","keys_url":"https://api.github.com/repos/sbesson/idr-metadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sbesson/idr-metadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sbesson/idr-metadata/teams","hooks_url":"https://api.github.com/repos/sbesson/idr-metadata/hooks","issue_events_url":"https://api.github.com/repos/sbesson/idr-metadata/issues/events{/number}","events_url":"https://api.github.com/repos/sbesson/idr-metadata/events","assignees_url":"https://api.github.com/repos/sbesson/idr-metadata/assignees{/user}","branches_url":"https://api.github.com/repos/sbesson/idr-metadata/branches{/branch}","tags_url":"https://api.github.com/repos/sbesson/idr-metadata/tags","blobs_url":"https://api.github.com/repos/sbesson/idr-metadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sbesson/idr-metadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sbesson/idr-metadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/sbesson/idr-metadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sbesson/idr-metadata/statuses/{sha}","languages_url":"https://api.github.com/repos/sbesson/idr-metadata/languages","stargazers_url":"https://api.github.com/repos/sbesson/idr-metadata/stargazers","contributors_url":"https://api.github.com/repos/sbesson/idr-metadata/contributors","subscribers_url":"https://api.github.com/repos/sbesson/idr-metadata/subscribers","subscription_url":"https://api.github.com/repos/sbesson/idr-metadata/subscription","commits_url":"https://api.github.com/repos/sbesson/idr-metadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/sbesson/idr-metadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/sbesson/idr-metadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/sbesson/idr-metadata/issues/comments{/number}","contents_url":"https://api.github.com/repos/sbesson/idr-metadata/contents/{+path}","compare_url":"https://api.github.com/repos/sbesson/idr-metadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sbesson/idr-metadata/merges","archive_url":"https://api.github.com/repos/sbesson/idr-metadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sbesson/idr-metadata/downloads","issues_url":"https://api.github.com/repos/sbesson/idr-metadata/issues{/number}","pulls_url":"https://api.github.com/repos/sbesson/idr-metadata/pulls{/number}","milestones_url":"https://api.github.com/repos/sbesson/idr-metadata/milestones{/number}","notifications_url":"https://api.github.com/repos/sbesson/idr-metadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sbesson/idr-metadata/labels{/name}","releases_url":"https://api.github.com/repos/sbesson/idr-metadata/releases{/id}","deployments_url":"https://api.github.com/repos/sbesson/idr-metadata/deployments","created_at":"2017-11-16T09:50:55Z","updated_at":"2018-08-08T12:47:19Z","pushed_at":"2018-08-19T18:30:40Z","git_url":"git://github.com/sbesson/idr-metadata.git","ssh_url":"git@github.com:sbesson/idr-metadata.git","clone_url":"https://github.com/sbesson/idr-metadata.git","svn_url":"https://github.com/sbesson/idr-metadata","homepage":"https://idr.openmicroscopy.org","size":725613,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"IDR:master","ref":"master","sha":"e752bb94a99f5c34ef084c0333cd667a5416335b","user":{"login":"IDR","id":16244820,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MjQ0ODIw","avatar_url":"https://avatars3.githubusercontent.com/u/16244820?v=4","gravatar_id":"","url":"https://api.github.com/users/IDR","html_url":"https://github.com/IDR","followers_url":"https://api.github.com/users/IDR/followers","following_url":"https://api.github.com/users/IDR/following{/other_user}","gists_url":"https://api.github.com/users/IDR/gists{/gist_id}","starred_url":"https://api.github.com/users/IDR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IDR/subscriptions","organizations_url":"https://api.github.com/users/IDR/orgs","repos_url":"https://api.github.com/users/IDR/repos","events_url":"https://api.github.com/users/IDR/events{/privacy}","received_events_url":"https://api.github.com/users/IDR/received_events","type":"Organization","site_admin":false},"repo":{"id":37161002,"node_id":"MDEwOlJlcG9zaXRvcnkzNzE2MTAwMg==","name":"idr-metadata","full_name":"IDR/idr-metadata","owner":{"login":"IDR","id":16244820,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MjQ0ODIw","avatar_url":"https://avatars3.githubusercontent.com/u/16244820?v=4","gravatar_id":"","url":"https://api.github.com/users/IDR","html_url":"https://github.com/IDR","followers_url":"https://api.github.com/users/IDR/followers","following_url":"https://api.github.com/users/IDR/following{/other_user}","gists_url":"https://api.github.com/users/IDR/gists{/gist_id}","starred_url":"https://api.github.com/users/IDR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IDR/subscriptions","organizations_url":"https://api.github.com/users/IDR/orgs","repos_url":"https://api.github.com/users/IDR/repos","events_url":"https://api.github.com/users/IDR/events{/privacy}","received_events_url":"https://api.github.com/users/IDR/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IDR/idr-metadata","description":"Curated metadata for the Image Data Resource","fork":false,"url":"https://api.github.com/repos/IDR/idr-metadata","forks_url":"https://api.github.com/repos/IDR/idr-metadata/forks","keys_url":"https://api.github.com/repos/IDR/idr-metadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IDR/idr-metadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IDR/idr-metadata/teams","hooks_url":"https://api.github.com/repos/IDR/idr-metadata/hooks","issue_events_url":"https://api.github.com/repos/IDR/idr-metadata/issues/events{/number}","events_url":"https://api.github.com/repos/IDR/idr-metadata/events","assignees_url":"https://api.github.com/repos/IDR/idr-metadata/assignees{/user}","branches_url":"https://api.github.com/repos/IDR/idr-metadata/branches{/branch}","tags_url":"https://api.github.com/repos/IDR/idr-metadata/tags","blobs_url":"https://api.github.com/repos/IDR/idr-metadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IDR/idr-metadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IDR/idr-metadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/IDR/idr-metadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IDR/idr-metadata/statuses/{sha}","languages_url":"https://api.github.com/repos/IDR/idr-metadata/languages","stargazers_url":"https://api.github.com/repos/IDR/idr-metadata/stargazers","contributors_url":"https://api.github.com/repos/IDR/idr-metadata/contributors","subscribers_url":"https://api.github.com/repos/IDR/idr-metadata/subscribers","subscription_url":"https://api.github.com/repos/IDR/idr-metadata/subscription","commits_url":"https://api.github.com/repos/IDR/idr-metadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/IDR/idr-metadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/IDR/idr-metadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/IDR/idr-metadata/issues/comments{/number}","contents_url":"https://api.github.com/repos/IDR/idr-metadata/contents/{+path}","compare_url":"https://api.github.com/repos/IDR/idr-metadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IDR/idr-metadata/merges","archive_url":"https://api.github.com/repos/IDR/idr-metadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IDR/idr-metadata/downloads","issues_url":"https://api.github.com/repos/IDR/idr-metadata/issues{/number}","pulls_url":"https://api.github.com/repos/IDR/idr-metadata/pulls{/number}","milestones_url":"https://api.github.com/repos/IDR/idr-metadata/milestones{/number}","notifications_url":"https://api.github.com/repos/IDR/idr-metadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IDR/idr-metadata/labels{/name}","releases_url":"https://api.github.com/repos/IDR/idr-metadata/releases{/id}","deployments_url":"https://api.github.com/repos/IDR/idr-metadata/deployments","created_at":"2015-06-09T22:01:48Z","updated_at":"2018-08-08T12:44:51Z","pushed_at":"2018-08-08T12:44:21Z","git_url":"git://github.com/IDR/idr-metadata.git","ssh_url":"git@github.com:IDR/idr-metadata.git","clone_url":"https://github.com/IDR/idr-metadata.git","svn_url":"https://github.com/IDR/idr-metadata","homepage":"https://idr.openmicroscopy.org","size":766938,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":17,"open_issues":5,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IDR/idr-metadata/pulls/324"},"html":{"href":"https://github.com/IDR/idr-metadata/pull/324"},"issue":{"href":"https://api.github.com/repos/IDR/idr-metadata/issues/324"},"comments":{"href":"https://api.github.com/repos/IDR/idr-metadata/issues/324/comments"},"review_comments":{"href":"https://api.github.com/repos/IDR/idr-metadata/pulls/324/comments"},"review_comment":{"href":"https://api.github.com/repos/IDR/idr-metadata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IDR/idr-metadata/pulls/324/commits"},"statuses":{"href":"https://api.github.com/repos/IDR/idr-metadata/statuses/ad4b4793e0acf488d8eed5524e978025fa449782"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":10,"additions":123,"deletions":135,"changed_files":2}}
{"actor":{"display_login":"sbesson"}}