jasperproject / jasper-client

Client code for Jasper voice computing platform
MIT License
4.53k stars 1.01k forks source link

Better system for sharing modules #163

Open charliermarsh opened 10 years ago

charliermarsh commented 10 years ago

This was outlined as a v2.0 goal. Let's brainstorm.

Right now, all we have is the docs page, which is quite bare and certainly doesn't allow for "easy" sharing.

The most logical approach seems to be creating a separate GitHub repo to which developers can send in pull requests. In that scenario, there are two things I'd be somewhat worried about:

  1. Reviewing all the pull requests. I think we'd make some disclaimer along the lines of "We haven't tested these, they're just publicly shared. Use at your own risk, etc."
  2. Versioning. What if we change the module API in the future? I think we can postpone solving that problem--if need be, we can just create a separate repo for modules that use the new API or even multiple folders within the same repo.

CC: @alexsiri7 @Holzhaus @shbhrsaha

Holzhaus commented 10 years ago

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512

I'd just create another repo for modules (named jasper-plugins), which contains folders for wach module. In each folder is a file containing a git clone uri or a link to a zip file. (And possibly some metadata).

There might also be an index file.

Jasper (possibly some kind install script) might pull the index file and then the Plugin itself.

Just a first thought. Anyway, we should not put third party plugins in the main repo if we don't support them.

On 10. September 2014 23:38:00 MESZ, Charles Marsh notifications@github.com wrote:

This was outlined as a v2.0 goal. Let's brainstorm.

Right now, all we have is the docs page, which is quite bare and certainly doesn't allow for "easy" sharing.

The most logical approach seems to be creating a separate GitHub repo to which developers can send in pull requests. In that scenario, there are two things I'd be somewhat worried about:

  1. Reviewing all the pull requests. I think we'd make some disclaimer along the lines of "We haven't tested these, they're just publicly shared. Use at your own risk, etc."
  2. Versioning. What if we change the module API in the future? I think we can postpone solving that problem--if need be, we can just create a separate repo for modules that use the new API or even multiple folders within the same repo.

CC: @alexsiri7 @Holzhaus @shbhrsaha


Reply to this email directly or view it on GitHub: https://github.com/jasperproject/jasper-client/issues/163


Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. -----BEGIN PGP SIGNATURE----- Version: APG v1.1.1

iQFIBAEBCgAyBQJUEMjJKxxKYW4gSG9sdGh1aXMgPGhvbHRodWlzLmphbkBnb29n bGVtYWlsLmNvbT4ACgkQYWYKqsqtforGgAf7Bc6tjvvpxLxiux/UM17uQhUtdSu2 tCODkoIRM5lCf4PtIHkAnPisKcnI/YzjabOt+hC12zXMEYxsWH5XhXyZJq0247OF NNsiq/Pvlgtl1u8Z9Z/AL65TzKcRwjemL6xBhsmgNpGRR6IsxQelp7+GS5CfFSjJ wkiQoq9LmXMR5Dm2yprwSGtA1bTzTRItQrwH1M1FfUka0U3lH6wKxGxwx4Ly9tdv 5hzPHAfXboZ6DnyCPciB852/B6Cnz+Ce6YxL7ClM9nhWjTNgocSNPjvon7qh/5l8 49eVsJFeiRKfZHQP6+HmAE77tdj1XYVl69uEDMfOfRVD1tsK9rE9glN/FQ== =x8bL -----END PGP SIGNATURE-----

the01 commented 10 years ago

It might be a bit overkill, but pypi is actually open source..

On a side note: With setuptools you can create entry pointsfor automatic discovery of plugins

charliermarsh commented 10 years ago

It would be very cool if we had a package.json + npm install (or requirements.txt + pip install -r requirements.txt)-esque workflow for installing Jasper modules.

alexsiri7 commented 10 years ago

We need a way of installing those modules into jasper, to make sure they can install their dependencies, and also we would definitely need a way of searching and listing the existing modules.

I think it would also be useful if people could publish their modules without any admin interactions, and in that case some mechanism for upvoting modules and commenting on them would be nice (so users can tell apart working from non-working modules, and maintainers can fix whatever needs fixing). Also, versions of the module should be tagged against which versions of jasper they work with.

Pypi

In a system like pypi or npm, packages are listed, a user can install them and their requirements, but they will still need to install them into jasper somehow.

Git repo

Having a git repo would need an admin merging PRs, and each package would come with a bunch of instructions on how to install them. If there is an index file, then that file would also need to be maintained.

UI

I would like us to have a frontend to this site where users can easily search for, add and upvote modules. These are some of the sites I was thinking of:

I think we can get a site like this working, and with enough metadata per module to allow automatic installs from jasper.

Holzhaus commented 10 years ago

Well, Installation is no Problem. When the Plugin system is ready, we can simply distribute the Plugins as ZIP-Files. They can be downloaded by Jasper and put in the right folder, where they'll be auto detected.

alexsiri7 commented 10 years ago

Ok, and if they have any requirements, they can be put in a requirements.txt in that file. I'd say using subfolders for the modules would be useful then (as in https://github.com/jasperproject/jasper-client/pull/153)

Holzhaus commented 10 years ago

Please have a look at the sample implemention of the Plugin system:

https://github.com/Holzhaus/jasper-client/compare/plugin-manager

alexsiri7 commented 10 years ago

Ok, that implementation of a plugin manager looks great. Let's say we use that as a base for modules. We'd still need a system to download, put them in the /plugins folder, and install any requirements. That should be quite a simple script. I'd say let's do the simple web app and do a command line installer for modules, that uses the website's API.

Holzhaus commented 10 years ago

I'd say the installation can put the files into two different locations: Either the global Jasper plugin directory OR - more likely - a plugin folder inside the user's config dir. This way you'll be able to install plugins per user, even if you do not have write access to the core jasper installation.

That said, the interesting part is how new plugins can be found:

  1. by the user
  2. by the plugin installation program

IMHO, a github wiki page with a list of available plugin plus a description and a download link would suffice. The user could read it and download it manually or use the installation program that parses markdown of the plugin page and downloads/installs the plugin automatically. Bonus: We don't have to host the plugins and we don't need our own server.

alexsiri7 commented 10 years ago

I think the github page will be easy to create, and harder to maintain. I'd still go for a simple website with user collaboration. Instead of a markdown, you'll download the specs of a plugin as json. It can be hosted on heroku or similar, so there would be no need of maintaining a server. And will give us much flexibility to have multiple plugins, versions, and a lot of user input and collaboration.

On Thu, Sep 11, 2014 at 2:10 PM, Jan Holthuis notifications@github.com wrote:

I'd say the installation can put the files into two different locations: Either the global Jasper plugin directory OR - more likely - a plugin folder inside the user's config dir. This way you'll be able to install plugins per user, even if you won't have write access to the core jasper installation.

That said, the interesting part is how new plugins can be found:

  1. by the user
  2. by the plugin installation program

IMHO, a github wiki page with a list of available plugin plus a description and a download link would suffice. The user could read it and download it manually or use the installation program that parses markdown of the plugin page and downloads/installs the plugin automatically. Bonus: We don't have to host the plugins and we don't need our own server.

— Reply to this email directly or view it on GitHub https://github.com/jasperproject/jasper-client/issues/163#issuecomment-55261018 .

alexsiri7 commented 10 years ago

This is what I had in mind: http://jaspermoduleshub.herokuapp.com/. I also made a simple installer, it's in https://github.com/jasperproject/jasper-client/pull/174. The code for the website is in https://github.com/alexsiri7/jasper-modules-hub/