{"action":"created","comment":{"url":"https://api.github.com/repos/openmc-dev/openmc/pulls/comments/208558691","pull_request_review_id":144390379,"id":208558691,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODU1ODY5MQ==","diff_hunk":"@@ -269,19 +269,21 @@ def source_bank():\n     return as_array(ptr, (n.value,)).view(bank_dtype)\n \n \n-def statepoint_write(filename=None):\n+def statepoint_write(filename=None, write_source=False):","path":"openmc/capi/core.py","position":14,"original_position":14,"commit_id":"b5dca6baff9c1433c0f71963250406e4e376c996","original_commit_id":"b5dca6baff9c1433c0f71963250406e4e376c996","user":{"login":"paulromano","id":743095,"node_id":"MDQ6VXNlcjc0MzA5NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/743095?v=4","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},"body":"Is there a reason that we shouldn't just default to writing the source? (since that's the default with normally-generated statepoints?)","created_at":"2018-08-08T12:20:35Z","updated_at":"2018-08-08T12:33:25Z","html_url":"https://github.com/openmc-dev/openmc/pull/1039#discussion_r208558691","pull_request_url":"https://api.github.com/repos/openmc-dev/openmc/pulls/1039","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/openmc-dev/openmc/pulls/comments/208558691"},"html":{"href":"https://github.com/openmc-dev/openmc/pull/1039#discussion_r208558691"},"pull_request":{"href":"https://api.github.com/repos/openmc-dev/openmc/pulls/1039"}}},"pull_request":{"url":"https://api.github.com/repos/openmc-dev/openmc/pulls/1039","id":206828378,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2ODI4Mzc4","html_url":"https://github.com/openmc-dev/openmc/pull/1039","diff_url":"https://github.com/openmc-dev/openmc/pull/1039.diff","patch_url":"https://github.com/openmc-dev/openmc/pull/1039.patch","issue_url":"https://api.github.com/repos/openmc-dev/openmc/issues/1039","number":1039,"state":"open","locked":false,"title":"Write statepoints with source banks from openmc.capi","user":{"login":"smharper","id":4622797,"node_id":"MDQ6VXNlcjQ2MjI3OTc=","avatar_url":"https://avatars3.githubusercontent.com/u/4622797?v=4","gravatar_id":"","url":"https://api.github.com/users/smharper","html_url":"https://github.com/smharper","followers_url":"https://api.github.com/users/smharper/followers","following_url":"https://api.github.com/users/smharper/following{/other_user}","gists_url":"https://api.github.com/users/smharper/gists{/gist_id}","starred_url":"https://api.github.com/users/smharper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smharper/subscriptions","organizations_url":"https://api.github.com/users/smharper/orgs","repos_url":"https://api.github.com/users/smharper/repos","events_url":"https://api.github.com/users/smharper/events{/privacy}","received_events_url":"https://api.github.com/users/smharper/received_events","type":"User","site_admin":false},"body":"Currently calls to `openmc.capi.statepoint_write` will create a statepoint without a source bank.  This PR adds an optional flag that will include the source bank.  I've also added a unit test that verifies restart capability from the capi using `openmc.capi.statepoint_write`.\r\n\r\nI made some changes to the statepoint/sourcepoint logic in this PR.  I think it's more clear because now a call to `write_source_point` is guaranteed to write a sourcepoint (regardless of global variables), and it will never modify a statepoint file.","created_at":"2018-08-07T21:12:33Z","updated_at":"2018-08-08T12:33:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32d58d11fd15359b0d50a4d2fec4c105218740b9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/openmc-dev/openmc/pulls/1039/commits","review_comments_url":"https://api.github.com/repos/openmc-dev/openmc/pulls/1039/comments","review_comment_url":"https://api.github.com/repos/openmc-dev/openmc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmc-dev/openmc/issues/1039/comments","statuses_url":"https://api.github.com/repos/openmc-dev/openmc/statuses/b5dca6baff9c1433c0f71963250406e4e376c996","head":{"label":"smharper:capi_sourcepoint","ref":"capi_sourcepoint","sha":"b5dca6baff9c1433c0f71963250406e4e376c996","user":{"login":"smharper","id":4622797,"node_id":"MDQ6VXNlcjQ2MjI3OTc=","avatar_url":"https://avatars3.githubusercontent.com/u/4622797?v=4","gravatar_id":"","url":"https://api.github.com/users/smharper","html_url":"https://github.com/smharper","followers_url":"https://api.github.com/users/smharper/followers","following_url":"https://api.github.com/users/smharper/following{/other_user}","gists_url":"https://api.github.com/users/smharper/gists{/gist_id}","starred_url":"https://api.github.com/users/smharper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smharper/subscriptions","organizations_url":"https://api.github.com/users/smharper/orgs","repos_url":"https://api.github.com/users/smharper/repos","events_url":"https://api.github.com/users/smharper/events{/privacy}","received_events_url":"https://api.github.com/users/smharper/received_events","type":"User","site_admin":false},"repo":{"id":10507820,"node_id":"MDEwOlJlcG9zaXRvcnkxMDUwNzgyMA==","name":"openmc","full_name":"smharper/openmc","owner":{"login":"smharper","id":4622797,"node_id":"MDQ6VXNlcjQ2MjI3OTc=","avatar_url":"https://avatars3.githubusercontent.com/u/4622797?v=4","gravatar_id":"","url":"https://api.github.com/users/smharper","html_url":"https://github.com/smharper","followers_url":"https://api.github.com/users/smharper/followers","following_url":"https://api.github.com/users/smharper/following{/other_user}","gists_url":"https://api.github.com/users/smharper/gists{/gist_id}","starred_url":"https://api.github.com/users/smharper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smharper/subscriptions","organizations_url":"https://api.github.com/users/smharper/orgs","repos_url":"https://api.github.com/users/smharper/repos","events_url":"https://api.github.com/users/smharper/events{/privacy}","received_events_url":"https://api.github.com/users/smharper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/smharper/openmc","description":"OpenMC Monte Carlo Code","fork":true,"url":"https://api.github.com/repos/smharper/openmc","forks_url":"https://api.github.com/repos/smharper/openmc/forks","keys_url":"https://api.github.com/repos/smharper/openmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smharper/openmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smharper/openmc/teams","hooks_url":"https://api.github.com/repos/smharper/openmc/hooks","issue_events_url":"https://api.github.com/repos/smharper/openmc/issues/events{/number}","events_url":"https://api.github.com/repos/smharper/openmc/events","assignees_url":"https://api.github.com/repos/smharper/openmc/assignees{/user}","branches_url":"https://api.github.com/repos/smharper/openmc/branches{/branch}","tags_url":"https://api.github.com/repos/smharper/openmc/tags","blobs_url":"https://api.github.com/repos/smharper/openmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smharper/openmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smharper/openmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/smharper/openmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smharper/openmc/statuses/{sha}","languages_url":"https://api.github.com/repos/smharper/openmc/languages","stargazers_url":"https://api.github.com/repos/smharper/openmc/stargazers","contributors_url":"https://api.github.com/repos/smharper/openmc/contributors","subscribers_url":"https://api.github.com/repos/smharper/openmc/subscribers","subscription_url":"https://api.github.com/repos/smharper/openmc/subscription","commits_url":"https://api.github.com/repos/smharper/openmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/smharper/openmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/smharper/openmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/smharper/openmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/smharper/openmc/contents/{+path}","compare_url":"https://api.github.com/repos/smharper/openmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smharper/openmc/merges","archive_url":"https://api.github.com/repos/smharper/openmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smharper/openmc/downloads","issues_url":"https://api.github.com/repos/smharper/openmc/issues{/number}","pulls_url":"https://api.github.com/repos/smharper/openmc/pulls{/number}","milestones_url":"https://api.github.com/repos/smharper/openmc/milestones{/number}","notifications_url":"https://api.github.com/repos/smharper/openmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smharper/openmc/labels{/name}","releases_url":"https://api.github.com/repos/smharper/openmc/releases{/id}","deployments_url":"https://api.github.com/repos/smharper/openmc/deployments","created_at":"2013-06-05T16:55:01Z","updated_at":"2018-08-06T19:48:52Z","pushed_at":"2018-08-07T22:49:35Z","git_url":"git://github.com/smharper/openmc.git","ssh_url":"git@github.com:smharper/openmc.git","clone_url":"https://github.com/smharper/openmc.git","svn_url":"https://github.com/smharper/openmc","homepage":"http://mit-crpg.github.io/openmc/","size":40189,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"openmc-dev:develop","ref":"develop","sha":"dd23f8ae39acdacc67a4dba57bf52459ebbe5fcf","user":{"login":"openmc-dev","id":42039615,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMDM5NjE1","avatar_url":"https://avatars3.githubusercontent.com/u/42039615?v=4","gravatar_id":"","url":"https://api.github.com/users/openmc-dev","html_url":"https://github.com/openmc-dev","followers_url":"https://api.github.com/users/openmc-dev/followers","following_url":"https://api.github.com/users/openmc-dev/following{/other_user}","gists_url":"https://api.github.com/users/openmc-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/openmc-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmc-dev/subscriptions","organizations_url":"https://api.github.com/users/openmc-dev/orgs","repos_url":"https://api.github.com/users/openmc-dev/repos","events_url":"https://api.github.com/users/openmc-dev/events{/privacy}","received_events_url":"https://api.github.com/users/openmc-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":2081118,"node_id":"MDEwOlJlcG9zaXRvcnkyMDgxMTE4","name":"openmc","full_name":"openmc-dev/openmc","owner":{"login":"openmc-dev","id":42039615,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMDM5NjE1","avatar_url":"https://avatars3.githubusercontent.com/u/42039615?v=4","gravatar_id":"","url":"https://api.github.com/users/openmc-dev","html_url":"https://github.com/openmc-dev","followers_url":"https://api.github.com/users/openmc-dev/followers","following_url":"https://api.github.com/users/openmc-dev/following{/other_user}","gists_url":"https://api.github.com/users/openmc-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/openmc-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmc-dev/subscriptions","organizations_url":"https://api.github.com/users/openmc-dev/orgs","repos_url":"https://api.github.com/users/openmc-dev/repos","events_url":"https://api.github.com/users/openmc-dev/events{/privacy}","received_events_url":"https://api.github.com/users/openmc-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmc-dev/openmc","description":"OpenMC Monte Carlo Code","fork":false,"url":"https://api.github.com/repos/openmc-dev/openmc","forks_url":"https://api.github.com/repos/openmc-dev/openmc/forks","keys_url":"https://api.github.com/repos/openmc-dev/openmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmc-dev/openmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmc-dev/openmc/teams","hooks_url":"https://api.github.com/repos/openmc-dev/openmc/hooks","issue_events_url":"https://api.github.com/repos/openmc-dev/openmc/issues/events{/number}","events_url":"https://api.github.com/repos/openmc-dev/openmc/events","assignees_url":"https://api.github.com/repos/openmc-dev/openmc/assignees{/user}","branches_url":"https://api.github.com/repos/openmc-dev/openmc/branches{/branch}","tags_url":"https://api.github.com/repos/openmc-dev/openmc/tags","blobs_url":"https://api.github.com/repos/openmc-dev/openmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmc-dev/openmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmc-dev/openmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmc-dev/openmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmc-dev/openmc/statuses/{sha}","languages_url":"https://api.github.com/repos/openmc-dev/openmc/languages","stargazers_url":"https://api.github.com/repos/openmc-dev/openmc/stargazers","contributors_url":"https://api.github.com/repos/openmc-dev/openmc/contributors","subscribers_url":"https://api.github.com/repos/openmc-dev/openmc/subscribers","subscription_url":"https://api.github.com/repos/openmc-dev/openmc/subscription","commits_url":"https://api.github.com/repos/openmc-dev/openmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmc-dev/openmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmc-dev/openmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmc-dev/openmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmc-dev/openmc/contents/{+path}","compare_url":"https://api.github.com/repos/openmc-dev/openmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmc-dev/openmc/merges","archive_url":"https://api.github.com/repos/openmc-dev/openmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmc-dev/openmc/downloads","issues_url":"https://api.github.com/repos/openmc-dev/openmc/issues{/number}","pulls_url":"https://api.github.com/repos/openmc-dev/openmc/pulls{/number}","milestones_url":"https://api.github.com/repos/openmc-dev/openmc/milestones{/number}","notifications_url":"https://api.github.com/repos/openmc-dev/openmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmc-dev/openmc/labels{/name}","releases_url":"https://api.github.com/repos/openmc-dev/openmc/releases{/id}","deployments_url":"https://api.github.com/repos/openmc-dev/openmc/deployments","created_at":"2011-07-21T00:33:27Z","updated_at":"2018-08-07T16:55:56Z","pushed_at":"2018-08-07T22:49:36Z","git_url":"git://github.com/openmc-dev/openmc.git","ssh_url":"git@github.com:openmc-dev/openmc.git","clone_url":"https://github.com/openmc-dev/openmc.git","svn_url":"https://github.com/openmc-dev/openmc","homepage":"http://openmc.readthedocs.io/","size":43762,"stargazers_count":150,"watchers_count":150,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":151,"mirror_url":null,"archived":false,"open_issues_count":72,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":151,"open_issues":72,"watchers":150,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/openmc-dev/openmc/pulls/1039"},"html":{"href":"https://github.com/openmc-dev/openmc/pull/1039"},"issue":{"href":"https://api.github.com/repos/openmc-dev/openmc/issues/1039"},"comments":{"href":"https://api.github.com/repos/openmc-dev/openmc/issues/1039/comments"},"review_comments":{"href":"https://api.github.com/repos/openmc-dev/openmc/pulls/1039/comments"},"review_comment":{"href":"https://api.github.com/repos/openmc-dev/openmc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmc-dev/openmc/pulls/1039/commits"},"statuses":{"href":"https://api.github.com/repos/openmc-dev/openmc/statuses/b5dca6baff9c1433c0f71963250406e4e376c996"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"paulromano"}}