Package: kolibri-explore-plugin
Kolibri Explore PluginThis plugin adds the Endless Key experience on top of Kolibri:A content navigation view exposed in the/exploreURL. As an
alternative to the Kolibri Learn plugin for self-guided learners.Branding and layout customizations for several channels.Download of content packs with extra metadata.UsageThis is a plugin for Kolibri, so it must be installed in your Kolibri
environment.Install latest release from PyPi:pip install kolibri-explore-pluginThen enable it in Kolibri and run migrations:kolibri plugin enable kolibri_explore_plugin
kolibri manage migrateDownload theapps-bundle.zipfrom theGitHub releases
pageand
extract them to thekolibri_explore_plugin/appsfolder.  Note that
this is not ideal, because you should know where haspipinstalled
the plugin.Download the JSON files from theendless-key-collectionsrepo and place them inkolibri_explore_plugin/static/collections/.Now start Kolibri. You should be able to navigate to/exploreif/doesn't redirect you already.SetupMake sure you already have thelatestpipenv.Either if you want to build or develop the plugin, please run:./scripts/bootstrap.shJust like Kolibri, we use a Python virtual environment along with Node
to obtain the exact same dependencies.BuildingCreating the.whlfileWith all the dependencies installed, it's now possible to build the
plugin by running:yarn build-distA.whlfile will be created in thedist/folder. You
can then install it:pip install dist/kolibri_explore_plugin-*.whlTestingBackend testsTests for the Python backend can be run by executingpython -m pytestoryarn run test:python. See the plugintestdirectory for more details about
the Python testing infrastructure.DevelopmentGetting started with developmentFor developing you could build and install the.whlfile over and
over for each iteration. But is much easier to install the project in
editable mode, which basically creates a symlink:pip install --editable .Note:you still need to enable the plugin and run migrations as in
Usage above!Then serve the plugin in watch mode:yarn devUsually you will also be developing Kolibri, as described inthe Kolibri developer documentation.So probably you have the following running in another Terminal tab:yarn run devserver-hotAnd you can edit both the plugin and Kolibri in live-mode. Further,
you can also edit a custom channel presentation in another Terminal
tab. See "Developing custom channel presentations" section below.Configuring the precommit hookTo run checks before any commit just run this command:pre-commit install -f --install-hooksThere is a continuous integration tool in Github that will run the
same checks for each pull request.Bundling custom channel presentationsThere is a Github action that does this automatically on each
release. To do it locally yourself:yarn build:appsAll custom presentation app bundles should be added in thekolibri_explore_plugin/appsdirectory to have this fully working.
The zip bundle should be namedcustom-channel-ui.zipand it should
be placed inside the corresponding app folder.Developing custom channel presentationsInstead of bundling the custom channel presentation inside the apps
directory, it's possible to work with a proxy for development. Note
that the proxy will be used for all the channels, not only for the
channel in question.Run the custom channel presentation development server. For
instance to run the template:$cdpackages/template-ui
$yarnserveRun Kolibri with thePROXY_CUSTOM_CHANNELenvironment variable
enabled:$cd/PATH/TO/kolibri
$PROXY_CUSTOM_CHANNEL=1yarnrundevserver-hotEvery request to thecustom-channel-ui.zipwill be proxied to the
devserver. The hot reloading should work here too!Ingesting highlighted contentMake sure to have a.envfile with the spreadsheet key as content:CONTENT_SPREADSHEET_KEY=123456Then run the script:./scripts/ingest_highlighted.pyIf everything goes well, thehighlighted-content.jsonfile will be
updated. You then need to commit the file.ReleasingRelease with GitHub actionTriggeringBump version to releaseaction frombump2release.ymlwill do all release steps mentioned inRelease with local environmentautomatically, including:Bump version and create a new tagPublish kolibri-explore-plugin wheel package to PyPIRelease apps-bundle.zipRelease with local environmentTo release a new version first please bump the version number to
either major or minor. Note that the major version also needs a version
name for branding. For example:# For a minor release:yarnbump-versionminor# For a major release:yarnbump-versionmajor"Komodo Dragon"That creates a new commit and a git tag. Please push them to the
remote:gitpush
gitpushoriginNEW_TAGThebump-versionscript can also be run with options such as--dry-run --listor--no-committo see what will happen. You can
also specify--current-versionto see the effect without actually
changing the current version. Seebumpversion --helpfor all options.Release candidatesPyPI andpipsupport release candidates with therc<N>suffix. Prior
to major releases it may be helpful to build and publish release
candidates so they can be tested prior to general availability. Ourbumpversionconfiguration has limited support for release candidates,
so care should be taken to ensure the new version comes out correctly.To begin a release candidate series, the version must be fully specified:yarnbump-versionmajor"Komodo Dragon"--new-version7.0.0rc1To make the next release candidate, run:yarnbump-versionrcFinally, to end a release candidate series, the version must be fully
specified again:yarnbump-versionmajor"Komodo Dragon"--new-version7.0.0In all cases, the commit and tag must be pushed to the remote as
explained above.How to display the build informationTo show the build information in the front page, as a tag in top right corner,
you can set the environment variable,SHOW_BUILD_INFOto "true", for example,
for the development kolibri server:$ SHOW_BUILD_INFO=true yarn run devserver