{"action":"opened","number":105,"pull_request":{"url":"https://api.github.com/repos/esheldon/fitsio/pulls/105","id":94678544,"html_url":"https://github.com/esheldon/fitsio/pull/105","diff_url":"https://github.com/esheldon/fitsio/pull/105.diff","patch_url":"https://github.com/esheldon/fitsio/pull/105.patch","issue_url":"https://api.github.com/repos/esheldon/fitsio/issues/105","number":105,"state":"open","locked":false,"title":"read_raw","user":{"login":"dstndstn","id":1065981,"avatar_url":"https://avatars.githubusercontent.com/u/1065981?v=3","gravatar_id":"","url":"https://api.github.com/users/dstndstn","html_url":"https://github.com/dstndstn","followers_url":"https://api.github.com/users/dstndstn/followers","following_url":"https://api.github.com/users/dstndstn/following{/other_user}","gists_url":"https://api.github.com/users/dstndstn/gists{/gist_id}","starred_url":"https://api.github.com/users/dstndstn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstndstn/subscriptions","organizations_url":"https://api.github.com/users/dstndstn/orgs","repos_url":"https://api.github.com/users/dstndstn/repos","events_url":"https://api.github.com/users/dstndstn/events{/privacy}","received_events_url":"https://api.github.com/users/dstndstn/received_events","type":"User","site_admin":false},"body":"This PR adds a read_raw() method to the fitsio_pywrap.c FITS class.  It flushes data, copies the full file contents, and returns it as a Python string.\r\n\r\nThis should be particularly useful for \"mem://\" files.\r\n\r\nThis is motivated by a kind of weird use case where we want to catch filesystem corruption, so we do:\r\n\r\n```\r\nF = fitsio.FITS('mem://', 'rw')\r\nF.write( ... )\r\nrawdata = F.read_raw()\r\nsha = hashlib.sha1()\r\nsha.update(rawdata)\r\n# remember sha.hexdigest()\r\nf=open('F.fits', 'w')\r\nf.write(rawdata)\r\nf.close()\r\n# Run sha1sum F.fits, compare against sha.hexdigest().\r\n```\r\n","created_at":"2016-11-21T19:20:03Z","updated_at":"2016-11-21T19:20:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/esheldon/fitsio/pulls/105/commits","review_comments_url":"https://api.github.com/repos/esheldon/fitsio/pulls/105/comments","review_comment_url":"https://api.github.com/repos/esheldon/fitsio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/esheldon/fitsio/issues/105/comments","statuses_url":"https://api.github.com/repos/esheldon/fitsio/statuses/92c885e8018e686260eb9766d0a15dda2c27d155","head":{"label":"dstndstn:fetchmem","ref":"fetchmem","sha":"92c885e8018e686260eb9766d0a15dda2c27d155","user":{"login":"dstndstn","id":1065981,"avatar_url":"https://avatars.githubusercontent.com/u/1065981?v=3","gravatar_id":"","url":"https://api.github.com/users/dstndstn","html_url":"https://github.com/dstndstn","followers_url":"https://api.github.com/users/dstndstn/followers","following_url":"https://api.github.com/users/dstndstn/following{/other_user}","gists_url":"https://api.github.com/users/dstndstn/gists{/gist_id}","starred_url":"https://api.github.com/users/dstndstn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstndstn/subscriptions","organizations_url":"https://api.github.com/users/dstndstn/orgs","repos_url":"https://api.github.com/users/dstndstn/repos","events_url":"https://api.github.com/users/dstndstn/events{/privacy}","received_events_url":"https://api.github.com/users/dstndstn/received_events","type":"User","site_admin":false},"repo":{"id":13044614,"name":"fitsio","full_name":"dstndstn/fitsio","owner":{"login":"dstndstn","id":1065981,"avatar_url":"https://avatars.githubusercontent.com/u/1065981?v=3","gravatar_id":"","url":"https://api.github.com/users/dstndstn","html_url":"https://github.com/dstndstn","followers_url":"https://api.github.com/users/dstndstn/followers","following_url":"https://api.github.com/users/dstndstn/following{/other_user}","gists_url":"https://api.github.com/users/dstndstn/gists{/gist_id}","starred_url":"https://api.github.com/users/dstndstn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstndstn/subscriptions","organizations_url":"https://api.github.com/users/dstndstn/orgs","repos_url":"https://api.github.com/users/dstndstn/repos","events_url":"https://api.github.com/users/dstndstn/events{/privacy}","received_events_url":"https://api.github.com/users/dstndstn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dstndstn/fitsio","description":"A python package for FITS input/output wrapping cfitsio","fork":true,"url":"https://api.github.com/repos/dstndstn/fitsio","forks_url":"https://api.github.com/repos/dstndstn/fitsio/forks","keys_url":"https://api.github.com/repos/dstndstn/fitsio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dstndstn/fitsio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dstndstn/fitsio/teams","hooks_url":"https://api.github.com/repos/dstndstn/fitsio/hooks","issue_events_url":"https://api.github.com/repos/dstndstn/fitsio/issues/events{/number}","events_url":"https://api.github.com/repos/dstndstn/fitsio/events","assignees_url":"https://api.github.com/repos/dstndstn/fitsio/assignees{/user}","branches_url":"https://api.github.com/repos/dstndstn/fitsio/branches{/branch}","tags_url":"https://api.github.com/repos/dstndstn/fitsio/tags","blobs_url":"https://api.github.com/repos/dstndstn/fitsio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dstndstn/fitsio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dstndstn/fitsio/git/refs{/sha}","trees_url":"https://api.github.com/repos/dstndstn/fitsio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dstndstn/fitsio/statuses/{sha}","languages_url":"https://api.github.com/repos/dstndstn/fitsio/languages","stargazers_url":"https://api.github.com/repos/dstndstn/fitsio/stargazers","contributors_url":"https://api.github.com/repos/dstndstn/fitsio/contributors","subscribers_url":"https://api.github.com/repos/dstndstn/fitsio/subscribers","subscription_url":"https://api.github.com/repos/dstndstn/fitsio/subscription","commits_url":"https://api.github.com/repos/dstndstn/fitsio/commits{/sha}","git_commits_url":"https://api.github.com/repos/dstndstn/fitsio/git/commits{/sha}","comments_url":"https://api.github.com/repos/dstndstn/fitsio/comments{/number}","issue_comment_url":"https://api.github.com/repos/dstndstn/fitsio/issues/comments{/number}","contents_url":"https://api.github.com/repos/dstndstn/fitsio/contents/{+path}","compare_url":"https://api.github.com/repos/dstndstn/fitsio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dstndstn/fitsio/merges","archive_url":"https://api.github.com/repos/dstndstn/fitsio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dstndstn/fitsio/downloads","issues_url":"https://api.github.com/repos/dstndstn/fitsio/issues{/number}","pulls_url":"https://api.github.com/repos/dstndstn/fitsio/pulls{/number}","milestones_url":"https://api.github.com/repos/dstndstn/fitsio/milestones{/number}","notifications_url":"https://api.github.com/repos/dstndstn/fitsio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dstndstn/fitsio/labels{/name}","releases_url":"https://api.github.com/repos/dstndstn/fitsio/releases{/id}","deployments_url":"https://api.github.com/repos/dstndstn/fitsio/deployments","created_at":"2013-09-23T19:11:04Z","updated_at":"2014-07-03T21:28:34Z","pushed_at":"2016-11-21T18:49:34Z","git_url":"git://github.com/dstndstn/fitsio.git","ssh_url":"git@github.com:dstndstn/fitsio.git","clone_url":"https://github.com/dstndstn/fitsio.git","svn_url":"https://github.com/dstndstn/fitsio","homepage":"","size":9289,"stargazers_count":0,"watchers_count":0,"language":"C","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":"master"}},"base":{"label":"esheldon:master","ref":"master","sha":"d9472ce6348b227af56fbef9482c416ffcb7f3d8","user":{"login":"esheldon","id":621661,"avatar_url":"https://avatars.githubusercontent.com/u/621661?v=3","gravatar_id":"","url":"https://api.github.com/users/esheldon","html_url":"https://github.com/esheldon","followers_url":"https://api.github.com/users/esheldon/followers","following_url":"https://api.github.com/users/esheldon/following{/other_user}","gists_url":"https://api.github.com/users/esheldon/gists{/gist_id}","starred_url":"https://api.github.com/users/esheldon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esheldon/subscriptions","organizations_url":"https://api.github.com/users/esheldon/orgs","repos_url":"https://api.github.com/users/esheldon/repos","events_url":"https://api.github.com/users/esheldon/events{/privacy}","received_events_url":"https://api.github.com/users/esheldon/received_events","type":"User","site_admin":false},"repo":{"id":2369386,"name":"fitsio","full_name":"esheldon/fitsio","owner":{"login":"esheldon","id":621661,"avatar_url":"https://avatars.githubusercontent.com/u/621661?v=3","gravatar_id":"","url":"https://api.github.com/users/esheldon","html_url":"https://github.com/esheldon","followers_url":"https://api.github.com/users/esheldon/followers","following_url":"https://api.github.com/users/esheldon/following{/other_user}","gists_url":"https://api.github.com/users/esheldon/gists{/gist_id}","starred_url":"https://api.github.com/users/esheldon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esheldon/subscriptions","organizations_url":"https://api.github.com/users/esheldon/orgs","repos_url":"https://api.github.com/users/esheldon/repos","events_url":"https://api.github.com/users/esheldon/events{/privacy}","received_events_url":"https://api.github.com/users/esheldon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/esheldon/fitsio","description":"A python package for FITS input/output wrapping cfitsio","fork":false,"url":"https://api.github.com/repos/esheldon/fitsio","forks_url":"https://api.github.com/repos/esheldon/fitsio/forks","keys_url":"https://api.github.com/repos/esheldon/fitsio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esheldon/fitsio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esheldon/fitsio/teams","hooks_url":"https://api.github.com/repos/esheldon/fitsio/hooks","issue_events_url":"https://api.github.com/repos/esheldon/fitsio/issues/events{/number}","events_url":"https://api.github.com/repos/esheldon/fitsio/events","assignees_url":"https://api.github.com/repos/esheldon/fitsio/assignees{/user}","branches_url":"https://api.github.com/repos/esheldon/fitsio/branches{/branch}","tags_url":"https://api.github.com/repos/esheldon/fitsio/tags","blobs_url":"https://api.github.com/repos/esheldon/fitsio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esheldon/fitsio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esheldon/fitsio/git/refs{/sha}","trees_url":"https://api.github.com/repos/esheldon/fitsio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esheldon/fitsio/statuses/{sha}","languages_url":"https://api.github.com/repos/esheldon/fitsio/languages","stargazers_url":"https://api.github.com/repos/esheldon/fitsio/stargazers","contributors_url":"https://api.github.com/repos/esheldon/fitsio/contributors","subscribers_url":"https://api.github.com/repos/esheldon/fitsio/subscribers","subscription_url":"https://api.github.com/repos/esheldon/fitsio/subscription","commits_url":"https://api.github.com/repos/esheldon/fitsio/commits{/sha}","git_commits_url":"https://api.github.com/repos/esheldon/fitsio/git/commits{/sha}","comments_url":"https://api.github.com/repos/esheldon/fitsio/comments{/number}","issue_comment_url":"https://api.github.com/repos/esheldon/fitsio/issues/comments{/number}","contents_url":"https://api.github.com/repos/esheldon/fitsio/contents/{+path}","compare_url":"https://api.github.com/repos/esheldon/fitsio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esheldon/fitsio/merges","archive_url":"https://api.github.com/repos/esheldon/fitsio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esheldon/fitsio/downloads","issues_url":"https://api.github.com/repos/esheldon/fitsio/issues{/number}","pulls_url":"https://api.github.com/repos/esheldon/fitsio/pulls{/number}","milestones_url":"https://api.github.com/repos/esheldon/fitsio/milestones{/number}","notifications_url":"https://api.github.com/repos/esheldon/fitsio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esheldon/fitsio/labels{/name}","releases_url":"https://api.github.com/repos/esheldon/fitsio/releases{/id}","deployments_url":"https://api.github.com/repos/esheldon/fitsio/deployments","created_at":"2011-09-12T05:35:41Z","updated_at":"2016-10-03T13:02:23Z","pushed_at":"2016-11-01T21:23:39Z","git_url":"git://github.com/esheldon/fitsio.git","ssh_url":"git@github.com:esheldon/fitsio.git","clone_url":"https://github.com/esheldon/fitsio.git","svn_url":"https://github.com/esheldon/fitsio","homepage":"","size":9655,"stargazers_count":47,"watchers_count":47,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":18,"forks":24,"open_issues":18,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/esheldon/fitsio/pulls/105"},"html":{"href":"https://github.com/esheldon/fitsio/pull/105"},"issue":{"href":"https://api.github.com/repos/esheldon/fitsio/issues/105"},"comments":{"href":"https://api.github.com/repos/esheldon/fitsio/issues/105/comments"},"review_comments":{"href":"https://api.github.com/repos/esheldon/fitsio/pulls/105/comments"},"review_comment":{"href":"https://api.github.com/repos/esheldon/fitsio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/esheldon/fitsio/pulls/105/commits"},"statuses":{"href":"https://api.github.com/repos/esheldon/fitsio/statuses/92c885e8018e686260eb9766d0a15dda2c27d155"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":6,"additions":98,"deletions":2,"changed_files":3}}
{"actor":{"display_login":"dstndstn"}}