{"action":"created","comment":{"url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments/42281432","id":42281432,"diff_hunk":"@@ -0,0 +1,59 @@\n+package edu.gemini.spModel.pio.codec\n+\n+import scalaz._, Scalaz._\n+\n+import edu.gemini.spModel.pio._\n+import edu.gemini.spModel.pio.xml.{ PioXmlUtil, PioXmlFactory }\n+\n+trait ParamCodec[A] { outer =>\n+  def encode(key: String, a: A): Param\n+  def decode(p: Param): PioError \\/ A\n+  def xmap[B](f: A => B, g: B => A): ParamCodec[B] =\n+    new ParamCodec[B] {\n+      def encode(key: String, a: B): Param = outer.encode(key, g(a))\n+      def decode(p: Param): PioError \\/ B = outer.decode(p).map(f)\n+    }\n+}\n+\n+object ParamCodec {","path":"bundle/edu.gemini.spModel.pio/src/main/scala/edu/gemini/spModel/pio/codec/ParamCodec.scala","position":18,"original_position":18,"commit_id":"e323f7d7caeaa02302b73f7ac161c17c78e6d5a0","original_commit_id":"e323f7d7caeaa02302b73f7ac161c17c78e6d5a0","user":{"login":"cquiroz","id":3615303,"avatar_url":"https://avatars.githubusercontent.com/u/3615303?v=3","gravatar_id":"","url":"https://api.github.com/users/cquiroz","html_url":"https://github.com/cquiroz","followers_url":"https://api.github.com/users/cquiroz/followers","following_url":"https://api.github.com/users/cquiroz/following{/other_user}","gists_url":"https://api.github.com/users/cquiroz/gists{/gist_id}","starred_url":"https://api.github.com/users/cquiroz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cquiroz/subscriptions","organizations_url":"https://api.github.com/users/cquiroz/orgs","repos_url":"https://api.github.com/users/cquiroz/repos","events_url":"https://api.github.com/users/cquiroz/events{/privacy}","received_events_url":"https://api.github.com/users/cquiroz/received_events","type":"User","site_admin":false},"body":"Is it the equivalent of `SPTargetPio` for the new model?","created_at":"2015-10-16T19:36:41Z","updated_at":"2015-10-16T19:36:41Z","html_url":"https://github.com/gemini-hlsw/ocs/pull/593#discussion_r42281432","pull_request_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/593","_links":{"self":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments/42281432"},"html":{"href":"https://github.com/gemini-hlsw/ocs/pull/593#discussion_r42281432"},"pull_request":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/593"}}},"pull_request":{"url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/593","id":47693480,"html_url":"https://github.com/gemini-hlsw/ocs/pull/593","diff_url":"https://github.com/gemini-hlsw/ocs/pull/593.diff","patch_url":"https://github.com/gemini-hlsw/ocs/pull/593.patch","issue_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/593","number":593,"state":"open","locked":false,"title":"Typeclass-based PIO and impl for new target model","user":{"login":"tpolecat","id":1200131,"avatar_url":"https://avatars.githubusercontent.com/u/1200131?v=3","gravatar_id":"","url":"https://api.github.com/users/tpolecat","html_url":"https://github.com/tpolecat","followers_url":"https://api.github.com/users/tpolecat/followers","following_url":"https://api.github.com/users/tpolecat/following{/other_user}","gists_url":"https://api.github.com/users/tpolecat/gists{/gist_id}","starred_url":"https://api.github.com/users/tpolecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpolecat/subscriptions","organizations_url":"https://api.github.com/users/tpolecat/orgs","repos_url":"https://api.github.com/users/tpolecat/repos","events_url":"https://api.github.com/users/tpolecat/events{/privacy}","received_events_url":"https://api.github.com/users/tpolecat/received_events","type":"User","site_admin":false},"body":"This PR does three things:\r\n- It adds `PioParamCodec` and `PioParamSetCodec` typeclasses for PIO encoding. The main advantage of this approach is that encoding and decoding are defined together via lensing and cannot get out of sync.\r\n- It adds instances for the atomic and composite types in `spModel.core` to allow serialization of the new target model. Tests are included.\r\n- It straightens out the `Lens` situation for the new `Target` model.\r\n\r\n:-1: need Jira issue, rebase","created_at":"2015-10-14T18:02:30Z","updated_at":"2015-10-16T19:36:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"826cf1a2510bc58c6d0f98a044f8a4b4c5f25872","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/593/commits","review_comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/593/comments","review_comment_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/593/comments","statuses_url":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/e323f7d7caeaa02302b73f7ac161c17c78e6d5a0","head":{"label":"tpolecat:target-pio","ref":"target-pio","sha":"e323f7d7caeaa02302b73f7ac161c17c78e6d5a0","user":{"login":"tpolecat","id":1200131,"avatar_url":"https://avatars.githubusercontent.com/u/1200131?v=3","gravatar_id":"","url":"https://api.github.com/users/tpolecat","html_url":"https://github.com/tpolecat","followers_url":"https://api.github.com/users/tpolecat/followers","following_url":"https://api.github.com/users/tpolecat/following{/other_user}","gists_url":"https://api.github.com/users/tpolecat/gists{/gist_id}","starred_url":"https://api.github.com/users/tpolecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpolecat/subscriptions","organizations_url":"https://api.github.com/users/tpolecat/orgs","repos_url":"https://api.github.com/users/tpolecat/repos","events_url":"https://api.github.com/users/tpolecat/events{/privacy}","received_events_url":"https://api.github.com/users/tpolecat/received_events","type":"User","site_admin":false},"repo":{"id":23966560,"name":"ocs","full_name":"tpolecat/ocs","owner":{"login":"tpolecat","id":1200131,"avatar_url":"https://avatars.githubusercontent.com/u/1200131?v=3","gravatar_id":"","url":"https://api.github.com/users/tpolecat","html_url":"https://github.com/tpolecat","followers_url":"https://api.github.com/users/tpolecat/followers","following_url":"https://api.github.com/users/tpolecat/following{/other_user}","gists_url":"https://api.github.com/users/tpolecat/gists{/gist_id}","starred_url":"https://api.github.com/users/tpolecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpolecat/subscriptions","organizations_url":"https://api.github.com/users/tpolecat/orgs","repos_url":"https://api.github.com/users/tpolecat/repos","events_url":"https://api.github.com/users/tpolecat/events{/privacy}","received_events_url":"https://api.github.com/users/tpolecat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tpolecat/ocs","description":"","fork":true,"url":"https://api.github.com/repos/tpolecat/ocs","forks_url":"https://api.github.com/repos/tpolecat/ocs/forks","keys_url":"https://api.github.com/repos/tpolecat/ocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tpolecat/ocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tpolecat/ocs/teams","hooks_url":"https://api.github.com/repos/tpolecat/ocs/hooks","issue_events_url":"https://api.github.com/repos/tpolecat/ocs/issues/events{/number}","events_url":"https://api.github.com/repos/tpolecat/ocs/events","assignees_url":"https://api.github.com/repos/tpolecat/ocs/assignees{/user}","branches_url":"https://api.github.com/repos/tpolecat/ocs/branches{/branch}","tags_url":"https://api.github.com/repos/tpolecat/ocs/tags","blobs_url":"https://api.github.com/repos/tpolecat/ocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tpolecat/ocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tpolecat/ocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/tpolecat/ocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tpolecat/ocs/statuses/{sha}","languages_url":"https://api.github.com/repos/tpolecat/ocs/languages","stargazers_url":"https://api.github.com/repos/tpolecat/ocs/stargazers","contributors_url":"https://api.github.com/repos/tpolecat/ocs/contributors","subscribers_url":"https://api.github.com/repos/tpolecat/ocs/subscribers","subscription_url":"https://api.github.com/repos/tpolecat/ocs/subscription","commits_url":"https://api.github.com/repos/tpolecat/ocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/tpolecat/ocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/tpolecat/ocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/tpolecat/ocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/tpolecat/ocs/contents/{+path}","compare_url":"https://api.github.com/repos/tpolecat/ocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tpolecat/ocs/merges","archive_url":"https://api.github.com/repos/tpolecat/ocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tpolecat/ocs/downloads","issues_url":"https://api.github.com/repos/tpolecat/ocs/issues{/number}","pulls_url":"https://api.github.com/repos/tpolecat/ocs/pulls{/number}","milestones_url":"https://api.github.com/repos/tpolecat/ocs/milestones{/number}","notifications_url":"https://api.github.com/repos/tpolecat/ocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tpolecat/ocs/labels{/name}","releases_url":"https://api.github.com/repos/tpolecat/ocs/releases{/id}","created_at":"2014-09-12T15:45:38Z","updated_at":"2015-05-07T17:34:38Z","pushed_at":"2015-10-16T16:29:10Z","git_url":"git://github.com/tpolecat/ocs.git","ssh_url":"git@github.com:tpolecat/ocs.git","clone_url":"https://github.com/tpolecat/ocs.git","svn_url":"https://github.com/tpolecat/ocs","homepage":null,"size":272432,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"gemini-hlsw:develop","ref":"develop","sha":"b7952c066119e19e401ed5ffe36e815044edf6b2","user":{"login":"gemini-hlsw","id":8593735,"avatar_url":"https://avatars.githubusercontent.com/u/8593735?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-hlsw","html_url":"https://github.com/gemini-hlsw","followers_url":"https://api.github.com/users/gemini-hlsw/followers","following_url":"https://api.github.com/users/gemini-hlsw/following{/other_user}","gists_url":"https://api.github.com/users/gemini-hlsw/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-hlsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-hlsw/subscriptions","organizations_url":"https://api.github.com/users/gemini-hlsw/orgs","repos_url":"https://api.github.com/users/gemini-hlsw/repos","events_url":"https://api.github.com/users/gemini-hlsw/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-hlsw/received_events","type":"Organization","site_admin":false},"repo":{"id":23963494,"name":"ocs","full_name":"gemini-hlsw/ocs","owner":{"login":"gemini-hlsw","id":8593735,"avatar_url":"https://avatars.githubusercontent.com/u/8593735?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-hlsw","html_url":"https://github.com/gemini-hlsw","followers_url":"https://api.github.com/users/gemini-hlsw/followers","following_url":"https://api.github.com/users/gemini-hlsw/following{/other_user}","gists_url":"https://api.github.com/users/gemini-hlsw/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-hlsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-hlsw/subscriptions","organizations_url":"https://api.github.com/users/gemini-hlsw/orgs","repos_url":"https://api.github.com/users/gemini-hlsw/repos","events_url":"https://api.github.com/users/gemini-hlsw/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-hlsw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gemini-hlsw/ocs","description":"Observatory Control Software","fork":false,"url":"https://api.github.com/repos/gemini-hlsw/ocs","forks_url":"https://api.github.com/repos/gemini-hlsw/ocs/forks","keys_url":"https://api.github.com/repos/gemini-hlsw/ocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-hlsw/ocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-hlsw/ocs/teams","hooks_url":"https://api.github.com/repos/gemini-hlsw/ocs/hooks","issue_events_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-hlsw/ocs/events","assignees_url":"https://api.github.com/repos/gemini-hlsw/ocs/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-hlsw/ocs/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-hlsw/ocs/tags","blobs_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-hlsw/ocs/languages","stargazers_url":"https://api.github.com/repos/gemini-hlsw/ocs/stargazers","contributors_url":"https://api.github.com/repos/gemini-hlsw/ocs/contributors","subscribers_url":"https://api.github.com/repos/gemini-hlsw/ocs/subscribers","subscription_url":"https://api.github.com/repos/gemini-hlsw/ocs/subscription","commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-hlsw/ocs/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-hlsw/ocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-hlsw/ocs/merges","archive_url":"https://api.github.com/repos/gemini-hlsw/ocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-hlsw/ocs/downloads","issues_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-hlsw/ocs/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-hlsw/ocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-hlsw/ocs/labels{/name}","releases_url":"https://api.github.com/repos/gemini-hlsw/ocs/releases{/id}","created_at":"2014-09-12T14:20:23Z","updated_at":"2015-07-13T13:36:36Z","pushed_at":"2015-10-16T18:40:53Z","git_url":"git://github.com/gemini-hlsw/ocs.git","ssh_url":"git@github.com:gemini-hlsw/ocs.git","clone_url":"https://github.com/gemini-hlsw/ocs.git","svn_url":"https://github.com/gemini-hlsw/ocs","homepage":"","size":295273,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":6,"forks":13,"open_issues":6,"watchers":4,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/593"},"html":{"href":"https://github.com/gemini-hlsw/ocs/pull/593"},"issue":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/issues/593"},"comments":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/issues/593/comments"},"review_comments":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/593/comments"},"review_comment":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/593/commits"},"statuses":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/e323f7d7caeaa02302b73f7ac161c17c78e6d5a0"}}}}