{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/SHARE/pulls/comments/80257063","id":80257063,"diff_hunk":"@@ -193,43 +195,42 @@ def test_can_delete_work(self, john_doe, normalized_data_id):\n         graph = ChangeGraph.from_jsonld({\n             '@graph': [{\n                 '@id': '_:abc',\n-                '@type': 'link',\n+                '@type': 'identifier',\n                 'url': 'https://share.osf.io/faq',\n-                'type': 'provider',\n             }, {\n-                '@id': '_:456',\n-                '@type': 'throughlinks',\n-                'link': {'@id': '_:abc', '@type': 'link'},\n+                '@id': '_:def',\n+                '@type': 'workidentifier',\n                 'creative_work': {'@id': '_:789', '@type': 'preprint'},\n+                'identifier': {'@id': '_:abc', '@type': 'identifier'}\n             }, {\n                 '@id': '_:789',\n                 '@type': 'preprint',\n                 'title': 'All About Cats',\n+                'identifiers': [{'@id': '_:def', '@type': 'workidentifier'}]\n             }]\n         })\n \n         change_set = ChangeSet.objects.from_graph(graph, normalized_data_id)\n \n-        link, preprint, _ = change_set.accept()\n+        preprint = [o for o in change_set.accept() if isinstance(o, Preprint)][0]","path":"tests/share/changes/test_change.py","position":38,"original_position":38,"commit_id":"aee324d9b5088f039634d90eba28484b89558413","original_commit_id":"aee324d9b5088f039634d90eba28484b89558413","user":{"login":"chrisseto","id":5532905,"avatar_url":"https://avatars.githubusercontent.com/u/5532905?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisseto","html_url":"https://github.com/chrisseto","followers_url":"https://api.github.com/users/chrisseto/followers","following_url":"https://api.github.com/users/chrisseto/following{/other_user}","gists_url":"https://api.github.com/users/chrisseto/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisseto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisseto/subscriptions","organizations_url":"https://api.github.com/users/chrisseto/orgs","repos_url":"https://api.github.com/users/chrisseto/repos","events_url":"https://api.github.com/users/chrisseto/events{/privacy}","received_events_url":"https://api.github.com/users/chrisseto/received_events","type":"User","site_admin":false},"body":"This is a subtle but very important nuance. The order that these are returned in is critically import to the disambiguation process.\r\n\r\nThere are a few other tests that check this but I'd sleep better know that there are many assertions for it.\r\n\r\nSee `test_topological_sort_many_to_many` for another example.\r\n","created_at":"2016-09-23T14:35:54Z","updated_at":"2016-09-23T14:35:54Z","html_url":"https://github.com/CenterForOpenScience/SHARE/pull/429#discussion_r80257063","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/pulls/429","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/SHARE/pulls/comments/80257063"},"html":{"href":"https://github.com/CenterForOpenScience/SHARE/pull/429#discussion_r80257063"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/SHARE/pulls/429"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/SHARE/pulls/429","id":86370635,"html_url":"https://github.com/CenterForOpenScience/SHARE/pull/429","diff_url":"https://github.com/CenterForOpenScience/SHARE/pull/429.diff","patch_url":"https://github.com/CenterForOpenScience/SHARE/pull/429.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/issues/429","number":429,"state":"open","locked":false,"title":"[WIP] Work relations and identifiers","user":{"login":"aaxelb","id":6776190,"avatar_url":"https://avatars.githubusercontent.com/u/6776190?v=3","gravatar_id":"","url":"https://api.github.com/users/aaxelb","html_url":"https://github.com/aaxelb","followers_url":"https://api.github.com/users/aaxelb/followers","following_url":"https://api.github.com/users/aaxelb/following{/other_user}","gists_url":"https://api.github.com/users/aaxelb/gists{/gist_id}","starred_url":"https://api.github.com/users/aaxelb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaxelb/subscriptions","organizations_url":"https://api.github.com/users/aaxelb/orgs","repos_url":"https://api.github.com/users/aaxelb/repos","events_url":"https://api.github.com/users/aaxelb/events{/privacy}","received_events_url":"https://api.github.com/users/aaxelb/received_events","type":"User","site_admin":false},"body":"* Add circular many-to-many relation between creative works\r\n * Allowed relation types in `share/models/relation-types.json`\r\n* Add many-to-many relationship between works and Identifiers\r\n* Remove `Link` model. The links harvested with a work should be identifiers either for that work or for a related work.\r\n* Use identifiers for disambiguating people and works\r\n * Allow changing a work's type by submitting a changeset for a work with matching identifier and different `@type` (unless the new type is `creativework`)\r\n* Update normalizers to use identifiers/relations instead of links\r\n * io.osf, org.crossref done\r\n * TODO: all the others\r\n\r\nThis will probably require renormalizing the dataset. ","created_at":"2016-09-22T16:24:51Z","updated_at":"2016-09-23T14:51:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bcabbca322ff7b04223a112139f196bcb6a187a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/pulls/429/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/pulls/429/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/issues/429/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/statuses/aee324d9b5088f039634d90eba28484b89558413","head":{"label":"aaxelb:feature/work-relationships","ref":"feature/work-relationships","sha":"aee324d9b5088f039634d90eba28484b89558413","user":{"login":"aaxelb","id":6776190,"avatar_url":"https://avatars.githubusercontent.com/u/6776190?v=3","gravatar_id":"","url":"https://api.github.com/users/aaxelb","html_url":"https://github.com/aaxelb","followers_url":"https://api.github.com/users/aaxelb/followers","following_url":"https://api.github.com/users/aaxelb/following{/other_user}","gists_url":"https://api.github.com/users/aaxelb/gists{/gist_id}","starred_url":"https://api.github.com/users/aaxelb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaxelb/subscriptions","organizations_url":"https://api.github.com/users/aaxelb/orgs","repos_url":"https://api.github.com/users/aaxelb/repos","events_url":"https://api.github.com/users/aaxelb/events{/privacy}","received_events_url":"https://api.github.com/users/aaxelb/received_events","type":"User","site_admin":false},"repo":{"id":62960024,"name":"SHARE","full_name":"aaxelb/SHARE","owner":{"login":"aaxelb","id":6776190,"avatar_url":"https://avatars.githubusercontent.com/u/6776190?v=3","gravatar_id":"","url":"https://api.github.com/users/aaxelb","html_url":"https://github.com/aaxelb","followers_url":"https://api.github.com/users/aaxelb/followers","following_url":"https://api.github.com/users/aaxelb/following{/other_user}","gists_url":"https://api.github.com/users/aaxelb/gists{/gist_id}","starred_url":"https://api.github.com/users/aaxelb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaxelb/subscriptions","organizations_url":"https://api.github.com/users/aaxelb/orgs","repos_url":"https://api.github.com/users/aaxelb/repos","events_url":"https://api.github.com/users/aaxelb/events{/privacy}","received_events_url":"https://api.github.com/users/aaxelb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aaxelb/SHARE","description":"A \"table of contents\" to the various projects that make up SHARE Notification Service development at COS.","fork":true,"url":"https://api.github.com/repos/aaxelb/SHARE","forks_url":"https://api.github.com/repos/aaxelb/SHARE/forks","keys_url":"https://api.github.com/repos/aaxelb/SHARE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aaxelb/SHARE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aaxelb/SHARE/teams","hooks_url":"https://api.github.com/repos/aaxelb/SHARE/hooks","issue_events_url":"https://api.github.com/repos/aaxelb/SHARE/issues/events{/number}","events_url":"https://api.github.com/repos/aaxelb/SHARE/events","assignees_url":"https://api.github.com/repos/aaxelb/SHARE/assignees{/user}","branches_url":"https://api.github.com/repos/aaxelb/SHARE/branches{/branch}","tags_url":"https://api.github.com/repos/aaxelb/SHARE/tags","blobs_url":"https://api.github.com/repos/aaxelb/SHARE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aaxelb/SHARE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aaxelb/SHARE/git/refs{/sha}","trees_url":"https://api.github.com/repos/aaxelb/SHARE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aaxelb/SHARE/statuses/{sha}","languages_url":"https://api.github.com/repos/aaxelb/SHARE/languages","stargazers_url":"https://api.github.com/repos/aaxelb/SHARE/stargazers","contributors_url":"https://api.github.com/repos/aaxelb/SHARE/contributors","subscribers_url":"https://api.github.com/repos/aaxelb/SHARE/subscribers","subscription_url":"https://api.github.com/repos/aaxelb/SHARE/subscription","commits_url":"https://api.github.com/repos/aaxelb/SHARE/commits{/sha}","git_commits_url":"https://api.github.com/repos/aaxelb/SHARE/git/commits{/sha}","comments_url":"https://api.github.com/repos/aaxelb/SHARE/comments{/number}","issue_comment_url":"https://api.github.com/repos/aaxelb/SHARE/issues/comments{/number}","contents_url":"https://api.github.com/repos/aaxelb/SHARE/contents/{+path}","compare_url":"https://api.github.com/repos/aaxelb/SHARE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aaxelb/SHARE/merges","archive_url":"https://api.github.com/repos/aaxelb/SHARE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aaxelb/SHARE/downloads","issues_url":"https://api.github.com/repos/aaxelb/SHARE/issues{/number}","pulls_url":"https://api.github.com/repos/aaxelb/SHARE/pulls{/number}","milestones_url":"https://api.github.com/repos/aaxelb/SHARE/milestones{/number}","notifications_url":"https://api.github.com/repos/aaxelb/SHARE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aaxelb/SHARE/labels{/name}","releases_url":"https://api.github.com/repos/aaxelb/SHARE/releases{/id}","deployments_url":"https://api.github.com/repos/aaxelb/SHARE/deployments","created_at":"2016-07-09T17:06:26Z","updated_at":"2016-07-28T15:06:46Z","pushed_at":"2016-09-22T17:03:25Z","git_url":"git://github.com/aaxelb/SHARE.git","ssh_url":"git@github.com:aaxelb/SHARE.git","clone_url":"https://github.com/aaxelb/SHARE.git","svn_url":"https://github.com/aaxelb/SHARE","homepage":"","size":37886,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"09db5467b2cef93bbeb765bedea2093aa8019411","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":21280081,"name":"SHARE","full_name":"CenterForOpenScience/SHARE","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/SHARE","description":"SHARE is building a free, open, data set about research and scholarly activities across their life cycle.","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/SHARE","forks_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/releases{/id}","deployments_url":"https://api.github.com/repos/CenterForOpenScience/SHARE/deployments","created_at":"2014-06-27T15:19:21Z","updated_at":"2016-08-18T15:54:44Z","pushed_at":"2016-09-22T20:50:39Z","git_url":"git://github.com/CenterForOpenScience/SHARE.git","ssh_url":"git@github.com:CenterForOpenScience/SHARE.git","clone_url":"https://github.com/CenterForOpenScience/SHARE.git","svn_url":"https://github.com/CenterForOpenScience/SHARE","homepage":"http://share-research.readthedocs.io/en/latest/index.html","size":38269,"stargazers_count":39,"watchers_count":39,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":40,"forks":30,"open_issues":40,"watchers":39,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/SHARE/pulls/429"},"html":{"href":"https://github.com/CenterForOpenScience/SHARE/pull/429"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/SHARE/issues/429"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/SHARE/issues/429/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/SHARE/pulls/429/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/SHARE/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/SHARE/pulls/429/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/SHARE/statuses/aee324d9b5088f039634d90eba28484b89558413"}}}}
{"actor":{"display_login":"chrisseto"}}