GitHub PullRequestReviewCommentEvent at 2014-08-12 11:05:31
Repository: ivory
Actor: charleso
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/ambiata/ivory/pulls/comments/16106822","id":16106822,"diff_hunk":"@@ -0,0 +1,49 @@\n+package com.ambiata.ivory.storage.control\n+\n+import com.ambiata.ivory.storage.repository.Repository\n+import com.ambiata.mundane.control._\n+import scalaz._, Scalaz._\n+\n+/* Specialised Kleisli for doing common Ivory operations */\n+case class IvoryT[F[+_], +A](run: Kleisli[F, IvoryRead, A]) {\n+\n+  def map[B](f: A => B)(implicit F: Functor[F]): IvoryT[F, B] =\n+    IvoryT(run.map(f))\n+\n+  def flatMap[B](f: A => IvoryT[F, B])(implicit F: Monad[F]): IvoryT[F, B] =\n+    IvoryT(run.flatMap(f(_).run))\n+}\n+\n+object IvoryT {\n+\n+  def repository[F[+_]: Monad]: IvoryT[F, Repository] =\n+     IvoryT(Kleisli.ask[F, IvoryRead].map(_.repository))\n+\n+  def fromResultT[F[+_], A](r: ResultT[F, A]): IvoryT[({ type l[+a] = ResultT[F, a] })#l, A] = {\n+    type X[+B] = ResultT[F, B]\n+    IvoryT[X, A](Kleisli[X, IvoryRead, A](_ => r))\n+  }\n+\n+  def fromResultTIO[A](f: Repository => ResultTIO[A]): IvoryTIO[A] =","path":"ivory-storage/src/main/scala/com/ambiata/ivory/storage/control/IvoryT.scala","position":27,"original_position":27,"commit_id":"a6d6688ea68175b699604bc1a828e011c478cbb4","original_commit_id":"a6d6688ea68175b699604bc1a828e011c478cbb4","user":{"login":"charleso","id":31059,"avatar_url":"https://avatars.githubusercontent.com/u/31059?v=2","gravatar_id":"e66f98c1452292a4f7bfe5ee4795624b","url":"https://api.github.com/users/charleso","html_url":"https://github.com/charleso","followers_url":"https://api.github.com/users/charleso/followers","following_url":"https://api.github.com/users/charleso/following{/other_user}","gists_url":"https://api.github.com/users/charleso/gists{/gist_id}","starred_url":"https://api.github.com/users/charleso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charleso/subscriptions","organizations_url":"https://api.github.com/users/charleso/orgs","repos_url":"https://api.github.com/users/charleso/repos","events_url":"https://api.github.com/users/charleso/events{/privacy}","received_events_url":"https://api.github.com/users/charleso/received_events","type":"User","site_admin":false},"body":"It helps with the type inference to be explicit here. Stupid Scala.\r\n\r\nDefinitely happy to hear thoughts about the names of these methods.","created_at":"2014-08-12T11:05:31Z","updated_at":"2014-08-12T11:05:31Z","html_url":"https://github.com/ambiata/ivory/pull/203#discussion_r16106822","pull_request_url":"https://api.github.com/repos/ambiata/ivory/pulls/203","_links":{"self":{"href":"https://api.github.com/repos/ambiata/ivory/pulls/comments/16106822"},"html":{"href":"https://github.com/ambiata/ivory/pull/203#discussion_r16106822"},"pull_request":{"href":"https://api.github.com/repos/ambiata/ivory/pulls/203"}}},"pull_request":{"url":"https://api.github.com/repos/ambiata/ivory/pulls/203","id":19655005,"html_url":"https://github.com/ambiata/ivory/pull/203","diff_url":"https://github.com/ambiata/ivory/pull/203.diff","patch_url":"https://github.com/ambiata/ivory/pull/203.patch","issue_url":"https://api.github.com/repos/ambiata/ivory/issues/203","number":203,"state":"open","title":"Introduce IvoryT, initially as just a Repository Reader","user":{"login":"charleso","id":31059,"avatar_url":"https://avatars.githubusercontent.com/u/31059?v=2","gravatar_id":"e66f98c1452292a4f7bfe5ee4795624b","url":"https://api.github.com/users/charleso","html_url":"https://github.com/charleso","followers_url":"https://api.github.com/users/charleso/followers","following_url":"https://api.github.com/users/charleso/following{/other_user}","gists_url":"https://api.github.com/users/charleso/gists{/gist_id}","starred_url":"https://api.github.com/users/charleso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charleso/subscriptions","organizations_url":"https://api.github.com/users/charleso/orgs","repos_url":"https://api.github.com/users/charleso/repos","events_url":"https://api.github.com/users/charleso/events{/privacy}","received_events_url":"https://api.github.com/users/charleso/received_events","type":"User","site_admin":false},"body":"So we only just merge the quality guide and I'm already going against it...\r\n\r\n> Configuration goes in as arguments. Remove mix of \"configuration\" styles with implicits and readers. Any reader should be carefully considered and should have non-trivial gains across the entire code base, not just the code you are writing.\r\n\r\nI personally think it's an improvement, but now is the time to say something (see `ImportWorkflow` for one example).\r\n\r\n/cc @raronson @etorreborre @markhibberd ","created_at":"2014-08-12T11:04:47Z","updated_at":"2014-08-12T11:05:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2abbdf5a2a973bf7635f9cc36ecf4ec258463ea5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ambiata/ivory/pulls/203/commits","review_comments_url":"https://api.github.com/repos/ambiata/ivory/pulls/203/comments","review_comment_url":"https://api.github.com/repos/ambiata/ivory/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ambiata/ivory/issues/203/comments","statuses_url":"https://api.github.com/repos/ambiata/ivory/statuses/a6d6688ea68175b699604bc1a828e011c478cbb4","head":{"label":"ambiata:topic/ivoryt-reader","ref":"topic/ivoryt-reader","sha":"a6d6688ea68175b699604bc1a828e011c478cbb4","user":{"login":"ambiata","id":1691023,"avatar_url":"https://avatars.githubusercontent.com/u/1691023?v=2","gravatar_id":"61853572a1cc7fac104c8bb025692149","url":"https://api.github.com/users/ambiata","html_url":"https://github.com/ambiata","followers_url":"https://api.github.com/users/ambiata/followers","following_url":"https://api.github.com/users/ambiata/following{/other_user}","gists_url":"https://api.github.com/users/ambiata/gists{/gist_id}","starred_url":"https://api.github.com/users/ambiata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambiata/subscriptions","organizations_url":"https://api.github.com/users/ambiata/orgs","repos_url":"https://api.github.com/users/ambiata/repos","events_url":"https://api.github.com/users/ambiata/events{/privacy}","received_events_url":"https://api.github.com/users/ambiata/received_events","type":"Organization","site_admin":false},"repo":{"id":18756054,"name":"ivory","full_name":"ambiata/ivory","owner":{"login":"ambiata","id":1691023,"avatar_url":"https://avatars.githubusercontent.com/u/1691023?v=2","gravatar_id":"61853572a1cc7fac104c8bb025692149","url":"https://api.github.com/users/ambiata","html_url":"https://github.com/ambiata","followers_url":"https://api.github.com/users/ambiata/followers","following_url":"https://api.github.com/users/ambiata/following{/other_user}","gists_url":"https://api.github.com/users/ambiata/gists{/gist_id}","starred_url":"https://api.github.com/users/ambiata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambiata/subscriptions","organizations_url":"https://api.github.com/users/ambiata/orgs","repos_url":"https://api.github.com/users/ambiata/repos","events_url":"https://api.github.com/users/ambiata/events{/privacy}","received_events_url":"https://api.github.com/users/ambiata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ambiata/ivory","description":"A scalable feature store.","fork":false,"url":"https://api.github.com/repos/ambiata/ivory","forks_url":"https://api.github.com/repos/ambiata/ivory/forks","keys_url":"https://api.github.com/repos/ambiata/ivory/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ambiata/ivory/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ambiata/ivory/teams","hooks_url":"https://api.github.com/repos/ambiata/ivory/hooks","issue_events_url":"https://api.github.com/repos/ambiata/ivory/issues/events{/number}","events_url":"https://api.github.com/repos/ambiata/ivory/events","assignees_url":"https://api.github.com/repos/ambiata/ivory/assignees{/user}","branches_url":"https://api.github.com/repos/ambiata/ivory/branches{/branch}","tags_url":"https://api.github.com/repos/ambiata/ivory/tags","blobs_url":"https://api.github.com/repos/ambiata/ivory/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ambiata/ivory/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ambiata/ivory/git/refs{/sha}","trees_url":"https://api.github.com/repos/ambiata/ivory/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ambiata/ivory/statuses/{sha}","languages_url":"https://api.github.com/repos/ambiata/ivory/languages","stargazers_url":"https://api.github.com/repos/ambiata/ivory/stargazers","contributors_url":"https://api.github.com/repos/ambiata/ivory/contributors","subscribers_url":"https://api.github.com/repos/ambiata/ivory/subscribers","subscription_url":"https://api.github.com/repos/ambiata/ivory/subscription","commits_url":"https://api.github.com/repos/ambiata/ivory/commits{/sha}","git_commits_url":"https://api.github.com/repos/ambiata/ivory/git/commits{/sha}","comments_url":"https://api.github.com/repos/ambiata/ivory/comments{/number}","issue_comment_url":"https://api.github.com/repos/ambiata/ivory/issues/comments/{number}","contents_url":"https://api.github.com/repos/ambiata/ivory/contents/{+path}","compare_url":"https://api.github.com/repos/ambiata/ivory/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ambiata/ivory/merges","archive_url":"https://api.github.com/repos/ambiata/ivory/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ambiata/ivory/downloads","issues_url":"https://api.github.com/repos/ambiata/ivory/issues{/number}","pulls_url":"https://api.github.com/repos/ambiata/ivory/pulls{/number}","milestones_url":"https://api.github.com/repos/ambiata/ivory/milestones{/number}","notifications_url":"https://api.github.com/repos/ambiata/ivory/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ambiata/ivory/labels{/name}","releases_url":"https://api.github.com/repos/ambiata/ivory/releases{/id}","created_at":"2014-04-14T09:54:53Z","updated_at":"2014-08-05T00:29:07Z","pushed_at":"2014-08-12T11:02:04Z","git_url":"git://github.com/ambiata/ivory.git","ssh_url":"git@github.com:ambiata/ivory.git","clone_url":"https://github.com/ambiata/ivory.git","svn_url":"https://github.com/ambiata/ivory","homepage":null,"size":8985,"stargazers_count":13,"watchers_count":13,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":59,"forks":3,"open_issues":59,"watchers":13,"default_branch":"master"}},"base":{"label":"ambiata:master","ref":"master","sha":"11a2763c75fef1dc02dc1a8552017bbbb2589149","user":{"login":"ambiata","id":1691023,"avatar_url":"https://avatars.githubusercontent.com/u/1691023?v=2","gravatar_id":"61853572a1cc7fac104c8bb025692149","url":"https://api.github.com/users/ambiata","html_url":"https://github.com/ambiata","followers_url":"https://api.github.com/users/ambiata/followers","following_url":"https://api.github.com/users/ambiata/following{/other_user}","gists_url":"https://api.github.com/users/ambiata/gists{/gist_id}","starred_url":"https://api.github.com/users/ambiata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambiata/subscriptions","organizations_url":"https://api.github.com/users/ambiata/orgs","repos_url":"https://api.github.com/users/ambiata/repos","events_url":"https://api.github.com/users/ambiata/events{/privacy}","received_events_url":"https://api.github.com/users/ambiata/received_events","type":"Organization","site_admin":false},"repo":{"id":18756054,"name":"ivory","full_name":"ambiata/ivory","owner":{"login":"ambiata","id":1691023,"avatar_url":"https://avatars.githubusercontent.com/u/1691023?v=2","gravatar_id":"61853572a1cc7fac104c8bb025692149","url":"https://api.github.com/users/ambiata","html_url":"https://github.com/ambiata","followers_url":"https://api.github.com/users/ambiata/followers","following_url":"https://api.github.com/users/ambiata/following{/other_user}","gists_url":"https://api.github.com/users/ambiata/gists{/gist_id}","starred_url":"https://api.github.com/users/ambiata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambiata/subscriptions","organizations_url":"https://api.github.com/users/ambiata/orgs","repos_url":"https://api.github.com/users/ambiata/repos","events_url":"https://api.github.com/users/ambiata/events{/privacy}","received_events_url":"https://api.github.com/users/ambiata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ambiata/ivory","description":"A scalable feature store.","fork":false,"url":"https://api.github.com/repos/ambiata/ivory","forks_url":"https://api.github.com/repos/ambiata/ivory/forks","keys_url":"https://api.github.com/repos/ambiata/ivory/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ambiata/ivory/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ambiata/ivory/teams","hooks_url":"https://api.github.com/repos/ambiata/ivory/hooks","issue_events_url":"https://api.github.com/repos/ambiata/ivory/issues/events{/number}","events_url":"https://api.github.com/repos/ambiata/ivory/events","assignees_url":"https://api.github.com/repos/ambiata/ivory/assignees{/user}","branches_url":"https://api.github.com/repos/ambiata/ivory/branches{/branch}","tags_url":"https://api.github.com/repos/ambiata/ivory/tags","blobs_url":"https://api.github.com/repos/ambiata/ivory/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ambiata/ivory/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ambiata/ivory/git/refs{/sha}","trees_url":"https://api.github.com/repos/ambiata/ivory/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ambiata/ivory/statuses/{sha}","languages_url":"https://api.github.com/repos/ambiata/ivory/languages","stargazers_url":"https://api.github.com/repos/ambiata/ivory/stargazers","contributors_url":"https://api.github.com/repos/ambiata/ivory/contributors","subscribers_url":"https://api.github.com/repos/ambiata/ivory/subscribers","subscription_url":"https://api.github.com/repos/ambiata/ivory/subscription","commits_url":"https://api.github.com/repos/ambiata/ivory/commits{/sha}","git_commits_url":"https://api.github.com/repos/ambiata/ivory/git/commits{/sha}","comments_url":"https://api.github.com/repos/ambiata/ivory/comments{/number}","issue_comment_url":"https://api.github.com/repos/ambiata/ivory/issues/comments/{number}","contents_url":"https://api.github.com/repos/ambiata/ivory/contents/{+path}","compare_url":"https://api.github.com/repos/ambiata/ivory/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ambiata/ivory/merges","archive_url":"https://api.github.com/repos/ambiata/ivory/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ambiata/ivory/downloads","issues_url":"https://api.github.com/repos/ambiata/ivory/issues{/number}","pulls_url":"https://api.github.com/repos/ambiata/ivory/pulls{/number}","milestones_url":"https://api.github.com/repos/ambiata/ivory/milestones{/number}","notifications_url":"https://api.github.com/repos/ambiata/ivory/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ambiata/ivory/labels{/name}","releases_url":"https://api.github.com/repos/ambiata/ivory/releases{/id}","created_at":"2014-04-14T09:54:53Z","updated_at":"2014-08-05T00:29:07Z","pushed_at":"2014-08-12T11:02:04Z","git_url":"git://github.com/ambiata/ivory.git","ssh_url":"git@github.com:ambiata/ivory.git","clone_url":"https://github.com/ambiata/ivory.git","svn_url":"https://github.com/ambiata/ivory","homepage":null,"size":8985,"stargazers_count":13,"watchers_count":13,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":59,"forks":3,"open_issues":59,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ambiata/ivory/pulls/203"},"html":{"href":"https://github.com/ambiata/ivory/pull/203"},"issue":{"href":"https://api.github.com/repos/ambiata/ivory/issues/203"},"comments":{"href":"https://api.github.com/repos/ambiata/ivory/issues/203/comments"},"review_comments":{"href":"https://api.github.com/repos/ambiata/ivory/pulls/203/comments"},"review_comment":{"href":"https://api.github.com/repos/ambiata/ivory/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ambiata/ivory/pulls/203/commits"},"statuses":{"href":"https://api.github.com/repos/ambiata/ivory/statuses/a6d6688ea68175b699604bc1a828e011c478cbb4"}}}}