[Roadmap] Plugin Improvements
From issues identified in https://github.com/inventree/InvenTree/pull/5624
Plugin Features / Improvements
[tasklist]
Plugin Tasks
- [x] Fix bug in "install plugin" API endpoint where failure is not correctly reported - https://github.com/inventree/InvenTree/pull/5646
- [x] Automatically reload plugin registry when plugins change in another running worker - https://github.com/inventree/InvenTree/pull/5649
- [x] Automatically run migrations when a new plugin is activated - https://github.com/inventree/InvenTree/pull/5668
- [x] Improve plugin reload mechanism with mutex locking - https://github.com/inventree/InvenTree/pull/5649
- [x] Enable plugin list API to be filtered by "builtin" or "sample" status - https://github.com/inventree/InvenTree/pull/5647
- [x] Cleanup "old" plugin configs (which reference plugins which are no longer available on the system) - https://github.com/inventree/InvenTree/pull/5652
- [x] Automatically reload plugin registry when the plugin settings change - https://github.com/inventree/InvenTree/pull/5662
- [ ] Provide users with better feedback if a plugin requires features which are not enabled (like app-mixin / url-mixin / etc)
- [x] Inform users when the system has unapplied migrations (if they are not applied automatically)
- [ ] Collect more metadata for plugins which are not installed
- [ ] Check for available plugin updates periodically - e.g. https://pypi.org/project/pip-check-updates/
Not sure collection of more metadata is possible without running into serious security problems.
Not sure collection of more metadata is possible without running into serious security problems.
It may not be. I'd like to look into it but it doesn't look likely
Would be amazing if there were a way, I am just not aware of one.
If there is no other way, the only thing I see is parsing the setup.py/plugin file without executing it, by converting it to an AST with pythons ast module.
If there is no other way, the only thing I see is parsing the setup.py/plugin file without executing it, by converting it to an AST with pythons ast module.
This is exactly how Blender does it for Python addons. Each addon has to contain a static bl_info section, like this for example, which can be parsed like that. The actual addon code will only be executed once you enable the addon.
@30350n thanks for the info! And very nice looking plugin too. Might have to use that myself