{"action":"created","comment":{"url":"https://api.github.com/repos/mit-crpg/openmc/pulls/comments/63200941","id":63200941,"diff_hunk":"@@ -333,37 +376,51 @@ def alias(self, alias):\n         else:\n             self._alias = self._name\n \n+    @zaid.setter\n+    def zaid(self, zaid):\n+        # Check type and value\n+        check_type('zaid', zaid, Integral)\n+        check_greater_than('zaid', zaid, 0, equality=False)\n+        self._zaid = zaid\n+\n+    @awr.setter\n+    def awr(self, awr):\n+        # Check validity of type and that the awr value is > 0\n+        check_type('awr', awr, Real)\n+        check_greater_than('awr', awr, 0.0, equality=False)\n+        self._awr = awr\n+\n     @kT.setter\n     def kT(self, kT):\n         # Check validity of type and that the kT value is >= 0\n-        check_type(\"kT\", kT, Real)\n-        check_greater_than(\"kT\", kT, 0.0, equality=True)\n+        check_type('kT', kT, Real)\n+        check_greater_than('kT', kT, 0.0, equality=True)\n         self._kT = kT\n \n     @scatt_type.setter\n     def scatt_type(self, scatt_type):\n         # check to see it is of a valid type and value\n-        check_value(\"scatt_type\", scatt_type, ['legendre', 'histogram',\n+        check_value('scatt_type', scatt_type, ['legendre', 'histogram',\n                                                'tabular'])\n         self._scatt_type = scatt_type\n \n     @order.setter\n     def order(self, order):\n         # Check type and value\n-        check_type(\"order\", order, Integral)\n-        check_greater_than(\"order\", order, 0, equality=True)\n+        check_type('order', order, Integral)\n+        check_greater_than('order', order, 0, equality=True)\n         self._order = order\n \n     @tabular_legendre.setter\n     def tabular_legendre(self, tabular_legendre):\n         # Check to make sure this is a dict and it has our keys with the\n         # right values.\n-        check_type(\"tabular_legendre\", tabular_legendre, dict)\n+        check_type('tabular_legendre', tabular_legendre, dict)\n         if 'enable' in tabular_legendre:\n             enable = tabular_legendre['enable']\n             check_type('enable', enable, bool)\n         else:\n-            msg = \"enable must be provided in tabular_legendre\"\n+            msg = 'enable must be provided in tabular_legendre'","path":"openmc/mgxs_library.py","position":285,"original_position":285,"commit_id":"e9fc744ba597a28d72dcbe204f60167e85eaa3c8","original_commit_id":"e9fc744ba597a28d72dcbe204f60167e85eaa3c8","user":{"login":"wbinventor","id":209492,"avatar_url":"https://avatars.githubusercontent.com/u/209492?v=3","gravatar_id":"","url":"https://api.github.com/users/wbinventor","html_url":"https://github.com/wbinventor","followers_url":"https://api.github.com/users/wbinventor/followers","following_url":"https://api.github.com/users/wbinventor/following{/other_user}","gists_url":"https://api.github.com/users/wbinventor/gists{/gist_id}","starred_url":"https://api.github.com/users/wbinventor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbinventor/subscriptions","organizations_url":"https://api.github.com/users/wbinventor/orgs","repos_url":"https://api.github.com/users/wbinventor/repos","events_url":"https://api.github.com/users/wbinventor/events{/privacy}","received_events_url":"https://api.github.com/users/wbinventor/received_events","type":"User","site_admin":false},"body":"I think this could be a bit confusing to a novice - perhaps this?\r\n\r\n```python\r\nmsg = 'The tabular_legendre dict must include a value keyed by \"enable\"'\r\n```","created_at":"2016-05-13T15:18:40Z","updated_at":"2016-05-13T15:18:40Z","html_url":"https://github.com/mit-crpg/openmc/pull/643#discussion_r63200941","pull_request_url":"https://api.github.com/repos/mit-crpg/openmc/pulls/643","_links":{"self":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/comments/63200941"},"html":{"href":"https://github.com/mit-crpg/openmc/pull/643#discussion_r63200941"},"pull_request":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/643"}}},"pull_request":{"url":"https://api.github.com/repos/mit-crpg/openmc/pulls/643","id":69249610,"html_url":"https://github.com/mit-crpg/openmc/pull/643","diff_url":"https://github.com/mit-crpg/openmc/pull/643.diff","patch_url":"https://github.com/mit-crpg/openmc/pull/643.patch","issue_url":"https://api.github.com/repos/mit-crpg/openmc/issues/643","number":643,"state":"open","locked":false,"title":"Integrated generation of Multi-Group Cross Section libraries with openmc.mgxs.Library","user":{"login":"nelsonag","id":1037107,"avatar_url":"https://avatars.githubusercontent.com/u/1037107?v=3","gravatar_id":"","url":"https://api.github.com/users/nelsonag","html_url":"https://github.com/nelsonag","followers_url":"https://api.github.com/users/nelsonag/followers","following_url":"https://api.github.com/users/nelsonag/following{/other_user}","gists_url":"https://api.github.com/users/nelsonag/gists{/gist_id}","starred_url":"https://api.github.com/users/nelsonag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nelsonag/subscriptions","organizations_url":"https://api.github.com/users/nelsonag/orgs","repos_url":"https://api.github.com/users/nelsonag/repos","events_url":"https://api.github.com/users/nelsonag/events{/privacy}","received_events_url":"https://api.github.com/users/nelsonag/received_events","type":"User","site_admin":false},"body":"This PR adds the capability to generate a multi-group cross section library for OpenMC's multi-group mode with @wbinventor's great `mgxs.Library` API.  This is done via the `mgxs.Library.write_mg_library(...)` routine.  \r\n\r\nI've also created an example notebook showing this off.  This has been incorporated in to the docs.  \r\n\r\nFinally, to make it a little easier for the user, I've made a list in the `mgxs.Library` module called 'OPENMC_MG_MGXS_TYPES` which can be used by the users to set the `mgxs_types` attribute of a `Library` object and to automatically get the types they'd need for a multi-group MC calculation.\r\n\r\nNote this PR is based off of #611 and so that would need to be merged first (... or just skip to this one after reviewing that one).","created_at":"2016-05-07T18:44:13Z","updated_at":"2016-05-13T15:18:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d913aaad6a1410e822f9dba46840236cadc6a3b6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mit-crpg/openmc/pulls/643/commits","review_comments_url":"https://api.github.com/repos/mit-crpg/openmc/pulls/643/comments","review_comment_url":"https://api.github.com/repos/mit-crpg/openmc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mit-crpg/openmc/issues/643/comments","statuses_url":"https://api.github.com/repos/mit-crpg/openmc/statuses/e9fc744ba597a28d72dcbe204f60167e85eaa3c8","head":{"label":"nelsonag:mgxs_integration","ref":"mgxs_integration","sha":"e9fc744ba597a28d72dcbe204f60167e85eaa3c8","user":{"login":"nelsonag","id":1037107,"avatar_url":"https://avatars.githubusercontent.com/u/1037107?v=3","gravatar_id":"","url":"https://api.github.com/users/nelsonag","html_url":"https://github.com/nelsonag","followers_url":"https://api.github.com/users/nelsonag/followers","following_url":"https://api.github.com/users/nelsonag/following{/other_user}","gists_url":"https://api.github.com/users/nelsonag/gists{/gist_id}","starred_url":"https://api.github.com/users/nelsonag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nelsonag/subscriptions","organizations_url":"https://api.github.com/users/nelsonag/orgs","repos_url":"https://api.github.com/users/nelsonag/repos","events_url":"https://api.github.com/users/nelsonag/events{/privacy}","received_events_url":"https://api.github.com/users/nelsonag/received_events","type":"User","site_admin":false},"repo":{"id":18528596,"name":"openmc","full_name":"nelsonag/openmc","owner":{"login":"nelsonag","id":1037107,"avatar_url":"https://avatars.githubusercontent.com/u/1037107?v=3","gravatar_id":"","url":"https://api.github.com/users/nelsonag","html_url":"https://github.com/nelsonag","followers_url":"https://api.github.com/users/nelsonag/followers","following_url":"https://api.github.com/users/nelsonag/following{/other_user}","gists_url":"https://api.github.com/users/nelsonag/gists{/gist_id}","starred_url":"https://api.github.com/users/nelsonag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nelsonag/subscriptions","organizations_url":"https://api.github.com/users/nelsonag/orgs","repos_url":"https://api.github.com/users/nelsonag/repos","events_url":"https://api.github.com/users/nelsonag/events{/privacy}","received_events_url":"https://api.github.com/users/nelsonag/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nelsonag/openmc","description":"OpenMC Monte Carlo Code","fork":true,"url":"https://api.github.com/repos/nelsonag/openmc","forks_url":"https://api.github.com/repos/nelsonag/openmc/forks","keys_url":"https://api.github.com/repos/nelsonag/openmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nelsonag/openmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nelsonag/openmc/teams","hooks_url":"https://api.github.com/repos/nelsonag/openmc/hooks","issue_events_url":"https://api.github.com/repos/nelsonag/openmc/issues/events{/number}","events_url":"https://api.github.com/repos/nelsonag/openmc/events","assignees_url":"https://api.github.com/repos/nelsonag/openmc/assignees{/user}","branches_url":"https://api.github.com/repos/nelsonag/openmc/branches{/branch}","tags_url":"https://api.github.com/repos/nelsonag/openmc/tags","blobs_url":"https://api.github.com/repos/nelsonag/openmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nelsonag/openmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nelsonag/openmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/nelsonag/openmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nelsonag/openmc/statuses/{sha}","languages_url":"https://api.github.com/repos/nelsonag/openmc/languages","stargazers_url":"https://api.github.com/repos/nelsonag/openmc/stargazers","contributors_url":"https://api.github.com/repos/nelsonag/openmc/contributors","subscribers_url":"https://api.github.com/repos/nelsonag/openmc/subscribers","subscription_url":"https://api.github.com/repos/nelsonag/openmc/subscription","commits_url":"https://api.github.com/repos/nelsonag/openmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/nelsonag/openmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/nelsonag/openmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/nelsonag/openmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/nelsonag/openmc/contents/{+path}","compare_url":"https://api.github.com/repos/nelsonag/openmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nelsonag/openmc/merges","archive_url":"https://api.github.com/repos/nelsonag/openmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nelsonag/openmc/downloads","issues_url":"https://api.github.com/repos/nelsonag/openmc/issues{/number}","pulls_url":"https://api.github.com/repos/nelsonag/openmc/pulls{/number}","milestones_url":"https://api.github.com/repos/nelsonag/openmc/milestones{/number}","notifications_url":"https://api.github.com/repos/nelsonag/openmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nelsonag/openmc/labels{/name}","releases_url":"https://api.github.com/repos/nelsonag/openmc/releases{/id}","deployments_url":"https://api.github.com/repos/nelsonag/openmc/deployments","created_at":"2014-04-07T18:40:04Z","updated_at":"2016-01-16T18:49:13Z","pushed_at":"2016-05-13T01:33:58Z","git_url":"git://github.com/nelsonag/openmc.git","ssh_url":"git@github.com:nelsonag/openmc.git","clone_url":"https://github.com/nelsonag/openmc.git","svn_url":"https://github.com/nelsonag/openmc","homepage":"http://mit-crpg.github.io/openmc/","size":27603,"stargazers_count":0,"watchers_count":0,"language":"FORTRAN","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":"mit-crpg:develop","ref":"develop","sha":"c494c5251f49b09783f1477dc4d1232b48f81e68","user":{"login":"mit-crpg","id":1247634,"avatar_url":"https://avatars.githubusercontent.com/u/1247634?v=3","gravatar_id":"","url":"https://api.github.com/users/mit-crpg","html_url":"https://github.com/mit-crpg","followers_url":"https://api.github.com/users/mit-crpg/followers","following_url":"https://api.github.com/users/mit-crpg/following{/other_user}","gists_url":"https://api.github.com/users/mit-crpg/gists{/gist_id}","starred_url":"https://api.github.com/users/mit-crpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mit-crpg/subscriptions","organizations_url":"https://api.github.com/users/mit-crpg/orgs","repos_url":"https://api.github.com/users/mit-crpg/repos","events_url":"https://api.github.com/users/mit-crpg/events{/privacy}","received_events_url":"https://api.github.com/users/mit-crpg/received_events","type":"Organization","site_admin":false},"repo":{"id":2081118,"name":"openmc","full_name":"mit-crpg/openmc","owner":{"login":"mit-crpg","id":1247634,"avatar_url":"https://avatars.githubusercontent.com/u/1247634?v=3","gravatar_id":"","url":"https://api.github.com/users/mit-crpg","html_url":"https://github.com/mit-crpg","followers_url":"https://api.github.com/users/mit-crpg/followers","following_url":"https://api.github.com/users/mit-crpg/following{/other_user}","gists_url":"https://api.github.com/users/mit-crpg/gists{/gist_id}","starred_url":"https://api.github.com/users/mit-crpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mit-crpg/subscriptions","organizations_url":"https://api.github.com/users/mit-crpg/orgs","repos_url":"https://api.github.com/users/mit-crpg/repos","events_url":"https://api.github.com/users/mit-crpg/events{/privacy}","received_events_url":"https://api.github.com/users/mit-crpg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mit-crpg/openmc","description":"OpenMC Monte Carlo Code","fork":false,"url":"https://api.github.com/repos/mit-crpg/openmc","forks_url":"https://api.github.com/repos/mit-crpg/openmc/forks","keys_url":"https://api.github.com/repos/mit-crpg/openmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mit-crpg/openmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mit-crpg/openmc/teams","hooks_url":"https://api.github.com/repos/mit-crpg/openmc/hooks","issue_events_url":"https://api.github.com/repos/mit-crpg/openmc/issues/events{/number}","events_url":"https://api.github.com/repos/mit-crpg/openmc/events","assignees_url":"https://api.github.com/repos/mit-crpg/openmc/assignees{/user}","branches_url":"https://api.github.com/repos/mit-crpg/openmc/branches{/branch}","tags_url":"https://api.github.com/repos/mit-crpg/openmc/tags","blobs_url":"https://api.github.com/repos/mit-crpg/openmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mit-crpg/openmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mit-crpg/openmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/mit-crpg/openmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mit-crpg/openmc/statuses/{sha}","languages_url":"https://api.github.com/repos/mit-crpg/openmc/languages","stargazers_url":"https://api.github.com/repos/mit-crpg/openmc/stargazers","contributors_url":"https://api.github.com/repos/mit-crpg/openmc/contributors","subscribers_url":"https://api.github.com/repos/mit-crpg/openmc/subscribers","subscription_url":"https://api.github.com/repos/mit-crpg/openmc/subscription","commits_url":"https://api.github.com/repos/mit-crpg/openmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/mit-crpg/openmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/mit-crpg/openmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/mit-crpg/openmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/mit-crpg/openmc/contents/{+path}","compare_url":"https://api.github.com/repos/mit-crpg/openmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mit-crpg/openmc/merges","archive_url":"https://api.github.com/repos/mit-crpg/openmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mit-crpg/openmc/downloads","issues_url":"https://api.github.com/repos/mit-crpg/openmc/issues{/number}","pulls_url":"https://api.github.com/repos/mit-crpg/openmc/pulls{/number}","milestones_url":"https://api.github.com/repos/mit-crpg/openmc/milestones{/number}","notifications_url":"https://api.github.com/repos/mit-crpg/openmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mit-crpg/openmc/labels{/name}","releases_url":"https://api.github.com/repos/mit-crpg/openmc/releases{/id}","deployments_url":"https://api.github.com/repos/mit-crpg/openmc/deployments","created_at":"2011-07-21T00:33:27Z","updated_at":"2016-04-26T10:43:19Z","pushed_at":"2016-05-13T14:20:35Z","git_url":"git://github.com/mit-crpg/openmc.git","ssh_url":"git@github.com:mit-crpg/openmc.git","clone_url":"https://github.com/mit-crpg/openmc.git","svn_url":"https://github.com/mit-crpg/openmc","homepage":"http://mit-crpg.github.io/openmc/","size":44000,"stargazers_count":77,"watchers_count":77,"language":"FORTRAN","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":93,"mirror_url":null,"open_issues_count":56,"forks":93,"open_issues":56,"watchers":77,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/643"},"html":{"href":"https://github.com/mit-crpg/openmc/pull/643"},"issue":{"href":"https://api.github.com/repos/mit-crpg/openmc/issues/643"},"comments":{"href":"https://api.github.com/repos/mit-crpg/openmc/issues/643/comments"},"review_comments":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/643/comments"},"review_comment":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/643/commits"},"statuses":{"href":"https://api.github.com/repos/mit-crpg/openmc/statuses/e9fc744ba597a28d72dcbe204f60167e85eaa3c8"}}}}