{"action":"created","comment":{"url":"https://api.github.com/repos/mediachain/L-SPACE/pulls/comments/58909889","id":58909889,"diff_hunk":"@@ -0,0 +1,33 @@\n+package io.mediachain.util\n+\n+import gremlin.scala._\n+import io.mediachain.Types._\n+import io.mediachain.{BaseSpec, ForEachGraph}\n+import io.mediachain.util.GremlinUtils._\n+\n+object OrientTransactionSpec extends BaseSpec with ForEachGraph[Graph] {","path":"l_space/src/test/scala/io/mediachain/util/OrientTransactionSpec.scala","position":8,"original_position":8,"commit_id":"2a0697cff60312396b924fa48ba52817f9976a8b","original_commit_id":"b4afc84527ac662e4c77b15c901497939b78b69e","user":{"login":"parkan","id":204986,"avatar_url":"https://avatars.githubusercontent.com/u/204986?v=3","gravatar_id":"","url":"https://api.github.com/users/parkan","html_url":"https://github.com/parkan","followers_url":"https://api.github.com/users/parkan/followers","following_url":"https://api.github.com/users/parkan/following{/other_user}","gists_url":"https://api.github.com/users/parkan/gists{/gist_id}","starred_url":"https://api.github.com/users/parkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkan/subscriptions","organizations_url":"https://api.github.com/users/parkan/orgs","repos_url":"https://api.github.com/users/parkan/repos","events_url":"https://api.github.com/users/parkan/events{/privacy}","received_events_url":"https://api.github.com/users/parkan/received_events","type":"User","site_admin":false},"body":":+1: good, needed this","created_at":"2016-04-07T17:19:43Z","updated_at":"2016-04-07T17:19:43Z","html_url":"https://github.com/mediachain/L-SPACE/pull/49#discussion_r58909889","pull_request_url":"https://api.github.com/repos/mediachain/L-SPACE/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/mediachain/L-SPACE/pulls/comments/58909889"},"html":{"href":"https://github.com/mediachain/L-SPACE/pull/49#discussion_r58909889"},"pull_request":{"href":"https://api.github.com/repos/mediachain/L-SPACE/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/mediachain/L-SPACE/pulls/49","id":65522080,"html_url":"https://github.com/mediachain/L-SPACE/pull/49","diff_url":"https://github.com/mediachain/L-SPACE/pull/49.diff","patch_url":"https://github.com/mediachain/L-SPACE/pull/49.patch","issue_url":"https://api.github.com/repos/mediachain/L-SPACE/issues/49","number":49,"state":"open","locked":false,"title":"Remove embedded author, use \"blob bundle\" to ingest related blobs","user":{"login":"yusefnapora","id":678715,"avatar_url":"https://avatars.githubusercontent.com/u/678715?v=3","gravatar_id":"","url":"https://api.github.com/users/yusefnapora","html_url":"https://github.com/yusefnapora","followers_url":"https://api.github.com/users/yusefnapora/followers","following_url":"https://api.github.com/users/yusefnapora/following{/other_user}","gists_url":"https://api.github.com/users/yusefnapora/gists{/gist_id}","starred_url":"https://api.github.com/users/yusefnapora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yusefnapora/subscriptions","organizations_url":"https://api.github.com/users/yusefnapora/orgs","repos_url":"https://api.github.com/users/yusefnapora/repos","events_url":"https://api.github.com/users/yusefnapora/events{/privacy}","received_events_url":"https://api.github.com/users/yusefnapora/received_events","type":"User","site_admin":false},"body":"This removes the `author` field from the `ImageBlob` type, and updates the ingress / translator code to use a `BlobBundle` type, as described in #39.  \r\n\r\nA `BlobBundle` is just a `content: MetadataBlob` with a `List` of `BlobRelationship`s; right now the only `BlobRelationship` defined is `Author(person: Person)`.   The idea being that the relationship types will contain the related blob.\r\n\r\nI also changed the return types for the `Ingress.addPerson` and `Ingress.addImageBlob` functions to `Xor[GraphError, (Vertex, Canonical)]`, which is a little awkward to unpack but lets us perform further operations on the newly added vertex.   That seemed like the simplest way to make the new `Ingress.ingestBlobBundle` method work, since it calls out to `addPerson` or `addImageBlob`, and then needs to add the relationships to the created vertex.\r\n\r\nLimitations:\r\n- there's no validation that the `Author` relationship is attached to an `ImageBlob`; nothing's stopping you from attaching it to another `Person`.\r\n- Only one \"level\" of relationships is possible, unless you want to get all clever with recursive relationships.\r\n\r\nAlso, I discovered that the `withTransaction` helper fails if you try to wrap the `ingestBlobBundle` method with it; I was getting `OStorageException`s saying e.g. \"passed record v[-1:123] is new and cannot be stored\" - seems like something to do with temporary ids? \r\n\r\nSo transactions need more work / investigation.  Everything seems to basically work though, so that's nice :)","created_at":"2016-04-06T19:27:31Z","updated_at":"2016-04-07T17:19:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33ff8af8bb66649a1b5bc851b7141bee094fb073","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mediachain/L-SPACE/pulls/49/commits","review_comments_url":"https://api.github.com/repos/mediachain/L-SPACE/pulls/49/comments","review_comment_url":"https://api.github.com/repos/mediachain/L-SPACE/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mediachain/L-SPACE/issues/49/comments","statuses_url":"https://api.github.com/repos/mediachain/L-SPACE/statuses/2a0697cff60312396b924fa48ba52817f9976a8b","head":{"label":"mediachain:yn-translator-interface","ref":"yn-translator-interface","sha":"2a0697cff60312396b924fa48ba52817f9976a8b","user":{"login":"mediachain","id":16711838,"avatar_url":"https://avatars.githubusercontent.com/u/16711838?v=3","gravatar_id":"","url":"https://api.github.com/users/mediachain","html_url":"https://github.com/mediachain","followers_url":"https://api.github.com/users/mediachain/followers","following_url":"https://api.github.com/users/mediachain/following{/other_user}","gists_url":"https://api.github.com/users/mediachain/gists{/gist_id}","starred_url":"https://api.github.com/users/mediachain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mediachain/subscriptions","organizations_url":"https://api.github.com/users/mediachain/orgs","repos_url":"https://api.github.com/users/mediachain/repos","events_url":"https://api.github.com/users/mediachain/events{/privacy}","received_events_url":"https://api.github.com/users/mediachain/received_events","type":"Organization","site_admin":false},"repo":{"id":52026576,"name":"L-SPACE","full_name":"mediachain/L-SPACE","owner":{"login":"mediachain","id":16711838,"avatar_url":"https://avatars.githubusercontent.com/u/16711838?v=3","gravatar_id":"","url":"https://api.github.com/users/mediachain","html_url":"https://github.com/mediachain","followers_url":"https://api.github.com/users/mediachain/followers","following_url":"https://api.github.com/users/mediachain/following{/other_user}","gists_url":"https://api.github.com/users/mediachain/gists{/gist_id}","starred_url":"https://api.github.com/users/mediachain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mediachain/subscriptions","organizations_url":"https://api.github.com/users/mediachain/orgs","repos_url":"https://api.github.com/users/mediachain/repos","events_url":"https://api.github.com/users/mediachain/events{/privacy}","received_events_url":"https://api.github.com/users/mediachain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mediachain/L-SPACE","description":"Books = Knowledge = Power = (Mass x Distance^2) / Time^3","fork":false,"url":"https://api.github.com/repos/mediachain/L-SPACE","forks_url":"https://api.github.com/repos/mediachain/L-SPACE/forks","keys_url":"https://api.github.com/repos/mediachain/L-SPACE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mediachain/L-SPACE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mediachain/L-SPACE/teams","hooks_url":"https://api.github.com/repos/mediachain/L-SPACE/hooks","issue_events_url":"https://api.github.com/repos/mediachain/L-SPACE/issues/events{/number}","events_url":"https://api.github.com/repos/mediachain/L-SPACE/events","assignees_url":"https://api.github.com/repos/mediachain/L-SPACE/assignees{/user}","branches_url":"https://api.github.com/repos/mediachain/L-SPACE/branches{/branch}","tags_url":"https://api.github.com/repos/mediachain/L-SPACE/tags","blobs_url":"https://api.github.com/repos/mediachain/L-SPACE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mediachain/L-SPACE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mediachain/L-SPACE/git/refs{/sha}","trees_url":"https://api.github.com/repos/mediachain/L-SPACE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mediachain/L-SPACE/statuses/{sha}","languages_url":"https://api.github.com/repos/mediachain/L-SPACE/languages","stargazers_url":"https://api.github.com/repos/mediachain/L-SPACE/stargazers","contributors_url":"https://api.github.com/repos/mediachain/L-SPACE/contributors","subscribers_url":"https://api.github.com/repos/mediachain/L-SPACE/subscribers","subscription_url":"https://api.github.com/repos/mediachain/L-SPACE/subscription","commits_url":"https://api.github.com/repos/mediachain/L-SPACE/commits{/sha}","git_commits_url":"https://api.github.com/repos/mediachain/L-SPACE/git/commits{/sha}","comments_url":"https://api.github.com/repos/mediachain/L-SPACE/comments{/number}","issue_comment_url":"https://api.github.com/repos/mediachain/L-SPACE/issues/comments{/number}","contents_url":"https://api.github.com/repos/mediachain/L-SPACE/contents/{+path}","compare_url":"https://api.github.com/repos/mediachain/L-SPACE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mediachain/L-SPACE/merges","archive_url":"https://api.github.com/repos/mediachain/L-SPACE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mediachain/L-SPACE/downloads","issues_url":"https://api.github.com/repos/mediachain/L-SPACE/issues{/number}","pulls_url":"https://api.github.com/repos/mediachain/L-SPACE/pulls{/number}","milestones_url":"https://api.github.com/repos/mediachain/L-SPACE/milestones{/number}","notifications_url":"https://api.github.com/repos/mediachain/L-SPACE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mediachain/L-SPACE/labels{/name}","releases_url":"https://api.github.com/repos/mediachain/L-SPACE/releases{/id}","deployments_url":"https://api.github.com/repos/mediachain/L-SPACE/deployments","created_at":"2016-02-18T17:50:32Z","updated_at":"2016-04-01T20:32:20Z","pushed_at":"2016-04-07T17:16:57Z","git_url":"git://github.com/mediachain/L-SPACE.git","ssh_url":"git@github.com:mediachain/L-SPACE.git","clone_url":"https://github.com/mediachain/L-SPACE.git","svn_url":"https://github.com/mediachain/L-SPACE","homepage":null,"size":803,"stargazers_count":8,"watchers_count":8,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":25,"forks":0,"open_issues":25,"watchers":8,"default_branch":"master"}},"base":{"label":"mediachain:master","ref":"master","sha":"f54752cbfbf5dacad8bdfca85cec419688c4a0f0","user":{"login":"mediachain","id":16711838,"avatar_url":"https://avatars.githubusercontent.com/u/16711838?v=3","gravatar_id":"","url":"https://api.github.com/users/mediachain","html_url":"https://github.com/mediachain","followers_url":"https://api.github.com/users/mediachain/followers","following_url":"https://api.github.com/users/mediachain/following{/other_user}","gists_url":"https://api.github.com/users/mediachain/gists{/gist_id}","starred_url":"https://api.github.com/users/mediachain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mediachain/subscriptions","organizations_url":"https://api.github.com/users/mediachain/orgs","repos_url":"https://api.github.com/users/mediachain/repos","events_url":"https://api.github.com/users/mediachain/events{/privacy}","received_events_url":"https://api.github.com/users/mediachain/received_events","type":"Organization","site_admin":false},"repo":{"id":52026576,"name":"L-SPACE","full_name":"mediachain/L-SPACE","owner":{"login":"mediachain","id":16711838,"avatar_url":"https://avatars.githubusercontent.com/u/16711838?v=3","gravatar_id":"","url":"https://api.github.com/users/mediachain","html_url":"https://github.com/mediachain","followers_url":"https://api.github.com/users/mediachain/followers","following_url":"https://api.github.com/users/mediachain/following{/other_user}","gists_url":"https://api.github.com/users/mediachain/gists{/gist_id}","starred_url":"https://api.github.com/users/mediachain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mediachain/subscriptions","organizations_url":"https://api.github.com/users/mediachain/orgs","repos_url":"https://api.github.com/users/mediachain/repos","events_url":"https://api.github.com/users/mediachain/events{/privacy}","received_events_url":"https://api.github.com/users/mediachain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mediachain/L-SPACE","description":"Books = Knowledge = Power = (Mass x Distance^2) / Time^3","fork":false,"url":"https://api.github.com/repos/mediachain/L-SPACE","forks_url":"https://api.github.com/repos/mediachain/L-SPACE/forks","keys_url":"https://api.github.com/repos/mediachain/L-SPACE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mediachain/L-SPACE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mediachain/L-SPACE/teams","hooks_url":"https://api.github.com/repos/mediachain/L-SPACE/hooks","issue_events_url":"https://api.github.com/repos/mediachain/L-SPACE/issues/events{/number}","events_url":"https://api.github.com/repos/mediachain/L-SPACE/events","assignees_url":"https://api.github.com/repos/mediachain/L-SPACE/assignees{/user}","branches_url":"https://api.github.com/repos/mediachain/L-SPACE/branches{/branch}","tags_url":"https://api.github.com/repos/mediachain/L-SPACE/tags","blobs_url":"https://api.github.com/repos/mediachain/L-SPACE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mediachain/L-SPACE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mediachain/L-SPACE/git/refs{/sha}","trees_url":"https://api.github.com/repos/mediachain/L-SPACE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mediachain/L-SPACE/statuses/{sha}","languages_url":"https://api.github.com/repos/mediachain/L-SPACE/languages","stargazers_url":"https://api.github.com/repos/mediachain/L-SPACE/stargazers","contributors_url":"https://api.github.com/repos/mediachain/L-SPACE/contributors","subscribers_url":"https://api.github.com/repos/mediachain/L-SPACE/subscribers","subscription_url":"https://api.github.com/repos/mediachain/L-SPACE/subscription","commits_url":"https://api.github.com/repos/mediachain/L-SPACE/commits{/sha}","git_commits_url":"https://api.github.com/repos/mediachain/L-SPACE/git/commits{/sha}","comments_url":"https://api.github.com/repos/mediachain/L-SPACE/comments{/number}","issue_comment_url":"https://api.github.com/repos/mediachain/L-SPACE/issues/comments{/number}","contents_url":"https://api.github.com/repos/mediachain/L-SPACE/contents/{+path}","compare_url":"https://api.github.com/repos/mediachain/L-SPACE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mediachain/L-SPACE/merges","archive_url":"https://api.github.com/repos/mediachain/L-SPACE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mediachain/L-SPACE/downloads","issues_url":"https://api.github.com/repos/mediachain/L-SPACE/issues{/number}","pulls_url":"https://api.github.com/repos/mediachain/L-SPACE/pulls{/number}","milestones_url":"https://api.github.com/repos/mediachain/L-SPACE/milestones{/number}","notifications_url":"https://api.github.com/repos/mediachain/L-SPACE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mediachain/L-SPACE/labels{/name}","releases_url":"https://api.github.com/repos/mediachain/L-SPACE/releases{/id}","deployments_url":"https://api.github.com/repos/mediachain/L-SPACE/deployments","created_at":"2016-02-18T17:50:32Z","updated_at":"2016-04-01T20:32:20Z","pushed_at":"2016-04-07T17:16:57Z","git_url":"git://github.com/mediachain/L-SPACE.git","ssh_url":"git@github.com:mediachain/L-SPACE.git","clone_url":"https://github.com/mediachain/L-SPACE.git","svn_url":"https://github.com/mediachain/L-SPACE","homepage":null,"size":803,"stargazers_count":8,"watchers_count":8,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":25,"forks":0,"open_issues":25,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mediachain/L-SPACE/pulls/49"},"html":{"href":"https://github.com/mediachain/L-SPACE/pull/49"},"issue":{"href":"https://api.github.com/repos/mediachain/L-SPACE/issues/49"},"comments":{"href":"https://api.github.com/repos/mediachain/L-SPACE/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/mediachain/L-SPACE/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/mediachain/L-SPACE/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mediachain/L-SPACE/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/mediachain/L-SPACE/statuses/2a0697cff60312396b924fa48ba52817f9976a8b"}}}}