{"action":"created","comment":{"url":"https://api.github.com/repos/mit-crpg/openmc/pulls/comments/28295107","id":28295107,"diff_hunk":"@@ -0,0 +1,586 @@\n+#!/usr/bin/env python\n+\n+from openmc.checkvalue import *\n+from openmc.clean_xml import *\n+from xml.etree import ElementTree as ET\n+import numpy as np\n+\n+\n+class CMFDMesh(object):\n+\n+    def __init__(self):\n+","path":"src/utils/openmc/cmfd.py","position":12,"original_position":12,"commit_id":"e1846b0a5e60d22d1f7f5b6372870106a720df72","original_commit_id":"e1846b0a5e60d22d1f7f5b6372870106a720df72","user":{"login":"scopatz","id":320553,"avatar_url":"https://avatars.githubusercontent.com/u/320553?v=3","gravatar_id":"","url":"https://api.github.com/users/scopatz","html_url":"https://github.com/scopatz","followers_url":"https://api.github.com/users/scopatz/followers","following_url":"https://api.github.com/users/scopatz/following{/other_user}","gists_url":"https://api.github.com/users/scopatz/gists{/gist_id}","starred_url":"https://api.github.com/users/scopatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scopatz/subscriptions","organizations_url":"https://api.github.com/users/scopatz/orgs","repos_url":"https://api.github.com/users/scopatz/repos","events_url":"https://api.github.com/users/scopatz/events{/privacy}","received_events_url":"https://api.github.com/users/scopatz/received_events","type":"User","site_admin":false},"body":"PEP8: extra whitespace","created_at":"2015-04-14T01:35:50Z","updated_at":"2015-04-14T01:35:50Z","html_url":"https://github.com/mit-crpg/openmc/pull/331#discussion_r28295107","pull_request_url":"https://api.github.com/repos/mit-crpg/openmc/pulls/331","_links":{"self":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/comments/28295107"},"html":{"href":"https://github.com/mit-crpg/openmc/pull/331#discussion_r28295107"},"pull_request":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/331"}}},"pull_request":{"url":"https://api.github.com/repos/mit-crpg/openmc/pulls/331","id":22653852,"html_url":"https://github.com/mit-crpg/openmc/pull/331","diff_url":"https://github.com/mit-crpg/openmc/pull/331.diff","patch_url":"https://github.com/mit-crpg/openmc/pull/331.patch","issue_url":"https://api.github.com/repos/mit-crpg/openmc/issues/331","number":331,"state":"open","locked":false,"title":"OpenMC Python API","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":"This pull requests includes a Python API to generate OpenMC XML input files. The API is in the ``src/utils/openmc`` directory. Now, when a user installs OpenMC, the Python API is also installed as the ``openmc`` Python package on the user's machine. The API should make it easy(ier) to write and easily modify input files for large, complex geometries. In addition, this added functionality makes it easier to use OpenMC for parametric optimization. The API should satisfy the complete XML input specifications as documented on OpenMC's website (though I may have missed something). \r\n\r\nThe following is a rough breakdown of the files and Python classes included in this PR:\r\n\r\n**settings.xml**\r\n* Specifications implemented in ``settings.py``\r\n* ``SettingsFile`` class\r\n\r\n**materials.xml**\r\n* Specifications implemented in ``nuclide.py``, ``element.py``, and ``material.py``\r\n* ``Nuclide``, ``Element``, ``Material``, and ``MaterialsFile`` classes\r\n\r\n**geometry.xml**\r\n* Specifications implemented in ``surface.py``, ``universe.py`` and ``geometry.py``\r\n* ``Surface`` and associated subclasses (*e.g.*, ``XPlane``, ``ZCylinder``, etc.), ``Cell``, ``Universe``, ``Lattice``, ``Geometry``, and ``GeometryFile`` classes\r\n\r\n**tallies.xml**\r\n* Specifications implemented in ``tallies.py``\r\n* ``Mesh``, ``Filter``, ``Tally``, and ``TalliesFile`` classes\r\n\r\n**plots.xml**\r\n* Specifications implemented in ``plots.py``\r\n* ``Plot`` and ``PlotsFile`` classes\r\n\r\nAll of the example input files in the ``examples`` directory were replicated into separate ``xml`` and ``python`` subdirectories. The ``python`` subdirectory includes ``build-xml.py`` files which generate all of the XML input files needed to run each case. The output from running the cases in the ``python`` subdirectory are slightly different than those in the ``xml`` subdirectory due to issue #330.\r\n\r\nFinally, this PR is not ready to merge since it includes a compatibility module for OpenCSG, which is not yet open sourced. I mainly wanted to submit this PR to get some feedback from the core OpenMC developers which I can incorporate while waiting on OpenCSG to mature a bit. In addition, I wanted to communicate to  OpenMC users that the API is available since others may find it useful for their work.","created_at":"2014-10-13T15:47:53Z","updated_at":"2015-04-14T01:35:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de59d828a5b27fd2a6a8be733df3a1a85cd11c54","assignee":{"login":"paulromano","id":743095,"avatar_url":"https://avatars.githubusercontent.com/u/743095?v=3","gravatar_id":"","url":"https://api.github.com/users/paulromano","html_url":"https://github.com/paulromano","followers_url":"https://api.github.com/users/paulromano/followers","following_url":"https://api.github.com/users/paulromano/following{/other_user}","gists_url":"https://api.github.com/users/paulromano/gists{/gist_id}","starred_url":"https://api.github.com/users/paulromano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulromano/subscriptions","organizations_url":"https://api.github.com/users/paulromano/orgs","repos_url":"https://api.github.com/users/paulromano/repos","events_url":"https://api.github.com/users/paulromano/events{/privacy}","received_events_url":"https://api.github.com/users/paulromano/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mit-crpg/openmc/milestones/11","html_url":"https://github.com/mit-crpg/openmc/milestones/v0.7","labels_url":"https://api.github.com/repos/mit-crpg/openmc/milestones/11/labels","id":769762,"number":11,"title":"v0.7","description":"","creator":{"login":"paulromano","id":743095,"avatar_url":"https://avatars.githubusercontent.com/u/743095?v=3","gravatar_id":"","url":"https://api.github.com/users/paulromano","html_url":"https://github.com/paulromano","followers_url":"https://api.github.com/users/paulromano/followers","following_url":"https://api.github.com/users/paulromano/following{/other_user}","gists_url":"https://api.github.com/users/paulromano/gists{/gist_id}","starred_url":"https://api.github.com/users/paulromano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulromano/subscriptions","organizations_url":"https://api.github.com/users/paulromano/orgs","repos_url":"https://api.github.com/users/paulromano/repos","events_url":"https://api.github.com/users/paulromano/events{/privacy}","received_events_url":"https://api.github.com/users/paulromano/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":11,"state":"open","created_at":"2014-08-28T15:56:37Z","updated_at":"2015-04-09T19:58:41Z","due_on":"2015-03-31T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/mit-crpg/openmc/pulls/331/commits","review_comments_url":"https://api.github.com/repos/mit-crpg/openmc/pulls/331/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/331/comments","statuses_url":"https://api.github.com/repos/mit-crpg/openmc/statuses/e1846b0a5e60d22d1f7f5b6372870106a720df72","head":{"label":"wbinventor:python-api","ref":"python-api","sha":"e1846b0a5e60d22d1f7f5b6372870106a720df72","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},"repo":{"id":17599847,"name":"openmc","full_name":"wbinventor/openmc","owner":{"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},"private":false,"html_url":"https://github.com/wbinventor/openmc","description":"OpenMC Monte Carlo Code","fork":true,"url":"https://api.github.com/repos/wbinventor/openmc","forks_url":"https://api.github.com/repos/wbinventor/openmc/forks","keys_url":"https://api.github.com/repos/wbinventor/openmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wbinventor/openmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wbinventor/openmc/teams","hooks_url":"https://api.github.com/repos/wbinventor/openmc/hooks","issue_events_url":"https://api.github.com/repos/wbinventor/openmc/issues/events{/number}","events_url":"https://api.github.com/repos/wbinventor/openmc/events","assignees_url":"https://api.github.com/repos/wbinventor/openmc/assignees{/user}","branches_url":"https://api.github.com/repos/wbinventor/openmc/branches{/branch}","tags_url":"https://api.github.com/repos/wbinventor/openmc/tags","blobs_url":"https://api.github.com/repos/wbinventor/openmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wbinventor/openmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wbinventor/openmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/wbinventor/openmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wbinventor/openmc/statuses/{sha}","languages_url":"https://api.github.com/repos/wbinventor/openmc/languages","stargazers_url":"https://api.github.com/repos/wbinventor/openmc/stargazers","contributors_url":"https://api.github.com/repos/wbinventor/openmc/contributors","subscribers_url":"https://api.github.com/repos/wbinventor/openmc/subscribers","subscription_url":"https://api.github.com/repos/wbinventor/openmc/subscription","commits_url":"https://api.github.com/repos/wbinventor/openmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/wbinventor/openmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/wbinventor/openmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/wbinventor/openmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/wbinventor/openmc/contents/{+path}","compare_url":"https://api.github.com/repos/wbinventor/openmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wbinventor/openmc/merges","archive_url":"https://api.github.com/repos/wbinventor/openmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wbinventor/openmc/downloads","issues_url":"https://api.github.com/repos/wbinventor/openmc/issues{/number}","pulls_url":"https://api.github.com/repos/wbinventor/openmc/pulls{/number}","milestones_url":"https://api.github.com/repos/wbinventor/openmc/milestones{/number}","notifications_url":"https://api.github.com/repos/wbinventor/openmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wbinventor/openmc/labels{/name}","releases_url":"https://api.github.com/repos/wbinventor/openmc/releases{/id}","created_at":"2014-03-10T16:36:03Z","updated_at":"2015-02-26T16:10:25Z","pushed_at":"2015-04-14T01:21:35Z","git_url":"git://github.com/wbinventor/openmc.git","ssh_url":"git@github.com:wbinventor/openmc.git","clone_url":"https://github.com/wbinventor/openmc.git","svn_url":"https://github.com/wbinventor/openmc","homepage":"http://mit-crpg.github.io/openmc/","size":23286,"stargazers_count":1,"watchers_count":1,"language":"FORTRAN","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"mit-crpg:develop","ref":"develop","sha":"b37914e601912136bd0ffe0b6d836fbd4b198556","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}","created_at":"2011-07-21T00:33:27Z","updated_at":"2015-04-09T19:58:43Z","pushed_at":"2015-04-14T01:21: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":32116,"stargazers_count":54,"watchers_count":54,"language":"FORTRAN","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":73,"mirror_url":null,"open_issues_count":40,"forks":73,"open_issues":40,"watchers":54,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/331"},"html":{"href":"https://github.com/mit-crpg/openmc/pull/331"},"issue":{"href":"https://api.github.com/repos/mit-crpg/openmc/issues/331"},"comments":{"href":"https://api.github.com/repos/mit-crpg/openmc/issues/331/comments"},"review_comments":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/331/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/331/commits"},"statuses":{"href":"https://api.github.com/repos/mit-crpg/openmc/statuses/e1846b0a5e60d22d1f7f5b6372870106a720df72"}}}}