{"action":"created","comment":{"url":"https://api.github.com/repos/Molmed/clarity-ext/pulls/comments/83177704","pull_request_review_id":4035494,"id":83177704,"diff_hunk":"@@ -351,6 +351,33 @@ def content(self):\n         pass\n \n \n+class SampleSheetExtension(DriverFileExtension):\n+    \"\"\"\n+    Provides helper methods for creating a CSV\n+    \"\"\"\n+    __metaclass__ = ABCMeta\n+\n+    NONE = \"<none>\"\n+\n+    def header(self, name):\n+        return self.line(\"[{}]\".format(name))\n+\n+    def udf_prefixed(self, name, mapping=None):\n+        return self.udf(name, mapping, prefix=name)\n+\n+    def udf(self, name):\n+        \"\"\"Returns the UDF if available, othervise self.NONE. Provided for readability\"\"\"\n+        udf_val = self.context.udfs.get(name, self.NONE)\n+        return udf_val\n+\n+    @staticmethod\n+    def line(*args):\n+        \"\"\"Generates one line of the sample sheet, CSV formatted\"\"\"\n+        # TODO: The example shows commas in each line. Is that actually required?\n+        arg_list = list(args) + [\"\"] * (9 - len(args))","path":"clarity_ext/extensions.py","position":27,"original_position":27,"commit_id":"5da62ce9dbaab0c9af63e507f4ed42e48722cdae","original_commit_id":"6c797b013a6aee2b2d81da0388c11df4c38492c6","user":{"login":"withrocks","id":800390,"avatar_url":"https://avatars.githubusercontent.com/u/800390?v=3","gravatar_id":"","url":"https://api.github.com/users/withrocks","html_url":"https://github.com/withrocks","followers_url":"https://api.github.com/users/withrocks/followers","following_url":"https://api.github.com/users/withrocks/following{/other_user}","gists_url":"https://api.github.com/users/withrocks/gists{/gist_id}","starred_url":"https://api.github.com/users/withrocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/withrocks/subscriptions","organizations_url":"https://api.github.com/users/withrocks/orgs","repos_url":"https://api.github.com/users/withrocks/repos","events_url":"https://api.github.com/users/withrocks/events{/privacy}","received_events_url":"https://api.github.com/users/withrocks/received_events","type":"User","site_admin":false},"body":"You're right, this has to do with the number of fields, but I seem forgot about refactoring this to be more generic (I don't like magic numbers either.)\r\n\r\nI'll follow this up with another commit which hopefully makes it clearer.","created_at":"2016-10-13T09:37:10Z","updated_at":"2016-10-13T09:37:10Z","html_url":"https://github.com/Molmed/clarity-ext/pull/48#discussion_r83177704","pull_request_url":"https://api.github.com/repos/Molmed/clarity-ext/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/Molmed/clarity-ext/pulls/comments/83177704"},"html":{"href":"https://github.com/Molmed/clarity-ext/pull/48#discussion_r83177704"},"pull_request":{"href":"https://api.github.com/repos/Molmed/clarity-ext/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/Molmed/clarity-ext/pulls/48","id":88969355,"html_url":"https://github.com/Molmed/clarity-ext/pull/48","diff_url":"https://github.com/Molmed/clarity-ext/pull/48.diff","patch_url":"https://github.com/Molmed/clarity-ext/pull/48.patch","issue_url":"https://api.github.com/repos/Molmed/clarity-ext/issues/48","number":48,"state":"open","locked":false,"title":"Support generation of samplesheet","user":{"login":"withrocks","id":800390,"avatar_url":"https://avatars.githubusercontent.com/u/800390?v=3","gravatar_id":"","url":"https://api.github.com/users/withrocks","html_url":"https://github.com/withrocks","followers_url":"https://api.github.com/users/withrocks/followers","following_url":"https://api.github.com/users/withrocks/following{/other_user}","gists_url":"https://api.github.com/users/withrocks/gists{/gist_id}","starred_url":"https://api.github.com/users/withrocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/withrocks/subscriptions","organizations_url":"https://api.github.com/users/withrocks/orgs","repos_url":"https://api.github.com/users/withrocks/repos","events_url":"https://api.github.com/users/withrocks/events{/privacy}","received_events_url":"https://api.github.com/users/withrocks/received_events","type":"User","site_admin":false},"body":"This pull request provides support for generating samplesheets. It also contains various related fixes and refactorings.","created_at":"2016-10-12T07:58:27Z","updated_at":"2016-10-13T09:37:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af9b26c2b728e291d1ccb481562a7bab621fbe78","assignee":{"login":"johanherman","id":11720374,"avatar_url":"https://avatars.githubusercontent.com/u/11720374?v=3","gravatar_id":"","url":"https://api.github.com/users/johanherman","html_url":"https://github.com/johanherman","followers_url":"https://api.github.com/users/johanherman/followers","following_url":"https://api.github.com/users/johanherman/following{/other_user}","gists_url":"https://api.github.com/users/johanherman/gists{/gist_id}","starred_url":"https://api.github.com/users/johanherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanherman/subscriptions","organizations_url":"https://api.github.com/users/johanherman/orgs","repos_url":"https://api.github.com/users/johanherman/repos","events_url":"https://api.github.com/users/johanherman/events{/privacy}","received_events_url":"https://api.github.com/users/johanherman/received_events","type":"User","site_admin":false},"assignees":[{"login":"johanherman","id":11720374,"avatar_url":"https://avatars.githubusercontent.com/u/11720374?v=3","gravatar_id":"","url":"https://api.github.com/users/johanherman","html_url":"https://github.com/johanherman","followers_url":"https://api.github.com/users/johanherman/followers","following_url":"https://api.github.com/users/johanherman/following{/other_user}","gists_url":"https://api.github.com/users/johanherman/gists{/gist_id}","starred_url":"https://api.github.com/users/johanherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanherman/subscriptions","organizations_url":"https://api.github.com/users/johanherman/orgs","repos_url":"https://api.github.com/users/johanherman/repos","events_url":"https://api.github.com/users/johanherman/events{/privacy}","received_events_url":"https://api.github.com/users/johanherman/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Molmed/clarity-ext/pulls/48/commits","review_comments_url":"https://api.github.com/repos/Molmed/clarity-ext/pulls/48/comments","review_comment_url":"https://api.github.com/repos/Molmed/clarity-ext/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Molmed/clarity-ext/issues/48/comments","statuses_url":"https://api.github.com/repos/Molmed/clarity-ext/statuses/5da62ce9dbaab0c9af63e507f4ed42e48722cdae","head":{"label":"withrocks:lims-749-samplesheet-rb2","ref":"lims-749-samplesheet-rb2","sha":"5da62ce9dbaab0c9af63e507f4ed42e48722cdae","user":{"login":"withrocks","id":800390,"avatar_url":"https://avatars.githubusercontent.com/u/800390?v=3","gravatar_id":"","url":"https://api.github.com/users/withrocks","html_url":"https://github.com/withrocks","followers_url":"https://api.github.com/users/withrocks/followers","following_url":"https://api.github.com/users/withrocks/following{/other_user}","gists_url":"https://api.github.com/users/withrocks/gists{/gist_id}","starred_url":"https://api.github.com/users/withrocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/withrocks/subscriptions","organizations_url":"https://api.github.com/users/withrocks/orgs","repos_url":"https://api.github.com/users/withrocks/repos","events_url":"https://api.github.com/users/withrocks/events{/privacy}","received_events_url":"https://api.github.com/users/withrocks/received_events","type":"User","site_admin":false},"repo":{"id":60516560,"name":"clarity-ext","full_name":"withrocks/clarity-ext","owner":{"login":"withrocks","id":800390,"avatar_url":"https://avatars.githubusercontent.com/u/800390?v=3","gravatar_id":"","url":"https://api.github.com/users/withrocks","html_url":"https://github.com/withrocks","followers_url":"https://api.github.com/users/withrocks/followers","following_url":"https://api.github.com/users/withrocks/following{/other_user}","gists_url":"https://api.github.com/users/withrocks/gists{/gist_id}","starred_url":"https://api.github.com/users/withrocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/withrocks/subscriptions","organizations_url":"https://api.github.com/users/withrocks/orgs","repos_url":"https://api.github.com/users/withrocks/repos","events_url":"https://api.github.com/users/withrocks/events{/privacy}","received_events_url":"https://api.github.com/users/withrocks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/withrocks/clarity-ext","description":"Extensions for Clarity","fork":true,"url":"https://api.github.com/repos/withrocks/clarity-ext","forks_url":"https://api.github.com/repos/withrocks/clarity-ext/forks","keys_url":"https://api.github.com/repos/withrocks/clarity-ext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/withrocks/clarity-ext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/withrocks/clarity-ext/teams","hooks_url":"https://api.github.com/repos/withrocks/clarity-ext/hooks","issue_events_url":"https://api.github.com/repos/withrocks/clarity-ext/issues/events{/number}","events_url":"https://api.github.com/repos/withrocks/clarity-ext/events","assignees_url":"https://api.github.com/repos/withrocks/clarity-ext/assignees{/user}","branches_url":"https://api.github.com/repos/withrocks/clarity-ext/branches{/branch}","tags_url":"https://api.github.com/repos/withrocks/clarity-ext/tags","blobs_url":"https://api.github.com/repos/withrocks/clarity-ext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/withrocks/clarity-ext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/withrocks/clarity-ext/git/refs{/sha}","trees_url":"https://api.github.com/repos/withrocks/clarity-ext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/withrocks/clarity-ext/statuses/{sha}","languages_url":"https://api.github.com/repos/withrocks/clarity-ext/languages","stargazers_url":"https://api.github.com/repos/withrocks/clarity-ext/stargazers","contributors_url":"https://api.github.com/repos/withrocks/clarity-ext/contributors","subscribers_url":"https://api.github.com/repos/withrocks/clarity-ext/subscribers","subscription_url":"https://api.github.com/repos/withrocks/clarity-ext/subscription","commits_url":"https://api.github.com/repos/withrocks/clarity-ext/commits{/sha}","git_commits_url":"https://api.github.com/repos/withrocks/clarity-ext/git/commits{/sha}","comments_url":"https://api.github.com/repos/withrocks/clarity-ext/comments{/number}","issue_comment_url":"https://api.github.com/repos/withrocks/clarity-ext/issues/comments{/number}","contents_url":"https://api.github.com/repos/withrocks/clarity-ext/contents/{+path}","compare_url":"https://api.github.com/repos/withrocks/clarity-ext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/withrocks/clarity-ext/merges","archive_url":"https://api.github.com/repos/withrocks/clarity-ext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/withrocks/clarity-ext/downloads","issues_url":"https://api.github.com/repos/withrocks/clarity-ext/issues{/number}","pulls_url":"https://api.github.com/repos/withrocks/clarity-ext/pulls{/number}","milestones_url":"https://api.github.com/repos/withrocks/clarity-ext/milestones{/number}","notifications_url":"https://api.github.com/repos/withrocks/clarity-ext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/withrocks/clarity-ext/labels{/name}","releases_url":"https://api.github.com/repos/withrocks/clarity-ext/releases{/id}","deployments_url":"https://api.github.com/repos/withrocks/clarity-ext/deployments","created_at":"2016-06-06T09:38:04Z","updated_at":"2016-06-06T09:38:05Z","pushed_at":"2016-10-12T07:54:57Z","git_url":"git://github.com/withrocks/clarity-ext.git","ssh_url":"git@github.com:withrocks/clarity-ext.git","clone_url":"https://github.com/withrocks/clarity-ext.git","svn_url":"https://github.com/withrocks/clarity-ext","homepage":null,"size":308,"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":"Molmed:develop","ref":"develop","sha":"432d4304d6c1040b6b0e0a8f76e09d4c70895829","user":{"login":"Molmed","id":3587866,"avatar_url":"https://avatars.githubusercontent.com/u/3587866?v=3","gravatar_id":"","url":"https://api.github.com/users/Molmed","html_url":"https://github.com/Molmed","followers_url":"https://api.github.com/users/Molmed/followers","following_url":"https://api.github.com/users/Molmed/following{/other_user}","gists_url":"https://api.github.com/users/Molmed/gists{/gist_id}","starred_url":"https://api.github.com/users/Molmed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Molmed/subscriptions","organizations_url":"https://api.github.com/users/Molmed/orgs","repos_url":"https://api.github.com/users/Molmed/repos","events_url":"https://api.github.com/users/Molmed/events{/privacy}","received_events_url":"https://api.github.com/users/Molmed/received_events","type":"Organization","site_admin":false},"repo":{"id":52793916,"name":"clarity-ext","full_name":"Molmed/clarity-ext","owner":{"login":"Molmed","id":3587866,"avatar_url":"https://avatars.githubusercontent.com/u/3587866?v=3","gravatar_id":"","url":"https://api.github.com/users/Molmed","html_url":"https://github.com/Molmed","followers_url":"https://api.github.com/users/Molmed/followers","following_url":"https://api.github.com/users/Molmed/following{/other_user}","gists_url":"https://api.github.com/users/Molmed/gists{/gist_id}","starred_url":"https://api.github.com/users/Molmed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Molmed/subscriptions","organizations_url":"https://api.github.com/users/Molmed/orgs","repos_url":"https://api.github.com/users/Molmed/repos","events_url":"https://api.github.com/users/Molmed/events{/privacy}","received_events_url":"https://api.github.com/users/Molmed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Molmed/clarity-ext","description":"Extensions for Clarity","fork":false,"url":"https://api.github.com/repos/Molmed/clarity-ext","forks_url":"https://api.github.com/repos/Molmed/clarity-ext/forks","keys_url":"https://api.github.com/repos/Molmed/clarity-ext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Molmed/clarity-ext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Molmed/clarity-ext/teams","hooks_url":"https://api.github.com/repos/Molmed/clarity-ext/hooks","issue_events_url":"https://api.github.com/repos/Molmed/clarity-ext/issues/events{/number}","events_url":"https://api.github.com/repos/Molmed/clarity-ext/events","assignees_url":"https://api.github.com/repos/Molmed/clarity-ext/assignees{/user}","branches_url":"https://api.github.com/repos/Molmed/clarity-ext/branches{/branch}","tags_url":"https://api.github.com/repos/Molmed/clarity-ext/tags","blobs_url":"https://api.github.com/repos/Molmed/clarity-ext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Molmed/clarity-ext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Molmed/clarity-ext/git/refs{/sha}","trees_url":"https://api.github.com/repos/Molmed/clarity-ext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Molmed/clarity-ext/statuses/{sha}","languages_url":"https://api.github.com/repos/Molmed/clarity-ext/languages","stargazers_url":"https://api.github.com/repos/Molmed/clarity-ext/stargazers","contributors_url":"https://api.github.com/repos/Molmed/clarity-ext/contributors","subscribers_url":"https://api.github.com/repos/Molmed/clarity-ext/subscribers","subscription_url":"https://api.github.com/repos/Molmed/clarity-ext/subscription","commits_url":"https://api.github.com/repos/Molmed/clarity-ext/commits{/sha}","git_commits_url":"https://api.github.com/repos/Molmed/clarity-ext/git/commits{/sha}","comments_url":"https://api.github.com/repos/Molmed/clarity-ext/comments{/number}","issue_comment_url":"https://api.github.com/repos/Molmed/clarity-ext/issues/comments{/number}","contents_url":"https://api.github.com/repos/Molmed/clarity-ext/contents/{+path}","compare_url":"https://api.github.com/repos/Molmed/clarity-ext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Molmed/clarity-ext/merges","archive_url":"https://api.github.com/repos/Molmed/clarity-ext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Molmed/clarity-ext/downloads","issues_url":"https://api.github.com/repos/Molmed/clarity-ext/issues{/number}","pulls_url":"https://api.github.com/repos/Molmed/clarity-ext/pulls{/number}","milestones_url":"https://api.github.com/repos/Molmed/clarity-ext/milestones{/number}","notifications_url":"https://api.github.com/repos/Molmed/clarity-ext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Molmed/clarity-ext/labels{/name}","releases_url":"https://api.github.com/repos/Molmed/clarity-ext/releases{/id}","deployments_url":"https://api.github.com/repos/Molmed/clarity-ext/deployments","created_at":"2016-02-29T13:41:31Z","updated_at":"2016-03-01T13:55:25Z","pushed_at":"2016-10-12T07:58:27Z","git_url":"git://github.com/Molmed/clarity-ext.git","ssh_url":"git@github.com:Molmed/clarity-ext.git","clone_url":"https://github.com/Molmed/clarity-ext.git","svn_url":"https://github.com/Molmed/clarity-ext","homepage":null,"size":316,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Molmed/clarity-ext/pulls/48"},"html":{"href":"https://github.com/Molmed/clarity-ext/pull/48"},"issue":{"href":"https://api.github.com/repos/Molmed/clarity-ext/issues/48"},"comments":{"href":"https://api.github.com/repos/Molmed/clarity-ext/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/Molmed/clarity-ext/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/Molmed/clarity-ext/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Molmed/clarity-ext/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/Molmed/clarity-ext/statuses/5da62ce9dbaab0c9af63e507f4ed42e48722cdae"}}}}
{"actor":{"display_login":"withrocks"}}