{"action":"created","comment":{"url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/comments/122931881","pull_request_review_id":45087354,"id":122931881,"diff_hunk":"@@ -0,0 +1,42 @@\n+from .. channel_order import ChannelOrder\n+from .. driver_base import DriverBase\n+from ... util.enum import resolve_enum\n+from . import interfaces\n+from enum import IntEnum\n+# SubDriver imports\n+from . APA102 import APA102\n+from . LPD8806 import LPD8806\n+from . WS281X import WS281XSPI\n+from . WS2801 import WS2801\n+\n+\n+class SPI_LEDTYPE(IntEnum):\n+    APA102 = 0\n+    DOTSTAR = 0\n+    WS2801 = 1\n+    WS281X = 2\n+    WS2812 = 2\n+    WS2812B = 2\n+    NEOPIXEL = 2\n+    LPD8806 = 3\n+\n+\n+SPI_DRIVERS = [\n+    APA102,\n+    WS2801,\n+    WS281XSPI,\n+    LPD8806\n+]\n+\n+\n+class SPI(DriverBase):","path":"bibliopixel/drivers/SPI/driver.py","position":32,"original_position":32,"commit_id":"713cf8ed56441788bef7b3f0a0dc407e6f405dec","original_commit_id":"9b0373ed6a5242c3a9d28d40364dba0d6c8731e4","user":{"login":"rec","id":253362,"avatar_url":"https://avatars1.githubusercontent.com/u/253362?v=3","gravatar_id":"","url":"https://api.github.com/users/rec","html_url":"https://github.com/rec","followers_url":"https://api.github.com/users/rec/followers","following_url":"https://api.github.com/users/rec/following{/other_user}","gists_url":"https://api.github.com/users/rec/gists{/gist_id}","starred_url":"https://api.github.com/users/rec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rec/subscriptions","organizations_url":"https://api.github.com/users/rec/orgs","repos_url":"https://api.github.com/users/rec/repos","events_url":"https://api.github.com/users/rec/events{/privacy}","received_events_url":"https://api.github.com/users/rec/received_events","type":"User","site_admin":false},"body":"How is \"using a metaclass\" simpler later!?  It ain't!\r\n\r\nBasically, there is _no_ difference between the code in the review and the simpler code except that in your case there's this dubious class `SPI` _that is never instantiated._\r\n\r\nReflection will work just the same in both cases.  Or, if you can give me a code sample where they are different...?","created_at":"2017-06-20T09:58:21Z","updated_at":"2017-06-20T09:58:21Z","html_url":"https://github.com/ManiacalLabs/BiblioPixel/pull/230#discussion_r122931881","pull_request_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/230","_links":{"self":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/comments/122931881"},"html":{"href":"https://github.com/ManiacalLabs/BiblioPixel/pull/230#discussion_r122931881"},"pull_request":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/230"}}},"pull_request":{"url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/230","id":126211477,"html_url":"https://github.com/ManiacalLabs/BiblioPixel/pull/230","diff_url":"https://github.com/ManiacalLabs/BiblioPixel/pull/230.diff","patch_url":"https://github.com/ManiacalLabs/BiblioPixel/pull/230.patch","issue_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/230","number":230,"state":"open","locked":false,"title":"Full rework of SPI drivers","user":{"login":"adammhaile","id":957162,"avatar_url":"https://avatars1.githubusercontent.com/u/957162?v=3","gravatar_id":"","url":"https://api.github.com/users/adammhaile","html_url":"https://github.com/adammhaile","followers_url":"https://api.github.com/users/adammhaile/followers","following_url":"https://api.github.com/users/adammhaile/following{/other_user}","gists_url":"https://api.github.com/users/adammhaile/gists{/gist_id}","starred_url":"https://api.github.com/users/adammhaile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adammhaile/subscriptions","organizations_url":"https://api.github.com/users/adammhaile/orgs","repos_url":"https://api.github.com/users/adammhaile/repos","events_url":"https://api.github.com/users/adammhaile/events{/privacy}","received_events_url":"https://api.github.com/users/adammhaile/received_events","type":"User","site_admin":false},"body":"- Consolidation of SPI drivers via single metaclass\r\n- LED Type and interface type determined by enum\r\n- Cleaner standard SPI param handling\r\n- unit tests updated\r\n- WS281X driver is still of dubious functionality\r\n- Fixed completely broken APA102 and WS2801 drivers\r\n\r\nYeah, yeah... I did it anyways. A tiny bit more complexity for a *much* simpler driver model for SPI LEDs that is designed to mirror how the AllPixel driver works.\r\nI fully expect comments, but I'm fully committed to keeping this as it's better than what we had.\r\nOne thing to note is that you can still actually use all the drivers completely stand-alone (without the SPI() metaclass). I have not done this yet, but I could very easily bring back the same driver paths by importing them into bibliopixel.drivers.__init__.py --- That way, ```from bibliopixel.drivers.APA102 import APA102``` would still work as it did before.\r\n\r\nI've still not gotten the WS281X driver from @TuxCoder to work. We may need to mark that as experimental as we are unsure of the reason why it doesn't work yet.","created_at":"2017-06-19T01:42:11Z","updated_at":"2017-06-20T09:58:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e0ae742801eac0b62344ab7ec475865381b888a","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/230/commits","review_comments_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/230/comments","review_comment_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/230/comments","statuses_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/statuses/713cf8ed56441788bef7b3f0a0dc407e6f405dec","head":{"label":"ManiacalLabs:SPI_rework","ref":"SPI_rework","sha":"713cf8ed56441788bef7b3f0a0dc407e6f405dec","user":{"login":"ManiacalLabs","id":3926687,"avatar_url":"https://avatars1.githubusercontent.com/u/3926687?v=3","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://avatars1.githubusercontent.com/u/3926687?v=3","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 2 library for programming light animations: Please direct questions and support requests to http://forum.maniacallabs.com - 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":"2017-06-13T22:23:33Z","pushed_at":"2017-06-19T17:31:18Z","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":672,"stargazers_count":158,"watchers_count":158,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":41,"forks":28,"open_issues":41,"watchers":158,"default_branch":"master"}},"base":{"label":"ManiacalLabs:dev","ref":"dev","sha":"5240f4349e6b6b017673b491f85da919c2550aad","user":{"login":"ManiacalLabs","id":3926687,"avatar_url":"https://avatars1.githubusercontent.com/u/3926687?v=3","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://avatars1.githubusercontent.com/u/3926687?v=3","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 2 library for programming light animations: Please direct questions and support requests to http://forum.maniacallabs.com - 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":"2017-06-13T22:23:33Z","pushed_at":"2017-06-19T17:31:18Z","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":672,"stargazers_count":158,"watchers_count":158,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":41,"forks":28,"open_issues":41,"watchers":158,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/230"},"html":{"href":"https://github.com/ManiacalLabs/BiblioPixel/pull/230"},"issue":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/230"},"comments":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/230/comments"},"review_comments":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/230/comments"},"review_comment":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/230/commits"},"statuses":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/statuses/713cf8ed56441788bef7b3f0a0dc407e6f405dec"}}}}
{"actor":{"display_login":"rec"}}