{"action":"created","issue":{"url":"https://api.github.com/repos/publiclab/image-sequencer/issues/190","repository_url":"https://api.github.com/repos/publiclab/image-sequencer","labels_url":"https://api.github.com/repos/publiclab/image-sequencer/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/publiclab/image-sequencer/issues/190/comments","events_url":"https://api.github.com/repos/publiclab/image-sequencer/issues/190/events","html_url":"https://github.com/publiclab/image-sequencer/issues/190","id":299922834,"number":190,"title":"Moving towards a modular approach for adding modules","user":{"login":"tech4GT","id":25617855,"avatar_url":"https://avatars0.githubusercontent.com/u/25617855?v=4","gravatar_id":"","url":"https://api.github.com/users/tech4GT","html_url":"https://github.com/tech4GT","followers_url":"https://api.github.com/users/tech4GT/followers","following_url":"https://api.github.com/users/tech4GT/following{/other_user}","gists_url":"https://api.github.com/users/tech4GT/gists{/gist_id}","starred_url":"https://api.github.com/users/tech4GT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tech4GT/subscriptions","organizations_url":"https://api.github.com/users/tech4GT/orgs","repos_url":"https://api.github.com/users/tech4GT/repos","events_url":"https://api.github.com/users/tech4GT/events{/privacy}","received_events_url":"https://api.github.com/users/tech4GT/received_events","type":"User","site_admin":false},"labels":[{"id":553129420,"url":"https://api.github.com/repos/publiclab/image-sequencer/labels/enhancement","name":"enhancement","color":"f9d0c4","default":true},{"id":640814814,"url":"https://api.github.com/repos/publiclab/image-sequencer/labels/new-feature","name":"new-feature","color":"000000","default":false},{"id":553129423,"url":"https://api.github.com/repos/publiclab/image-sequencer/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":{"login":"tech4GT","id":25617855,"avatar_url":"https://avatars0.githubusercontent.com/u/25617855?v=4","gravatar_id":"","url":"https://api.github.com/users/tech4GT","html_url":"https://github.com/tech4GT","followers_url":"https://api.github.com/users/tech4GT/followers","following_url":"https://api.github.com/users/tech4GT/following{/other_user}","gists_url":"https://api.github.com/users/tech4GT/gists{/gist_id}","starred_url":"https://api.github.com/users/tech4GT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tech4GT/subscriptions","organizations_url":"https://api.github.com/users/tech4GT/orgs","repos_url":"https://api.github.com/users/tech4GT/repos","events_url":"https://api.github.com/users/tech4GT/events{/privacy}","received_events_url":"https://api.github.com/users/tech4GT/received_events","type":"User","site_admin":false},"assignees":[{"login":"tech4GT","id":25617855,"avatar_url":"https://avatars0.githubusercontent.com/u/25617855?v=4","gravatar_id":"","url":"https://api.github.com/users/tech4GT","html_url":"https://github.com/tech4GT","followers_url":"https://api.github.com/users/tech4GT/followers","following_url":"https://api.github.com/users/tech4GT/following{/other_user}","gists_url":"https://api.github.com/users/tech4GT/gists{/gist_id}","starred_url":"https://api.github.com/users/tech4GT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tech4GT/subscriptions","organizations_url":"https://api.github.com/users/tech4GT/orgs","repos_url":"https://api.github.com/users/tech4GT/repos","events_url":"https://api.github.com/users/tech4GT/events{/privacy}","received_events_url":"https://api.github.com/users/tech4GT/received_events","type":"User","site_admin":false}],"milestone":null,"comments":30,"created_at":"2018-02-24T08:10:55Z","updated_at":"2018-03-10T20:13:36Z","closed_at":null,"author_association":"COLLABORATOR","body":"Right now the modules are hardcoded into image-sequencer(image-sequencer/src/Modules.js), that means any user wanting to use image-sequencer has to download all the modules(even if the user just wants to use 1 or 2) so what i am thinking is that what if we make this dynamic. \r\n\r\nWe publish modules as separate npm packages that can be plugged into the sequencer(kind of like [passport.js](http://www.passportjs.org/) does it with passport strategies that can be plugged into passport). So the modules.js now becomes  modules.json file and we add an add-module option to the cli allowing the user to dynamically modify *their image-sequencer* according to *their* needs.\r\n\r\nWe can have a basic set which will be included with image-sequencer itself and new modules can be installed via npm. This way we can also separate core and module contributions and also simplify the module contribution system(Anybody can then create a plugin module for the project and publish it making it more open since no pr will be needed to the main project to add a module).\r\n\r\nThis will make image sequencer very modular and configurable.As far as the demo is concerned we can add all the verified modules(Modules that are added in the readme) and build it for browser and then serve that. We can also have a guide on how to correctly make a module for this project.\r\nAfter we are done adding a new module for use will look something like this:\r\n\r\n```\r\nnpm i image-sequencer\r\nnpm i sequencer-blur\r\nsequencer --register-module sequencer-blur\r\nsequencer -i \"<image>\" -s \"blur\" \r\n``` \r\n\r\nA PR will still be needed if the module creator wants to list his/her module to our list in the readme\r\nMany famous node based projects already use this approach as i mentioned above passport.js(an authentication system) also does this as strategies for oauth providers like facebook and google\r\n\r\n@jywarren what do you say, will this be in sync with your vision of the project for the summer?\r\nI actually wanted to present to you all the major ideas that i had so that you can tell me which ones would be better and i mentioned the rest in my proposal but i also wanted to run this one by you.\r\nSo what say?\r\n\r\n- [ ] Prepare a list of core modules that should be included with image sequencer itself\r\n- [ ] Implement one line operation with dynamic module\r\n- [ ] Modify modules.js to be dynamic through a json file so packages can be installed separately and loaded into image-sequencer\r\n- [ ] Move complex non-core modules into their own packages and separate them from the core modules \r\n- [ ] Build the cli around it to enable listing of all installed modules as well as installing and removing modules\r\n- [ ] Add a list of verified by publiclab modules that independent module makers can send a pr to and have their module listed"},"comment":{"url":"https://api.github.com/repos/publiclab/image-sequencer/issues/comments/372062273","html_url":"https://github.com/publiclab/image-sequencer/issues/190#issuecomment-372062273","issue_url":"https://api.github.com/repos/publiclab/image-sequencer/issues/190","id":372062273,"user":{"login":"tech4GT","id":25617855,"avatar_url":"https://avatars0.githubusercontent.com/u/25617855?v=4","gravatar_id":"","url":"https://api.github.com/users/tech4GT","html_url":"https://github.com/tech4GT","followers_url":"https://api.github.com/users/tech4GT/followers","following_url":"https://api.github.com/users/tech4GT/following{/other_user}","gists_url":"https://api.github.com/users/tech4GT/gists{/gist_id}","starred_url":"https://api.github.com/users/tech4GT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tech4GT/subscriptions","organizations_url":"https://api.github.com/users/tech4GT/orgs","repos_url":"https://api.github.com/users/tech4GT/repos","events_url":"https://api.github.com/users/tech4GT/events{/privacy}","received_events_url":"https://api.github.com/users/tech4GT/received_events","type":"User","site_admin":false},"created_at":"2018-03-10T20:13:36Z","updated_at":"2018-03-10T20:13:36Z","author_association":"COLLABORATOR","body":"I might be wrong here but how will we modify this js object and persist this change for when the user runs the service the next time, since we are allowing plugins we would need the change in plugins to persist but the changes to the ja object will get lost as soon as the scope is destroyed , does that make any sense?"}}
{"actor":{"display_login":"tech4GT"}}