{"action":"closed","number":4,"pull_request":{"url":"https://api.github.com/repos/andrew-pyle/chronam/pulls/4","id":224072542,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0MDcyNTQy","html_url":"https://github.com/andrew-pyle/chronam/pull/4","diff_url":"https://github.com/andrew-pyle/chronam/pull/4.diff","patch_url":"https://github.com/andrew-pyle/chronam/pull/4.patch","issue_url":"https://api.github.com/repos/andrew-pyle/chronam/issues/4","number":4,"state":"closed","locked":false,"title":"Code Review Changes – Style, CLI, Refactoring, and Exception Handling","user":{"login":"andrew-pyle","id":25519964,"node_id":"MDQ6VXNlcjI1NTE5OTY0","avatar_url":"https://avatars3.githubusercontent.com/u/25519964?v=4","gravatar_id":"","url":"https://api.github.com/users/andrew-pyle","html_url":"https://github.com/andrew-pyle","followers_url":"https://api.github.com/users/andrew-pyle/followers","following_url":"https://api.github.com/users/andrew-pyle/following{/other_user}","gists_url":"https://api.github.com/users/andrew-pyle/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-pyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-pyle/subscriptions","organizations_url":"https://api.github.com/users/andrew-pyle/orgs","repos_url":"https://api.github.com/users/andrew-pyle/repos","events_url":"https://api.github.com/users/andrew-pyle/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-pyle/received_events","type":"User","site_admin":false},"body":"# Code Review PR\r\nThese changes & Todos are based on the [Code Review](https://codereview.stackexchange.com/questions/180427/download-and-concatenate-text-files-from-multiple-api-endpoints) by StackExchange User [alexce](https://codereview.stackexchange.com/users/24208/alecxe).\r\n\r\n## Changes\r\n- Python Style improved\r\n- CLI rewritten & easier to understand\r\n- CLI catches ValueError and IOError\r\n- Saving newspaper text to disk made much more robust\r\n    - Renames directory on name collision rather than overwrite\r\n    - Outputs directory location and number of files written to CLI\r\n\r\n## Todo\r\n- Use Requests module to improve JSON retrieval. Can also use a [single session instance](http://docs.python-requests.org/en/master/user/advanced/#session-objects).\r\n- Create Newspaper class\r\n- Maybe use ujson parser for performance increase\r\n- Docstrings, API Reference, [Pipenv](https://pipenv.readthedocs.io/en/latest/)\r\n- Inline TODOs in code","created_at":"2018-10-18T19:30:52Z","updated_at":"2018-10-18T19:31:13Z","closed_at":"2018-10-18T19:31:12Z","merged_at":"2018-10-18T19:31:12Z","merge_commit_sha":"8e49fd62b6809e6cc2349159d194c68de411b39c","assignee":{"login":"andrew-pyle","id":25519964,"node_id":"MDQ6VXNlcjI1NTE5OTY0","avatar_url":"https://avatars3.githubusercontent.com/u/25519964?v=4","gravatar_id":"","url":"https://api.github.com/users/andrew-pyle","html_url":"https://github.com/andrew-pyle","followers_url":"https://api.github.com/users/andrew-pyle/followers","following_url":"https://api.github.com/users/andrew-pyle/following{/other_user}","gists_url":"https://api.github.com/users/andrew-pyle/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-pyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-pyle/subscriptions","organizations_url":"https://api.github.com/users/andrew-pyle/orgs","repos_url":"https://api.github.com/users/andrew-pyle/repos","events_url":"https://api.github.com/users/andrew-pyle/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-pyle/received_events","type":"User","site_admin":false},"assignees":[{"login":"andrew-pyle","id":25519964,"node_id":"MDQ6VXNlcjI1NTE5OTY0","avatar_url":"https://avatars3.githubusercontent.com/u/25519964?v=4","gravatar_id":"","url":"https://api.github.com/users/andrew-pyle","html_url":"https://github.com/andrew-pyle","followers_url":"https://api.github.com/users/andrew-pyle/followers","following_url":"https://api.github.com/users/andrew-pyle/following{/other_user}","gists_url":"https://api.github.com/users/andrew-pyle/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-pyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-pyle/subscriptions","organizations_url":"https://api.github.com/users/andrew-pyle/orgs","repos_url":"https://api.github.com/users/andrew-pyle/repos","events_url":"https://api.github.com/users/andrew-pyle/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-pyle/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/andrew-pyle/chronam/pulls/4/commits","review_comments_url":"https://api.github.com/repos/andrew-pyle/chronam/pulls/4/comments","review_comment_url":"https://api.github.com/repos/andrew-pyle/chronam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andrew-pyle/chronam/issues/4/comments","statuses_url":"https://api.github.com/repos/andrew-pyle/chronam/statuses/7ebe3ceaa488bf387d9d8a6aad7f2b903c470e15","head":{"label":"andrew-pyle:andrew/codereview","ref":"andrew/codereview","sha":"7ebe3ceaa488bf387d9d8a6aad7f2b903c470e15","user":{"login":"andrew-pyle","id":25519964,"node_id":"MDQ6VXNlcjI1NTE5OTY0","avatar_url":"https://avatars3.githubusercontent.com/u/25519964?v=4","gravatar_id":"","url":"https://api.github.com/users/andrew-pyle","html_url":"https://github.com/andrew-pyle","followers_url":"https://api.github.com/users/andrew-pyle/followers","following_url":"https://api.github.com/users/andrew-pyle/following{/other_user}","gists_url":"https://api.github.com/users/andrew-pyle/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-pyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-pyle/subscriptions","organizations_url":"https://api.github.com/users/andrew-pyle/orgs","repos_url":"https://api.github.com/users/andrew-pyle/repos","events_url":"https://api.github.com/users/andrew-pyle/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-pyle/received_events","type":"User","site_admin":false},"repo":{"id":108348252,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgzNDgyNTI=","name":"chronam","full_name":"andrew-pyle/chronam","private":false,"owner":{"login":"andrew-pyle","id":25519964,"node_id":"MDQ6VXNlcjI1NTE5OTY0","avatar_url":"https://avatars3.githubusercontent.com/u/25519964?v=4","gravatar_id":"","url":"https://api.github.com/users/andrew-pyle","html_url":"https://github.com/andrew-pyle","followers_url":"https://api.github.com/users/andrew-pyle/followers","following_url":"https://api.github.com/users/andrew-pyle/following{/other_user}","gists_url":"https://api.github.com/users/andrew-pyle/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-pyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-pyle/subscriptions","organizations_url":"https://api.github.com/users/andrew-pyle/orgs","repos_url":"https://api.github.com/users/andrew-pyle/repos","events_url":"https://api.github.com/users/andrew-pyle/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-pyle/received_events","type":"User","site_admin":false},"html_url":"https://github.com/andrew-pyle/chronam","description":"Python module for downloading OCR text from http://chroniclingamerica.loc.gov/","fork":false,"url":"https://api.github.com/repos/andrew-pyle/chronam","forks_url":"https://api.github.com/repos/andrew-pyle/chronam/forks","keys_url":"https://api.github.com/repos/andrew-pyle/chronam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrew-pyle/chronam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrew-pyle/chronam/teams","hooks_url":"https://api.github.com/repos/andrew-pyle/chronam/hooks","issue_events_url":"https://api.github.com/repos/andrew-pyle/chronam/issues/events{/number}","events_url":"https://api.github.com/repos/andrew-pyle/chronam/events","assignees_url":"https://api.github.com/repos/andrew-pyle/chronam/assignees{/user}","branches_url":"https://api.github.com/repos/andrew-pyle/chronam/branches{/branch}","tags_url":"https://api.github.com/repos/andrew-pyle/chronam/tags","blobs_url":"https://api.github.com/repos/andrew-pyle/chronam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrew-pyle/chronam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrew-pyle/chronam/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrew-pyle/chronam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrew-pyle/chronam/statuses/{sha}","languages_url":"https://api.github.com/repos/andrew-pyle/chronam/languages","stargazers_url":"https://api.github.com/repos/andrew-pyle/chronam/stargazers","contributors_url":"https://api.github.com/repos/andrew-pyle/chronam/contributors","subscribers_url":"https://api.github.com/repos/andrew-pyle/chronam/subscribers","subscription_url":"https://api.github.com/repos/andrew-pyle/chronam/subscription","commits_url":"https://api.github.com/repos/andrew-pyle/chronam/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrew-pyle/chronam/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrew-pyle/chronam/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrew-pyle/chronam/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrew-pyle/chronam/contents/{+path}","compare_url":"https://api.github.com/repos/andrew-pyle/chronam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrew-pyle/chronam/merges","archive_url":"https://api.github.com/repos/andrew-pyle/chronam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrew-pyle/chronam/downloads","issues_url":"https://api.github.com/repos/andrew-pyle/chronam/issues{/number}","pulls_url":"https://api.github.com/repos/andrew-pyle/chronam/pulls{/number}","milestones_url":"https://api.github.com/repos/andrew-pyle/chronam/milestones{/number}","notifications_url":"https://api.github.com/repos/andrew-pyle/chronam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrew-pyle/chronam/labels{/name}","releases_url":"https://api.github.com/repos/andrew-pyle/chronam/releases{/id}","deployments_url":"https://api.github.com/repos/andrew-pyle/chronam/deployments","created_at":"2017-10-26T01:55:11Z","updated_at":"2018-09-20T15:25:38Z","pushed_at":"2018-10-18T19:31:12Z","git_url":"git://github.com/andrew-pyle/chronam.git","ssh_url":"git@github.com:andrew-pyle/chronam.git","clone_url":"https://github.com/andrew-pyle/chronam.git","svn_url":"https://github.com/andrew-pyle/chronam","homepage":"","size":127,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"andrew-pyle:master","ref":"master","sha":"1dffd1d0a2d8d72c4a338c71dc9d584d7ceba9e4","user":{"login":"andrew-pyle","id":25519964,"node_id":"MDQ6VXNlcjI1NTE5OTY0","avatar_url":"https://avatars3.githubusercontent.com/u/25519964?v=4","gravatar_id":"","url":"https://api.github.com/users/andrew-pyle","html_url":"https://github.com/andrew-pyle","followers_url":"https://api.github.com/users/andrew-pyle/followers","following_url":"https://api.github.com/users/andrew-pyle/following{/other_user}","gists_url":"https://api.github.com/users/andrew-pyle/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-pyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-pyle/subscriptions","organizations_url":"https://api.github.com/users/andrew-pyle/orgs","repos_url":"https://api.github.com/users/andrew-pyle/repos","events_url":"https://api.github.com/users/andrew-pyle/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-pyle/received_events","type":"User","site_admin":false},"repo":{"id":108348252,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgzNDgyNTI=","name":"chronam","full_name":"andrew-pyle/chronam","private":false,"owner":{"login":"andrew-pyle","id":25519964,"node_id":"MDQ6VXNlcjI1NTE5OTY0","avatar_url":"https://avatars3.githubusercontent.com/u/25519964?v=4","gravatar_id":"","url":"https://api.github.com/users/andrew-pyle","html_url":"https://github.com/andrew-pyle","followers_url":"https://api.github.com/users/andrew-pyle/followers","following_url":"https://api.github.com/users/andrew-pyle/following{/other_user}","gists_url":"https://api.github.com/users/andrew-pyle/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-pyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-pyle/subscriptions","organizations_url":"https://api.github.com/users/andrew-pyle/orgs","repos_url":"https://api.github.com/users/andrew-pyle/repos","events_url":"https://api.github.com/users/andrew-pyle/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-pyle/received_events","type":"User","site_admin":false},"html_url":"https://github.com/andrew-pyle/chronam","description":"Python module for downloading OCR text from http://chroniclingamerica.loc.gov/","fork":false,"url":"https://api.github.com/repos/andrew-pyle/chronam","forks_url":"https://api.github.com/repos/andrew-pyle/chronam/forks","keys_url":"https://api.github.com/repos/andrew-pyle/chronam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrew-pyle/chronam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrew-pyle/chronam/teams","hooks_url":"https://api.github.com/repos/andrew-pyle/chronam/hooks","issue_events_url":"https://api.github.com/repos/andrew-pyle/chronam/issues/events{/number}","events_url":"https://api.github.com/repos/andrew-pyle/chronam/events","assignees_url":"https://api.github.com/repos/andrew-pyle/chronam/assignees{/user}","branches_url":"https://api.github.com/repos/andrew-pyle/chronam/branches{/branch}","tags_url":"https://api.github.com/repos/andrew-pyle/chronam/tags","blobs_url":"https://api.github.com/repos/andrew-pyle/chronam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrew-pyle/chronam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrew-pyle/chronam/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrew-pyle/chronam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrew-pyle/chronam/statuses/{sha}","languages_url":"https://api.github.com/repos/andrew-pyle/chronam/languages","stargazers_url":"https://api.github.com/repos/andrew-pyle/chronam/stargazers","contributors_url":"https://api.github.com/repos/andrew-pyle/chronam/contributors","subscribers_url":"https://api.github.com/repos/andrew-pyle/chronam/subscribers","subscription_url":"https://api.github.com/repos/andrew-pyle/chronam/subscription","commits_url":"https://api.github.com/repos/andrew-pyle/chronam/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrew-pyle/chronam/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrew-pyle/chronam/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrew-pyle/chronam/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrew-pyle/chronam/contents/{+path}","compare_url":"https://api.github.com/repos/andrew-pyle/chronam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrew-pyle/chronam/merges","archive_url":"https://api.github.com/repos/andrew-pyle/chronam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrew-pyle/chronam/downloads","issues_url":"https://api.github.com/repos/andrew-pyle/chronam/issues{/number}","pulls_url":"https://api.github.com/repos/andrew-pyle/chronam/pulls{/number}","milestones_url":"https://api.github.com/repos/andrew-pyle/chronam/milestones{/number}","notifications_url":"https://api.github.com/repos/andrew-pyle/chronam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrew-pyle/chronam/labels{/name}","releases_url":"https://api.github.com/repos/andrew-pyle/chronam/releases{/id}","deployments_url":"https://api.github.com/repos/andrew-pyle/chronam/deployments","created_at":"2017-10-26T01:55:11Z","updated_at":"2018-09-20T15:25:38Z","pushed_at":"2018-10-18T19:31:12Z","git_url":"git://github.com/andrew-pyle/chronam.git","ssh_url":"git@github.com:andrew-pyle/chronam.git","clone_url":"https://github.com/andrew-pyle/chronam.git","svn_url":"https://github.com/andrew-pyle/chronam","homepage":"","size":127,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andrew-pyle/chronam/pulls/4"},"html":{"href":"https://github.com/andrew-pyle/chronam/pull/4"},"issue":{"href":"https://api.github.com/repos/andrew-pyle/chronam/issues/4"},"comments":{"href":"https://api.github.com/repos/andrew-pyle/chronam/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/andrew-pyle/chronam/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/andrew-pyle/chronam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andrew-pyle/chronam/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/andrew-pyle/chronam/statuses/7ebe3ceaa488bf387d9d8a6aad7f2b903c470e15"}},"author_association":"OWNER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"andrew-pyle","id":25519964,"node_id":"MDQ6VXNlcjI1NTE5OTY0","avatar_url":"https://avatars3.githubusercontent.com/u/25519964?v=4","gravatar_id":"","url":"https://api.github.com/users/andrew-pyle","html_url":"https://github.com/andrew-pyle","followers_url":"https://api.github.com/users/andrew-pyle/followers","following_url":"https://api.github.com/users/andrew-pyle/following{/other_user}","gists_url":"https://api.github.com/users/andrew-pyle/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-pyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-pyle/subscriptions","organizations_url":"https://api.github.com/users/andrew-pyle/orgs","repos_url":"https://api.github.com/users/andrew-pyle/repos","events_url":"https://api.github.com/users/andrew-pyle/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-pyle/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":13,"additions":150,"deletions":84,"changed_files":2}}
{"actor":{"display_login":"andrew-pyle"}}