Double down on hooks, remove app plugin in favour of individual hooks for individual capabilities #12879
+615
−584
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goals
Summary
References
Depends on #12874 to allow specifying an extra python path for the development plugin
Needed to support learningequality/kolibri-installer-android#197
Reviewer guidance
I feel like leaning into the hooks makes sense to have a single way to customize Kolibri - is there anything about this that makes this less obvious?
By separating out the specific functionality that is more 'app' versus 'device' oriented, it has made each implementation a little more bespoke - but it seems sensible to me that metered connection checking doesn't have to be exclusive to app mode - is the minor added fiddliness an issue?
With the addition of the server hooks, we could also turn ZeroConf integration into a plugin, which would allow us to turn it off slightly more elegantly - and in a swappable way so that on Android we can provide the multicast implementation via built in Android mechanisms. The other configuration that feels like could benefit from being pluggable is the restart hooks - should we push more into plugins/hooks rather than relying on options.py?