{"action":"created","comment":{"url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/comments/188153069","pull_request_review_id":120072783,"id":188153069,"diff_hunk":"@@ -44,9 +54,14 @@ def new_version(new_version_string=''):\n         raise ValueError(\n             'There must be at least one new change in CHANGELIST.md')\n \n-    with open(VERSION_FILE, 'w') as fp:\n-        fp.write(new_version_string)\n-        fp.write('\\n')\n+    with open(INIT_FILE, 'r+', encoding='utf8') as fp:\n+        init = fp.read()\n+        sub = re.subn(r\"__version__\\s*=\\s*\\\\*[\\'\\\"]([^\\'\\\"]*)\\\\*[\\'\\\"]\",","path":"scripts/new_version","position":43,"original_position":43,"commit_id":"72da7b64df9bf21f27eef6a2dfdcf2ceb591dd0f","original_commit_id":"72da7b64df9bf21f27eef6a2dfdcf2ceb591dd0f","user":{"login":"MyNameIsCosmo","id":1977607,"avatar_url":"https://avatars3.githubusercontent.com/u/1977607?v=4","gravatar_id":"","url":"https://api.github.com/users/MyNameIsCosmo","html_url":"https://github.com/MyNameIsCosmo","followers_url":"https://api.github.com/users/MyNameIsCosmo/followers","following_url":"https://api.github.com/users/MyNameIsCosmo/following{/other_user}","gists_url":"https://api.github.com/users/MyNameIsCosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/MyNameIsCosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MyNameIsCosmo/subscriptions","organizations_url":"https://api.github.com/users/MyNameIsCosmo/orgs","repos_url":"https://api.github.com/users/MyNameIsCosmo/repos","events_url":"https://api.github.com/users/MyNameIsCosmo/events{/privacy}","received_events_url":"https://api.github.com/users/MyNameIsCosmo/received_events","type":"User","site_admin":false},"body":"Agree'd.\r\nThis regex looks for a line including `__version__`, has lazy space matching `\\s*`, takes care of back slashes in the `init` stream, and matches any character within the single quotation marks (for versioning)\r\n\r\nI've used this in the past before with no repercussion, but as always, YMMV.","created_at":"2018-05-15T02:55:26Z","updated_at":"2018-05-15T02:55:26Z","html_url":"https://github.com/ManiacalLabs/BiblioPixel/pull/799#discussion_r188153069","pull_request_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/799","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/comments/188153069"},"html":{"href":"https://github.com/ManiacalLabs/BiblioPixel/pull/799#discussion_r188153069"},"pull_request":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/799"}},"in_reply_to_id":187891435},"pull_request":{"url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/799","id":187679835,"html_url":"https://github.com/ManiacalLabs/BiblioPixel/pull/799","diff_url":"https://github.com/ManiacalLabs/BiblioPixel/pull/799.diff","patch_url":"https://github.com/ManiacalLabs/BiblioPixel/pull/799.patch","issue_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/799","number":799,"state":"open","locked":false,"title":"Improve entrypoint and package setup","user":{"login":"MyNameIsCosmo","id":1977607,"avatar_url":"https://avatars3.githubusercontent.com/u/1977607?v=4","gravatar_id":"","url":"https://api.github.com/users/MyNameIsCosmo","html_url":"https://github.com/MyNameIsCosmo","followers_url":"https://api.github.com/users/MyNameIsCosmo/followers","following_url":"https://api.github.com/users/MyNameIsCosmo/following{/other_user}","gists_url":"https://api.github.com/users/MyNameIsCosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/MyNameIsCosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MyNameIsCosmo/subscriptions","organizations_url":"https://api.github.com/users/MyNameIsCosmo/orgs","repos_url":"https://api.github.com/users/MyNameIsCosmo/repos","events_url":"https://api.github.com/users/MyNameIsCosmo/events{/privacy}","received_events_url":"https://api.github.com/users/MyNameIsCosmo/received_events","type":"User","site_admin":false},"body":"**This pull request is currently for discussion purposes**\r\n\r\nThis is the start of rewriting the scripts/bp cli interface and having it packaged into the bibliopixel package.\r\nIt is meant to clean up entry points to make packaging easier, as well as new future development, testing, and continuous integration easier.\r\n\r\nThere are comments inside each commit with more details if you're interested.\r\n\r\nFuture discussion/improvement:\r\n- Changelog generation should be done using [keep-a-changelog](https://keepachangelog.com/en/1.0.0/)\r\n- A Git branching model should be adopted such as [GitHub-Flow](https://help.github.com/articles/github-flow/) to help track development efforts and push to master regularly\r\n- The current code is already formatted for Pep8. It would be good to have developers read a Python style guide revolving around Pep8, such as the [Google Python Styleguide](https://google.github.io/styleguide/pyguide.html).\r\n\r\nFurther reading for changes in this pull request:\r\n- [Module metadata variables](http://epydoc.sourceforge.net/manual-fields.html#module-metadata-variables)\r\n- [Setup.py metadata](https://www.python.org/dev/peps/pep-0345/#platform-multiple-use)\r\n- [Module level dunder names](https://www.python.org/dev/peps/pep-0008/#module-level-dunder-names)\r\n- [Importing * from a package](https://docs.python.org/3.5/tutorial/modules.html#importing-from-a-package)\r\n- [\\_\\_main\\_\\_ Entrypoint](https://docs.python.org/3/library/__main__.html)\r\n","created_at":"2018-05-13T16:55:29Z","updated_at":"2018-05-15T02:55:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"737198d2fa49c6bb2eb7a9796bda728aa114fadc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/799/commits","review_comments_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/799/comments","review_comment_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/799/comments","statuses_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/statuses/72da7b64df9bf21f27eef6a2dfdcf2ceb591dd0f","head":{"label":"MyNameIsCosmo:mynameiscosmo_cli-changes","ref":"mynameiscosmo_cli-changes","sha":"72da7b64df9bf21f27eef6a2dfdcf2ceb591dd0f","user":{"login":"MyNameIsCosmo","id":1977607,"avatar_url":"https://avatars3.githubusercontent.com/u/1977607?v=4","gravatar_id":"","url":"https://api.github.com/users/MyNameIsCosmo","html_url":"https://github.com/MyNameIsCosmo","followers_url":"https://api.github.com/users/MyNameIsCosmo/followers","following_url":"https://api.github.com/users/MyNameIsCosmo/following{/other_user}","gists_url":"https://api.github.com/users/MyNameIsCosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/MyNameIsCosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MyNameIsCosmo/subscriptions","organizations_url":"https://api.github.com/users/MyNameIsCosmo/orgs","repos_url":"https://api.github.com/users/MyNameIsCosmo/repos","events_url":"https://api.github.com/users/MyNameIsCosmo/events{/privacy}","received_events_url":"https://api.github.com/users/MyNameIsCosmo/received_events","type":"User","site_admin":false},"repo":{"id":131655740,"name":"BiblioPixel","full_name":"MyNameIsCosmo/BiblioPixel","owner":{"login":"MyNameIsCosmo","id":1977607,"avatar_url":"https://avatars3.githubusercontent.com/u/1977607?v=4","gravatar_id":"","url":"https://api.github.com/users/MyNameIsCosmo","html_url":"https://github.com/MyNameIsCosmo","followers_url":"https://api.github.com/users/MyNameIsCosmo/followers","following_url":"https://api.github.com/users/MyNameIsCosmo/following{/other_user}","gists_url":"https://api.github.com/users/MyNameIsCosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/MyNameIsCosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MyNameIsCosmo/subscriptions","organizations_url":"https://api.github.com/users/MyNameIsCosmo/orgs","repos_url":"https://api.github.com/users/MyNameIsCosmo/repos","events_url":"https://api.github.com/users/MyNameIsCosmo/events{/privacy}","received_events_url":"https://api.github.com/users/MyNameIsCosmo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MyNameIsCosmo/BiblioPixel","description":"A pure Python 3 library for programming light animations: Please direct questions and support requests to the Google Group: https://groups.google.com/d/forum/maniacal-labs-users - The Issues list here should be reserved for actual bugs.","fork":true,"url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel","forks_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/forks","keys_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/teams","hooks_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/hooks","issue_events_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/issues/events{/number}","events_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/events","assignees_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/assignees{/user}","branches_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/branches{/branch}","tags_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/tags","blobs_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/git/refs{/sha}","trees_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/statuses/{sha}","languages_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/languages","stargazers_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/stargazers","contributors_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/contributors","subscribers_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/subscribers","subscription_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/subscription","commits_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/commits{/sha}","git_commits_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/git/commits{/sha}","comments_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/comments{/number}","issue_comment_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/issues/comments{/number}","contents_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/contents/{+path}","compare_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/merges","archive_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/downloads","issues_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/issues{/number}","pulls_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/pulls{/number}","milestones_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/milestones{/number}","notifications_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/labels{/name}","releases_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/releases{/id}","deployments_url":"https://api.github.com/repos/MyNameIsCosmo/BiblioPixel/deployments","created_at":"2018-04-30T23:13:15Z","updated_at":"2018-05-06T16:54:51Z","pushed_at":"2018-05-13T16:37:01Z","git_url":"git://github.com/MyNameIsCosmo/BiblioPixel.git","ssh_url":"git@github.com:MyNameIsCosmo/BiblioPixel.git","clone_url":"https://github.com/MyNameIsCosmo/BiblioPixel.git","svn_url":"https://github.com/MyNameIsCosmo/BiblioPixel","homepage":"http://maniacallabs.com","size":6002,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ManiacalLabs:master","ref":"master","sha":"58be520a20dc34fb31fb63752e9d67cc83df07a7","user":{"login":"ManiacalLabs","id":3926687,"avatar_url":"https://avatars2.githubusercontent.com/u/3926687?v=4","gravatar_id":"","url":"https://api.github.com/users/ManiacalLabs","html_url":"https://github.com/ManiacalLabs","followers_url":"https://api.github.com/users/ManiacalLabs/followers","following_url":"https://api.github.com/users/ManiacalLabs/following{/other_user}","gists_url":"https://api.github.com/users/ManiacalLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ManiacalLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManiacalLabs/subscriptions","organizations_url":"https://api.github.com/users/ManiacalLabs/orgs","repos_url":"https://api.github.com/users/ManiacalLabs/repos","events_url":"https://api.github.com/users/ManiacalLabs/events{/privacy}","received_events_url":"https://api.github.com/users/ManiacalLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":26373551,"name":"BiblioPixel","full_name":"ManiacalLabs/BiblioPixel","owner":{"login":"ManiacalLabs","id":3926687,"avatar_url":"https://avatars2.githubusercontent.com/u/3926687?v=4","gravatar_id":"","url":"https://api.github.com/users/ManiacalLabs","html_url":"https://github.com/ManiacalLabs","followers_url":"https://api.github.com/users/ManiacalLabs/followers","following_url":"https://api.github.com/users/ManiacalLabs/following{/other_user}","gists_url":"https://api.github.com/users/ManiacalLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ManiacalLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManiacalLabs/subscriptions","organizations_url":"https://api.github.com/users/ManiacalLabs/orgs","repos_url":"https://api.github.com/users/ManiacalLabs/repos","events_url":"https://api.github.com/users/ManiacalLabs/events{/privacy}","received_events_url":"https://api.github.com/users/ManiacalLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManiacalLabs/BiblioPixel","description":"A pure Python 3 library for programming light animations: Please direct questions and support requests to the Google Group: https://groups.google.com/d/forum/maniacal-labs-users - The Issues list here should be reserved for actual bugs.","fork":false,"url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel","forks_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/forks","keys_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/teams","hooks_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/hooks","issue_events_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/events{/number}","events_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/events","assignees_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/assignees{/user}","branches_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/branches{/branch}","tags_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/tags","blobs_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/statuses/{sha}","languages_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/languages","stargazers_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/stargazers","contributors_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/contributors","subscribers_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/subscribers","subscription_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/subscription","commits_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/contents/{+path}","compare_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/merges","archive_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/downloads","issues_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues{/number}","pulls_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls{/number}","milestones_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/milestones{/number}","notifications_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/labels{/name}","releases_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/releases{/id}","deployments_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/deployments","created_at":"2014-11-08T20:23:53Z","updated_at":"2018-05-11T22:14:43Z","pushed_at":"2018-05-14T11:23:59Z","git_url":"git://github.com/ManiacalLabs/BiblioPixel.git","ssh_url":"git@github.com:ManiacalLabs/BiblioPixel.git","clone_url":"https://github.com/ManiacalLabs/BiblioPixel.git","svn_url":"https://github.com/ManiacalLabs/BiblioPixel","homepage":"http://maniacallabs.com","size":6002,"stargazers_count":198,"watchers_count":198,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"archived":false,"open_issues_count":128,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":36,"open_issues":128,"watchers":198,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/799"},"html":{"href":"https://github.com/ManiacalLabs/BiblioPixel/pull/799"},"issue":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/799"},"comments":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/799/comments"},"review_comments":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/799/comments"},"review_comment":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/799/commits"},"statuses":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/statuses/72da7b64df9bf21f27eef6a2dfdcf2ceb591dd0f"}},"author_association":"NONE"}}
{"actor":{"display_login":"MyNameIsCosmo"}}