Hey y’all, I hope you had a good summer holiday
I’d like to introduce a change in Tutor in how plugins are managed. This change would serve different purposes:
- Make it more clear, convenient and reliable to install/uninstall/upgrade/search plugins.
- Publicly recognize the contribution of plugin maintainers and developers.
- Incentivize Open edX developers to distribute their contributions via Tutor plugins.
To resolve item #1, we will introduce the following commands, strongly inspired by the
$ tutor plugins search plonk plonk/14.0.1 plonkify the fooberator pweeet/14.2.0 ungrunt the plonkifactor $ tutor plugins show plonk Version: 14.0.1 Maintainer: John "Xbl0ck3r" Doe <firstname.lastname@example.org> Homepage: https://github.com/overhangio/tutor-plonk URL: https://pypi.org/project/tutor-plonk $ tutor plugins install plonk ... # pip install tutor-plonk<15.0.0,>=14.0.0 $ tutor plugins upgrade plonk ... # pip install --upgrade tutor-plonk<15.0.0,>=14.0.0 $ tutor plugins upgrade ... # upgrade all installed plugins $ tutor plugins remove plonk ... # pip uninstall tutor-plonk
Behind the scenes, most of these commands will call the
pip CLI. The list of plugins will be fetched from a public index. The default will only include the official plugins, stored for example at: https://raw.githubusercontent.com/overhangio/tutor-plugins/master/nutmeg/official.yaml
It will be possible to add and remove indices. This will be useful in at least two use cases:
- Contrib (non-official) plugins.
- Non-open source plugins
To achieve that, we will introduce the following commands:
$ tutor plugins index add https://raw.githubusercontent.com/overhangio/tutor-plugins/master/contrib.yaml $ tutor plugins index list https://raw.githubusercontent.com/overhangio/tutor-plugins/master/nutmeg/official.yaml https://raw.githubusercontent.com/overhangio/tutor-plugins/master/nutmeg/contrib.yaml $ tutor plugins update ...
The syntax of the index files is not well defined, yet.
We want to be able to install plugins from different sources:
- Pypi-compliant projects that implement the JSON API.
- Git repositories.
- URLs that point at single-file Python plugins. (for instance: GitHub gists)
Note that different Open edX releases will have different indices. EDIT: There will also be extra “nightly” indices for the nightly branch.
Item #2 was a sub-goal of the Tutor maintainers TEP that I didn’t implement in a satisfying way. There is a public list of Tutor maintainers (here) but until now we are (really: I am) doing a bad job at highlighting the extent of their contributions. I hope to improve that by including the plugin maintainer’s name/company in:
- the “maintainer” field of the plugin’s
setup.pyfile, which will be displayed by
tutor plugins showand the pypi page.
- the plugin README file, which will be displayed on GitHub and in the Pypi description.
I want to encourage the creation of non-official Tutor plugins by making it possible to install plugins from contrib/3rd-party (or even private) indices. See above for the CLI. Thoses indices might be listed in the official github/overhangio/tutor-plugins repo, but their authors are encouraged to advertise them themselves.
Because indices are clearly different from one release to the next, this should encourage plugin maintainers to quickly upgrade the plugins they maintain after a new release.
Comments will be appreciated! Please reply to this topic below. I am especially interested in the opinion of @tutor-maintainers and plugin developers ( @fghaas @insad @kmccormick @mgmdi) If you don’t have any specific comment to make but you think this would be a welcome change, just hit the button.