{"action":"created","comment":{"url":"https://api.github.com/repos/yt-project/yt/pulls/comments/203606073","pull_request_review_id":138527495,"id":203606073,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzYwNjA3Mw==","diff_hunk":"@@ -572,6 +573,28 @@ def create_field_info(self):\n         self.index.field_list = sorted(self.field_list)\n         self._last_freq = (None, None)\n \n+    def set_field_label_format(self, format_property, value):\n+        \"\"\"\n+        Set format properties for how fields will be written\n+        out. Accepts \n+\n+        format_property : string indicating what property to set\n+        value: the value to set for that format_property\n+        \"\"\"\n+        available_formats = {\"ionizataion_label\":(\"plus_minus\", \"roman_numeral\")}\n+        if format_property in available_formats:\n+            if value in available_formats[format_property]:\n+                setattr(self, \"%s_format\" % format_property, value)\n+            else:\n+                raise ValueError(\"{0} not an acceptable value for format_property \\\n+                        {1}. Choices are {2}.\".format(value, format_property,\n+                            available_formats[format_property]))\n+        else:\n+            raise ValueError(\"{0} not a recognized format_property. Available","path":"yt/data_objects/static_output.py","position":29,"original_position":29,"commit_id":"df1ca496fed19c0020d1cd94a6b063106fa1343f","original_commit_id":"df1ca496fed19c0020d1cd94a6b063106fa1343f","user":{"login":"ngoldbaum","id":3126246,"node_id":"MDQ6VXNlcjMxMjYyNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/3126246?v=4","gravatar_id":"","url":"https://api.github.com/users/ngoldbaum","html_url":"https://github.com/ngoldbaum","followers_url":"https://api.github.com/users/ngoldbaum/followers","following_url":"https://api.github.com/users/ngoldbaum/following{/other_user}","gists_url":"https://api.github.com/users/ngoldbaum/gists{/gist_id}","starred_url":"https://api.github.com/users/ngoldbaum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngoldbaum/subscriptions","organizations_url":"https://api.github.com/users/ngoldbaum/orgs","repos_url":"https://api.github.com/users/ngoldbaum/repos","events_url":"https://api.github.com/users/ngoldbaum/events{/privacy}","received_events_url":"https://api.github.com/users/ngoldbaum/received_events","type":"User","site_admin":false},"body":"forgot a continuation character\r\n\r\nI usually format multiline strings like this:\r\n\r\n```\r\nraise ValueError(\"this is a really long string \"\r\n                 \"that i am continuing on the next line.\")\r\n```\r\n\r\nWhich avoids the continuation character.","created_at":"2018-07-19T05:34:08Z","updated_at":"2018-07-19T05:34:08Z","html_url":"https://github.com/yt-project/yt/pull/1867#discussion_r203606073","pull_request_url":"https://api.github.com/repos/yt-project/yt/pulls/1867","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/yt-project/yt/pulls/comments/203606073"},"html":{"href":"https://github.com/yt-project/yt/pull/1867#discussion_r203606073"},"pull_request":{"href":"https://api.github.com/repos/yt-project/yt/pulls/1867"}}},"pull_request":{"url":"https://api.github.com/repos/yt-project/yt/pulls/1867","id":198416438,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NDE2NDM4","html_url":"https://github.com/yt-project/yt/pull/1867","diff_url":"https://github.com/yt-project/yt/pull/1867.diff","patch_url":"https://github.com/yt-project/yt/pull/1867.patch","issue_url":"https://api.github.com/repos/yt-project/yt/issues/1867","number":1867,"state":"open","locked":false,"title":"Changing Ion Label Formats","user":{"login":"eganhila","id":1646503,"node_id":"MDQ6VXNlcjE2NDY1MDM=","avatar_url":"https://avatars0.githubusercontent.com/u/1646503?v=4","gravatar_id":"","url":"https://api.github.com/users/eganhila","html_url":"https://github.com/eganhila","followers_url":"https://api.github.com/users/eganhila/followers","following_url":"https://api.github.com/users/eganhila/following{/other_user}","gists_url":"https://api.github.com/users/eganhila/gists{/gist_id}","starred_url":"https://api.github.com/users/eganhila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eganhila/subscriptions","organizations_url":"https://api.github.com/users/eganhila/orgs","repos_url":"https://api.github.com/users/eganhila/repos","events_url":"https://api.github.com/users/eganhila/events{/privacy}","received_events_url":"https://api.github.com/users/eganhila/received_events","type":"User","site_admin":false},"body":"This allows a user to toggle how ion field labels are formatted between the standard roman numeral notation and the +/- format more standard to chemistry/planetary science/etc.\r\n\r\nSpecific notes:\r\n- The way I set up the ability to change the format is currently attached to the Dataset object via set_field_label_format function. This is probably more general/complicated that it needs to be, but I thought it might be good to make it general since there are probably other format properties that could be changed in the future. Very up for debate though, I'm not attached to this implementation.\r\n- Related, there should eventually be a way to set the format type globally, not just via the dataset. But that seemed like a more extensive change for the future.\r\n- Not confident in the way I set up the tests for this.. I could see it breaking for different latex installations or something?\r\n- I also fixed what I think is a bug in the ion labeler where an ion like CO would be formatted as Co. Everything should now follow the guidelines outlined in http://ytep.readthedocs.io/en/latest/YTEPs/YTEP-0003.html.\r\n","created_at":"2018-06-29T20:26:15Z","updated_at":"2018-07-19T05:34:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69c0192bb1ce46c710e25739a5bf246a66fdecb4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yt-project/yt/pulls/1867/commits","review_comments_url":"https://api.github.com/repos/yt-project/yt/pulls/1867/comments","review_comment_url":"https://api.github.com/repos/yt-project/yt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yt-project/yt/issues/1867/comments","statuses_url":"https://api.github.com/repos/yt-project/yt/statuses/df1ca496fed19c0020d1cd94a6b063106fa1343f","head":{"label":"eganhila:master","ref":"master","sha":"df1ca496fed19c0020d1cd94a6b063106fa1343f","user":{"login":"eganhila","id":1646503,"node_id":"MDQ6VXNlcjE2NDY1MDM=","avatar_url":"https://avatars0.githubusercontent.com/u/1646503?v=4","gravatar_id":"","url":"https://api.github.com/users/eganhila","html_url":"https://github.com/eganhila","followers_url":"https://api.github.com/users/eganhila/followers","following_url":"https://api.github.com/users/eganhila/following{/other_user}","gists_url":"https://api.github.com/users/eganhila/gists{/gist_id}","starred_url":"https://api.github.com/users/eganhila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eganhila/subscriptions","organizations_url":"https://api.github.com/users/eganhila/orgs","repos_url":"https://api.github.com/users/eganhila/repos","events_url":"https://api.github.com/users/eganhila/events{/privacy}","received_events_url":"https://api.github.com/users/eganhila/received_events","type":"User","site_admin":false},"repo":{"id":96133211,"node_id":"MDEwOlJlcG9zaXRvcnk5NjEzMzIxMQ==","name":"yt","full_name":"eganhila/yt","owner":{"login":"eganhila","id":1646503,"node_id":"MDQ6VXNlcjE2NDY1MDM=","avatar_url":"https://avatars0.githubusercontent.com/u/1646503?v=4","gravatar_id":"","url":"https://api.github.com/users/eganhila","html_url":"https://github.com/eganhila","followers_url":"https://api.github.com/users/eganhila/followers","following_url":"https://api.github.com/users/eganhila/following{/other_user}","gists_url":"https://api.github.com/users/eganhila/gists{/gist_id}","starred_url":"https://api.github.com/users/eganhila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eganhila/subscriptions","organizations_url":"https://api.github.com/users/eganhila/orgs","repos_url":"https://api.github.com/users/eganhila/repos","events_url":"https://api.github.com/users/eganhila/events{/privacy}","received_events_url":"https://api.github.com/users/eganhila/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eganhila/yt","description":"Main yt repository","fork":true,"url":"https://api.github.com/repos/eganhila/yt","forks_url":"https://api.github.com/repos/eganhila/yt/forks","keys_url":"https://api.github.com/repos/eganhila/yt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eganhila/yt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eganhila/yt/teams","hooks_url":"https://api.github.com/repos/eganhila/yt/hooks","issue_events_url":"https://api.github.com/repos/eganhila/yt/issues/events{/number}","events_url":"https://api.github.com/repos/eganhila/yt/events","assignees_url":"https://api.github.com/repos/eganhila/yt/assignees{/user}","branches_url":"https://api.github.com/repos/eganhila/yt/branches{/branch}","tags_url":"https://api.github.com/repos/eganhila/yt/tags","blobs_url":"https://api.github.com/repos/eganhila/yt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eganhila/yt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eganhila/yt/git/refs{/sha}","trees_url":"https://api.github.com/repos/eganhila/yt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eganhila/yt/statuses/{sha}","languages_url":"https://api.github.com/repos/eganhila/yt/languages","stargazers_url":"https://api.github.com/repos/eganhila/yt/stargazers","contributors_url":"https://api.github.com/repos/eganhila/yt/contributors","subscribers_url":"https://api.github.com/repos/eganhila/yt/subscribers","subscription_url":"https://api.github.com/repos/eganhila/yt/subscription","commits_url":"https://api.github.com/repos/eganhila/yt/commits{/sha}","git_commits_url":"https://api.github.com/repos/eganhila/yt/git/commits{/sha}","comments_url":"https://api.github.com/repos/eganhila/yt/comments{/number}","issue_comment_url":"https://api.github.com/repos/eganhila/yt/issues/comments{/number}","contents_url":"https://api.github.com/repos/eganhila/yt/contents/{+path}","compare_url":"https://api.github.com/repos/eganhila/yt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eganhila/yt/merges","archive_url":"https://api.github.com/repos/eganhila/yt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eganhila/yt/downloads","issues_url":"https://api.github.com/repos/eganhila/yt/issues{/number}","pulls_url":"https://api.github.com/repos/eganhila/yt/pulls{/number}","milestones_url":"https://api.github.com/repos/eganhila/yt/milestones{/number}","notifications_url":"https://api.github.com/repos/eganhila/yt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eganhila/yt/labels{/name}","releases_url":"https://api.github.com/repos/eganhila/yt/releases{/id}","deployments_url":"https://api.github.com/repos/eganhila/yt/deployments","created_at":"2017-07-03T17:03:51Z","updated_at":"2018-07-18T18:17:58Z","pushed_at":"2018-07-18T18:17:56Z","git_url":"git://github.com/eganhila/yt.git","ssh_url":"git@github.com:eganhila/yt.git","clone_url":"https://github.com/eganhila/yt.git","svn_url":"https://github.com/eganhila/yt","homepage":"http://yt-project.org","size":263148,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yt-project:master","ref":"master","sha":"61dd618a698896ca5cd8a8f0347fb1b40abc96eb","user":{"login":"yt-project","id":20566579,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNTY2NTc5","avatar_url":"https://avatars0.githubusercontent.com/u/20566579?v=4","gravatar_id":"","url":"https://api.github.com/users/yt-project","html_url":"https://github.com/yt-project","followers_url":"https://api.github.com/users/yt-project/followers","following_url":"https://api.github.com/users/yt-project/following{/other_user}","gists_url":"https://api.github.com/users/yt-project/gists{/gist_id}","starred_url":"https://api.github.com/users/yt-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yt-project/subscriptions","organizations_url":"https://api.github.com/users/yt-project/orgs","repos_url":"https://api.github.com/users/yt-project/repos","events_url":"https://api.github.com/users/yt-project/events{/privacy}","received_events_url":"https://api.github.com/users/yt-project/received_events","type":"Organization","site_admin":false},"repo":{"id":88776493,"node_id":"MDEwOlJlcG9zaXRvcnk4ODc3NjQ5Mw==","name":"yt","full_name":"yt-project/yt","owner":{"login":"yt-project","id":20566579,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNTY2NTc5","avatar_url":"https://avatars0.githubusercontent.com/u/20566579?v=4","gravatar_id":"","url":"https://api.github.com/users/yt-project","html_url":"https://github.com/yt-project","followers_url":"https://api.github.com/users/yt-project/followers","following_url":"https://api.github.com/users/yt-project/following{/other_user}","gists_url":"https://api.github.com/users/yt-project/gists{/gist_id}","starred_url":"https://api.github.com/users/yt-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yt-project/subscriptions","organizations_url":"https://api.github.com/users/yt-project/orgs","repos_url":"https://api.github.com/users/yt-project/repos","events_url":"https://api.github.com/users/yt-project/events{/privacy}","received_events_url":"https://api.github.com/users/yt-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yt-project/yt","description":"Main yt repository","fork":false,"url":"https://api.github.com/repos/yt-project/yt","forks_url":"https://api.github.com/repos/yt-project/yt/forks","keys_url":"https://api.github.com/repos/yt-project/yt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yt-project/yt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yt-project/yt/teams","hooks_url":"https://api.github.com/repos/yt-project/yt/hooks","issue_events_url":"https://api.github.com/repos/yt-project/yt/issues/events{/number}","events_url":"https://api.github.com/repos/yt-project/yt/events","assignees_url":"https://api.github.com/repos/yt-project/yt/assignees{/user}","branches_url":"https://api.github.com/repos/yt-project/yt/branches{/branch}","tags_url":"https://api.github.com/repos/yt-project/yt/tags","blobs_url":"https://api.github.com/repos/yt-project/yt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yt-project/yt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yt-project/yt/git/refs{/sha}","trees_url":"https://api.github.com/repos/yt-project/yt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yt-project/yt/statuses/{sha}","languages_url":"https://api.github.com/repos/yt-project/yt/languages","stargazers_url":"https://api.github.com/repos/yt-project/yt/stargazers","contributors_url":"https://api.github.com/repos/yt-project/yt/contributors","subscribers_url":"https://api.github.com/repos/yt-project/yt/subscribers","subscription_url":"https://api.github.com/repos/yt-project/yt/subscription","commits_url":"https://api.github.com/repos/yt-project/yt/commits{/sha}","git_commits_url":"https://api.github.com/repos/yt-project/yt/git/commits{/sha}","comments_url":"https://api.github.com/repos/yt-project/yt/comments{/number}","issue_comment_url":"https://api.github.com/repos/yt-project/yt/issues/comments{/number}","contents_url":"https://api.github.com/repos/yt-project/yt/contents/{+path}","compare_url":"https://api.github.com/repos/yt-project/yt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yt-project/yt/merges","archive_url":"https://api.github.com/repos/yt-project/yt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yt-project/yt/downloads","issues_url":"https://api.github.com/repos/yt-project/yt/issues{/number}","pulls_url":"https://api.github.com/repos/yt-project/yt/pulls{/number}","milestones_url":"https://api.github.com/repos/yt-project/yt/milestones{/number}","notifications_url":"https://api.github.com/repos/yt-project/yt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yt-project/yt/labels{/name}","releases_url":"https://api.github.com/repos/yt-project/yt/releases{/id}","deployments_url":"https://api.github.com/repos/yt-project/yt/deployments","created_at":"2017-04-19T18:16:11Z","updated_at":"2018-07-18T18:56:16Z","pushed_at":"2018-07-18T18:56:08Z","git_url":"git://github.com/yt-project/yt.git","ssh_url":"git@github.com:yt-project/yt.git","clone_url":"https://github.com/yt-project/yt.git","svn_url":"https://github.com/yt-project/yt","homepage":"http://yt-project.org","size":267642,"stargazers_count":120,"watchers_count":120,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":99,"mirror_url":null,"archived":false,"open_issues_count":170,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":99,"open_issues":170,"watchers":120,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yt-project/yt/pulls/1867"},"html":{"href":"https://github.com/yt-project/yt/pull/1867"},"issue":{"href":"https://api.github.com/repos/yt-project/yt/issues/1867"},"comments":{"href":"https://api.github.com/repos/yt-project/yt/issues/1867/comments"},"review_comments":{"href":"https://api.github.com/repos/yt-project/yt/pulls/1867/comments"},"review_comment":{"href":"https://api.github.com/repos/yt-project/yt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yt-project/yt/pulls/1867/commits"},"statuses":{"href":"https://api.github.com/repos/yt-project/yt/statuses/df1ca496fed19c0020d1cd94a6b063106fa1343f"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ngoldbaum"}}