{"action":"created","comment":{"url":"https://api.github.com/repos/antha-lang/antha/pulls/comments/213279636","pull_request_review_id":150081448,"id":213279636,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzI3OTYzNg==","diff_hunk":"@@ -0,0 +1,140 @@\n+package wunit\n+\n+import (\n+\t\"encoding/json\"\n+\t\"fmt\"\n+\t\"github.com/pkg/errors\"\n+\t\"math\"\n+)\n+\n+// Unit everything we need to know about a unit to support it\n+type Unit struct {\n+\tname       string   //common name for the unit\n+\tsymbol     string   //symbol of the unit\n+\tbase       string   //the SI unit for this dimension, or derived one if there isn't one\n+\tprefix     SIPrefix //the SI prefix which is applied to the symbol\n+\tmultiplier float64  //value to multiply by to convert \"symbol\"s to \"base\", e.g. 60 for min (SI unit = s)\n+\texponent   int      //the exponent for the prefix, 1 unless the prefix is inclided in a power, e.g. exponent=2 for \"m^2\"\n+}\n+\n+// MarshalJSON marshal the unit as a JSON string\n+func (self *Unit) MarshalJSON() ([]byte, error) {\n+\tfmt.Println(\"MarshalJSON\")","path":"antha/anthalib/wunit/unit.go","position":22,"original_position":22,"commit_id":"dc983427f91a897e609d3b3c44e605836f957e37","original_commit_id":"d7fdc143de4a05724bd0ba65261c7067551ca1c5","user":{"login":"haydnKing","id":978497,"node_id":"MDQ6VXNlcjk3ODQ5Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/978497?v=4","gravatar_id":"","url":"https://api.github.com/users/haydnKing","html_url":"https://github.com/haydnKing","followers_url":"https://api.github.com/users/haydnKing/followers","following_url":"https://api.github.com/users/haydnKing/following{/other_user}","gists_url":"https://api.github.com/users/haydnKing/gists{/gist_id}","starred_url":"https://api.github.com/users/haydnKing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haydnKing/subscriptions","organizations_url":"https://api.github.com/users/haydnKing/orgs","repos_url":"https://api.github.com/users/haydnKing/repos","events_url":"https://api.github.com/users/haydnKing/events{/privacy}","received_events_url":"https://api.github.com/users/haydnKing/received_events","type":"User","site_admin":false},"body":"oops.\r\n(or was this wrt. the existence of the func?)","created_at":"2018-08-28T11:43:25Z","updated_at":"2018-08-28T11:43:25Z","html_url":"https://github.com/antha-lang/antha/pull/878#discussion_r213279636","pull_request_url":"https://api.github.com/repos/antha-lang/antha/pulls/878","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/antha-lang/antha/pulls/comments/213279636"},"html":{"href":"https://github.com/antha-lang/antha/pull/878#discussion_r213279636"},"pull_request":{"href":"https://api.github.com/repos/antha-lang/antha/pulls/878"}},"in_reply_to_id":213258220},"pull_request":{"url":"https://api.github.com/repos/antha-lang/antha/pulls/878","id":210774013,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwNzc0MDEz","html_url":"https://github.com/antha-lang/antha/pull/878","diff_url":"https://github.com/antha-lang/antha/pull/878.diff","patch_url":"https://github.com/antha-lang/antha/pull/878.patch","issue_url":"https://api.github.com/repos/antha-lang/antha/issues/878","number":878,"state":"open","locked":false,"title":"Reimplement wunit library","user":{"login":"haydnKing","id":978497,"node_id":"MDQ6VXNlcjk3ODQ5Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/978497?v=4","gravatar_id":"","url":"https://api.github.com/users/haydnKing","html_url":"https://github.com/haydnKing","followers_url":"https://api.github.com/users/haydnKing/followers","following_url":"https://api.github.com/users/haydnKing/following{/other_user}","gists_url":"https://api.github.com/users/haydnKing/gists{/gist_id}","starred_url":"https://api.github.com/users/haydnKing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haydnKing/subscriptions","organizations_url":"https://api.github.com/users/haydnKing/orgs","repos_url":"https://api.github.com/users/haydnKing/repos","events_url":"https://api.github.com/users/haydnKing/events{/privacy}","received_events_url":"https://api.github.com/users/haydnKing/received_events","type":"User","site_admin":false},"body":"Goal of this PR is to improve the wunit library and to increase test coverage, while keeping the external API (i.e. calls made by elements) as similar as possible.\r\n\r\nPrior to this PR, wunit has 46.8% test code coverage with several known issues. The PR increases test coverage to 80.1%, with a roughly 700 line reduction in non-test code and supports considerably more units.\r\n\r\nI deleted the README... is it worth writing a new one?","created_at":"2018-08-24T15:27:49Z","updated_at":"2018-08-28T11:43:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1af7da218e4ce9e33f653571e97882d00a36c419","assignee":null,"assignees":[],"requested_reviewers":[{"login":"m-i-sadowski","id":7792504,"node_id":"MDQ6VXNlcjc3OTI1MDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7792504?v=4","gravatar_id":"","url":"https://api.github.com/users/m-i-sadowski","html_url":"https://github.com/m-i-sadowski","followers_url":"https://api.github.com/users/m-i-sadowski/followers","following_url":"https://api.github.com/users/m-i-sadowski/following{/other_user}","gists_url":"https://api.github.com/users/m-i-sadowski/gists{/gist_id}","starred_url":"https://api.github.com/users/m-i-sadowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-i-sadowski/subscriptions","organizations_url":"https://api.github.com/users/m-i-sadowski/orgs","repos_url":"https://api.github.com/users/m-i-sadowski/repos","events_url":"https://api.github.com/users/m-i-sadowski/events{/privacy}","received_events_url":"https://api.github.com/users/m-i-sadowski/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/antha-lang/antha/pulls/878/commits","review_comments_url":"https://api.github.com/repos/antha-lang/antha/pulls/878/comments","review_comment_url":"https://api.github.com/repos/antha-lang/antha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/antha-lang/antha/issues/878/comments","statuses_url":"https://api.github.com/repos/antha-lang/antha/statuses/dc983427f91a897e609d3b3c44e605836f957e37","head":{"label":"antha-lang:wunit-II","ref":"wunit-II","sha":"dc983427f91a897e609d3b3c44e605836f957e37","user":{"login":"antha-lang","id":9553265,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NTMyNjU=","avatar_url":"https://avatars2.githubusercontent.com/u/9553265?v=4","gravatar_id":"","url":"https://api.github.com/users/antha-lang","html_url":"https://github.com/antha-lang","followers_url":"https://api.github.com/users/antha-lang/followers","following_url":"https://api.github.com/users/antha-lang/following{/other_user}","gists_url":"https://api.github.com/users/antha-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/antha-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antha-lang/subscriptions","organizations_url":"https://api.github.com/users/antha-lang/orgs","repos_url":"https://api.github.com/users/antha-lang/repos","events_url":"https://api.github.com/users/antha-lang/events{/privacy}","received_events_url":"https://api.github.com/users/antha-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":27073429,"node_id":"MDEwOlJlcG9zaXRvcnkyNzA3MzQyOQ==","name":"antha","full_name":"antha-lang/antha","owner":{"login":"antha-lang","id":9553265,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NTMyNjU=","avatar_url":"https://avatars2.githubusercontent.com/u/9553265?v=4","gravatar_id":"","url":"https://api.github.com/users/antha-lang","html_url":"https://github.com/antha-lang","followers_url":"https://api.github.com/users/antha-lang/followers","following_url":"https://api.github.com/users/antha-lang/following{/other_user}","gists_url":"https://api.github.com/users/antha-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/antha-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antha-lang/subscriptions","organizations_url":"https://api.github.com/users/antha-lang/orgs","repos_url":"https://api.github.com/users/antha-lang/repos","events_url":"https://api.github.com/users/antha-lang/events{/privacy}","received_events_url":"https://api.github.com/users/antha-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/antha-lang/antha","description":"The Antha Cross-Compiler","fork":false,"url":"https://api.github.com/repos/antha-lang/antha","forks_url":"https://api.github.com/repos/antha-lang/antha/forks","keys_url":"https://api.github.com/repos/antha-lang/antha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antha-lang/antha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antha-lang/antha/teams","hooks_url":"https://api.github.com/repos/antha-lang/antha/hooks","issue_events_url":"https://api.github.com/repos/antha-lang/antha/issues/events{/number}","events_url":"https://api.github.com/repos/antha-lang/antha/events","assignees_url":"https://api.github.com/repos/antha-lang/antha/assignees{/user}","branches_url":"https://api.github.com/repos/antha-lang/antha/branches{/branch}","tags_url":"https://api.github.com/repos/antha-lang/antha/tags","blobs_url":"https://api.github.com/repos/antha-lang/antha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antha-lang/antha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antha-lang/antha/git/refs{/sha}","trees_url":"https://api.github.com/repos/antha-lang/antha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antha-lang/antha/statuses/{sha}","languages_url":"https://api.github.com/repos/antha-lang/antha/languages","stargazers_url":"https://api.github.com/repos/antha-lang/antha/stargazers","contributors_url":"https://api.github.com/repos/antha-lang/antha/contributors","subscribers_url":"https://api.github.com/repos/antha-lang/antha/subscribers","subscription_url":"https://api.github.com/repos/antha-lang/antha/subscription","commits_url":"https://api.github.com/repos/antha-lang/antha/commits{/sha}","git_commits_url":"https://api.github.com/repos/antha-lang/antha/git/commits{/sha}","comments_url":"https://api.github.com/repos/antha-lang/antha/comments{/number}","issue_comment_url":"https://api.github.com/repos/antha-lang/antha/issues/comments{/number}","contents_url":"https://api.github.com/repos/antha-lang/antha/contents/{+path}","compare_url":"https://api.github.com/repos/antha-lang/antha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antha-lang/antha/merges","archive_url":"https://api.github.com/repos/antha-lang/antha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antha-lang/antha/downloads","issues_url":"https://api.github.com/repos/antha-lang/antha/issues{/number}","pulls_url":"https://api.github.com/repos/antha-lang/antha/pulls{/number}","milestones_url":"https://api.github.com/repos/antha-lang/antha/milestones{/number}","notifications_url":"https://api.github.com/repos/antha-lang/antha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antha-lang/antha/labels{/name}","releases_url":"https://api.github.com/repos/antha-lang/antha/releases{/id}","deployments_url":"https://api.github.com/repos/antha-lang/antha/deployments","created_at":"2014-11-24T11:42:27Z","updated_at":"2018-08-22T13:17:24Z","pushed_at":"2018-08-28T10:09:09Z","git_url":"git://github.com/antha-lang/antha.git","ssh_url":"git@github.com:antha-lang/antha.git","clone_url":"https://github.com/antha-lang/antha.git","svn_url":"https://github.com/antha-lang/antha","homepage":null,"size":133838,"stargazers_count":98,"watchers_count":98,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":44,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":14,"open_issues":44,"watchers":98,"default_branch":"master"}},"base":{"label":"antha-lang:master","ref":"master","sha":"a163fec486202742cce6c3fba1fdab338c8b5776","user":{"login":"antha-lang","id":9553265,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NTMyNjU=","avatar_url":"https://avatars2.githubusercontent.com/u/9553265?v=4","gravatar_id":"","url":"https://api.github.com/users/antha-lang","html_url":"https://github.com/antha-lang","followers_url":"https://api.github.com/users/antha-lang/followers","following_url":"https://api.github.com/users/antha-lang/following{/other_user}","gists_url":"https://api.github.com/users/antha-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/antha-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antha-lang/subscriptions","organizations_url":"https://api.github.com/users/antha-lang/orgs","repos_url":"https://api.github.com/users/antha-lang/repos","events_url":"https://api.github.com/users/antha-lang/events{/privacy}","received_events_url":"https://api.github.com/users/antha-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":27073429,"node_id":"MDEwOlJlcG9zaXRvcnkyNzA3MzQyOQ==","name":"antha","full_name":"antha-lang/antha","owner":{"login":"antha-lang","id":9553265,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NTMyNjU=","avatar_url":"https://avatars2.githubusercontent.com/u/9553265?v=4","gravatar_id":"","url":"https://api.github.com/users/antha-lang","html_url":"https://github.com/antha-lang","followers_url":"https://api.github.com/users/antha-lang/followers","following_url":"https://api.github.com/users/antha-lang/following{/other_user}","gists_url":"https://api.github.com/users/antha-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/antha-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antha-lang/subscriptions","organizations_url":"https://api.github.com/users/antha-lang/orgs","repos_url":"https://api.github.com/users/antha-lang/repos","events_url":"https://api.github.com/users/antha-lang/events{/privacy}","received_events_url":"https://api.github.com/users/antha-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/antha-lang/antha","description":"The Antha Cross-Compiler","fork":false,"url":"https://api.github.com/repos/antha-lang/antha","forks_url":"https://api.github.com/repos/antha-lang/antha/forks","keys_url":"https://api.github.com/repos/antha-lang/antha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antha-lang/antha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antha-lang/antha/teams","hooks_url":"https://api.github.com/repos/antha-lang/antha/hooks","issue_events_url":"https://api.github.com/repos/antha-lang/antha/issues/events{/number}","events_url":"https://api.github.com/repos/antha-lang/antha/events","assignees_url":"https://api.github.com/repos/antha-lang/antha/assignees{/user}","branches_url":"https://api.github.com/repos/antha-lang/antha/branches{/branch}","tags_url":"https://api.github.com/repos/antha-lang/antha/tags","blobs_url":"https://api.github.com/repos/antha-lang/antha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antha-lang/antha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antha-lang/antha/git/refs{/sha}","trees_url":"https://api.github.com/repos/antha-lang/antha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antha-lang/antha/statuses/{sha}","languages_url":"https://api.github.com/repos/antha-lang/antha/languages","stargazers_url":"https://api.github.com/repos/antha-lang/antha/stargazers","contributors_url":"https://api.github.com/repos/antha-lang/antha/contributors","subscribers_url":"https://api.github.com/repos/antha-lang/antha/subscribers","subscription_url":"https://api.github.com/repos/antha-lang/antha/subscription","commits_url":"https://api.github.com/repos/antha-lang/antha/commits{/sha}","git_commits_url":"https://api.github.com/repos/antha-lang/antha/git/commits{/sha}","comments_url":"https://api.github.com/repos/antha-lang/antha/comments{/number}","issue_comment_url":"https://api.github.com/repos/antha-lang/antha/issues/comments{/number}","contents_url":"https://api.github.com/repos/antha-lang/antha/contents/{+path}","compare_url":"https://api.github.com/repos/antha-lang/antha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antha-lang/antha/merges","archive_url":"https://api.github.com/repos/antha-lang/antha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antha-lang/antha/downloads","issues_url":"https://api.github.com/repos/antha-lang/antha/issues{/number}","pulls_url":"https://api.github.com/repos/antha-lang/antha/pulls{/number}","milestones_url":"https://api.github.com/repos/antha-lang/antha/milestones{/number}","notifications_url":"https://api.github.com/repos/antha-lang/antha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antha-lang/antha/labels{/name}","releases_url":"https://api.github.com/repos/antha-lang/antha/releases{/id}","deployments_url":"https://api.github.com/repos/antha-lang/antha/deployments","created_at":"2014-11-24T11:42:27Z","updated_at":"2018-08-22T13:17:24Z","pushed_at":"2018-08-28T10:09:09Z","git_url":"git://github.com/antha-lang/antha.git","ssh_url":"git@github.com:antha-lang/antha.git","clone_url":"https://github.com/antha-lang/antha.git","svn_url":"https://github.com/antha-lang/antha","homepage":null,"size":133838,"stargazers_count":98,"watchers_count":98,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":44,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":14,"open_issues":44,"watchers":98,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/antha-lang/antha/pulls/878"},"html":{"href":"https://github.com/antha-lang/antha/pull/878"},"issue":{"href":"https://api.github.com/repos/antha-lang/antha/issues/878"},"comments":{"href":"https://api.github.com/repos/antha-lang/antha/issues/878/comments"},"review_comments":{"href":"https://api.github.com/repos/antha-lang/antha/pulls/878/comments"},"review_comment":{"href":"https://api.github.com/repos/antha-lang/antha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/antha-lang/antha/pulls/878/commits"},"statuses":{"href":"https://api.github.com/repos/antha-lang/antha/statuses/dc983427f91a897e609d3b3c44e605836f957e37"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"haydnKing"}}