Skip to main content

Kolibri Explore Plugin

This plugin adds the Endless Key experience on top of Kolibri:

  • A content navigation view exposed in the /explore URL. 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.

Usage

This is a plugin for Kolibri, so it must be installed in your Kolibri environment.

Install latest release from PyPi:

pip install kolibri-explore-plugin

Then enable it in Kolibri and run migrations:

kolibri plugin enable kolibri_explore_plugin
kolibri manage migrate

Download the apps-bundle.zip from the GitHub releases page and extract them to the kolibri_explore_plugin/apps folder. Note that this is not ideal, because you should know where has pip installed the plugin.

Download the JSON files from the endless-key-collections repo and place them in kolibri_explore_plugin/static/collections/.

Now start Kolibri. You should be able to navigate to /explore if / doesn't redirect you already.

Setup

Make sure you already have the latest pipenv.

Either if you want to build or develop the plugin, please run:

./scripts/bootstrap.sh

Just like Kolibri, we use a Python virtual environment along with Node to obtain the exact same dependencies.

Building

Creating the .whl file

With all the dependencies installed, it's now possible to build the plugin by running:

yarn build-dist

A .whl file will be created in the dist/ folder. You can then install it:

pip install dist/kolibri_explore_plugin-*.whl

Testing

Backend tests

Tests for the Python backend can be run by executing python -m pytest or yarn run test:python. See the plugin test directory for more details about the Python testing infrastructure.

Development

Getting started with development

For developing you could build and install the .whl file 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 dev

Usually you will also be developing Kolibri, as described in the Kolibri developer documentation.

So probably you have the following running in another Terminal tab:

yarn run devserver-hot

And 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 hook

To run checks before any commit just run this command:

pre-commit install -f --install-hooks

There is a continuous integration tool in Github that will run the same checks for each pull request.

Bundling custom channel presentations

There is a Github action that does this automatically on each release. To do it locally yourself:

yarn build:apps

All custom presentation app bundles should be added in the kolibri_explore_plugin/apps directory to have this fully working. The zip bundle should be named custom-channel-ui.zip and it should be placed inside the corresponding app folder.

Developing custom channel presentations

Instead 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.

  1. Run the custom channel presentation development server. For instance to run the template:
$ cd packages/template-ui
$ yarn serve
  1. Run Kolibri with the PROXY_CUSTOM_CHANNEL environment variable enabled:
$ cd /PATH/TO/kolibri
$ PROXY_CUSTOM_CHANNEL=1 yarn run devserver-hot

Every request to the custom-channel-ui.zip will be proxied to the devserver. The hot reloading should work here too!

Ingesting highlighted content

Make sure to have a .env file with the spreadsheet key as content:

CONTENT_SPREADSHEET_KEY=123456

Then run the script:

./scripts/ingest_highlighted.py

If everything goes well, the highlighted-content.json file will be updated. You then need to commit the file.

Releasing

Release with GitHub action

Triggering Bump version to release action from bump2release.yml will do all release steps mentioned in Release with local environment automatically, including:

  • Bump version and create a new tag
  • Publish kolibri-explore-plugin wheel package to PyPI
  • Release apps-bundle.zip

Release with local environment

To 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:
yarn bump-version minor

# For a major release:
yarn bump-version major "Komodo Dragon"

That creates a new commit and a git tag. Please push them to the remote:

git push
git push origin NEW_TAG

The bump-version script can also be run with options such as --dry-run --list or --no-commit to see what will happen. You can also specify --current-version to see the effect without actually changing the current version. See bumpversion --help for all options.

Release candidates

PyPI and pip support release candidates with the rc<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. Our bumpversion configuration 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:

yarn bump-version major "Komodo Dragon" --new-version 7.0.0rc1

To make the next release candidate, run:

yarn bump-version rc

Finally, to end a release candidate series, the version must be fully specified again:

yarn bump-version major "Komodo Dragon" --new-version 7.0.0

In all cases, the commit and tag must be pushed to the remote as explained above.

How to display the build information

To show the build information in the front page, as a tag in top right corner, you can set the environment variable, SHOW_BUILD_INFO to "true", for example, for the development kolibri server:

$ SHOW_BUILD_INFO=true yarn run devserver

Metadata

Release files for kolibri-explore-plugin 7.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kolibri-explore-plugin 7.15.0
File Size Uploaded
kolibri_explore_plugin-7.15.0.tar.gz 32.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for kolibri-explore-plugin 7.15.0
File Interpreter ABI Platform
kolibri_explore_plugin-7.15.0-py3-none-any.whl Python 3 none any Details

Total release size: 58.8 MB

Release files / kolibri_explore_plugin-7.15.0.tar.gz

Download URL kolibri_explore_plugin-7.15.0.tar.gz
Size 32.6 MB
Tags Source
SHA-256 checksum
How to use checksums
b83ee1da452963ef9fe9f1dc3bb375a2cb05f8340090448bd4f8f988051e9fb3
BLAKE2b-256 checksum
How to use checksums
5ab32a62d8921f07492621d38bafb648b501b649d8d2450cfa16f1377cfc0b17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / kolibri_explore_plugin-7.15.0-py3-none-any.whl

Download URL kolibri_explore_plugin-7.15.0-py3-none-any.whl
Size 26.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f9412dcb465432a9f46f53886c4a93571c2bc66d78f588a06b9510b2ed0c1fb2
BLAKE2b-256 checksum
How to use checksums
803f0d58af7023211f0957ff5cac0d5ae04903ff35c099f1c0da075576817e2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.8

Release history Release notifications | RSS feed

This release

7.15.0 This release

2 release files

7.14.0

2 release files

7.13.0

2 release files

7.12.0

2 release files

7.11.0

2 release files

7.10.0

2 release files

7.9.0

2 release files

7.8.0

2 release files

7.7.0

2 release files

7.6.0

2 release files

7.5.0

2 release files

7.4.0

2 release files

7.3.0

2 release files

7.2.0

2 release files

7.1.0

2 release files

7.0.0

2 release files

6.47.0

2 release files

6.46.0

2 release files

6.45.0

2 release files

6.44.0

2 release files

6.40.0

2 release files

6.39.0

2 release files

6.38.0

2 release files

6.37.0

2 release files

6.36.0

2 release files

6.35.0

2 release files

6.34.0

2 release files

6.33.0

2 release files

6.30.0

2 release files

6.29.0

2 release files

6.28.0

2 release files

6.27.0

2 release files

6.26.0

1 release file

6.25.0

1 release file

6.24.0

1 release file

6.23.0

1 release file

6.22.0

1 release file

6.21.0

1 release file

6.20.0

1 release file

6.19.0

1 release file

6.18.0

1 release file

6.17.0

1 release file

6.16.0

1 release file

6.15.0

1 release file

6.14.0

1 release file

6.13.0

1 release file

6.12.0

1 release file

6.11.0

1 release file

6.10.0

1 release file

6.9.0

1 release file

6.8.0

1 release file

6.6.0

1 release file

6.5.0

1 release file

6.2.0

1 release file

6.1.0

1 release file

6.0.0

1 release file

5.11.0

1 release file

5.10.0

1 release file

5.9.0

1 release file

5.8.0

1 release file

5.7.0

1 release file

5.6.0

1 release file

5.5.0

1 release file

5.4.0

1 release file

5.3.0

1 release file

5.2.0

1 release file

5.1.0

1 release file

5.0.0

1 release file

4.0.0

1 release file

3.3.0

1 release file

3.2.0

1 release file

3.1.0

1 release file

3.0.4

1 release file

3.0.3

1 release file

3.0.2

1 release file

3.0.1

1 release file

3.0.0

1 release file

2.0.25

1 release file

2.0.24

1 release file

2.0.23

1 release file

2.0.22

1 release file

2.0.21

1 release file

2.0.20

1 release file

2.0.19

1 release file

2.0.18

1 release file

2.0.17

1 release file

2.0.16

1 release file

2.0.15

1 release file

2.0.14

1 release file

2.0.13

1 release file

2.0.12

1 release file

2.0.11

1 release file

2.0.10

1 release file

2.0.9

1 release file

2.0.8

1 release file

2.0.7

1 release file

2.0.6

1 release file

2.0.5

1 release file

2.0.4

1 release file

2.0.3

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

0.0.38

1 release file

0.0.37

1 release file

0.0.36

1 release file

0.0.35

1 release file

0.0.34

1 release file

0.0.33

1 release file

0.0.32

1 release file

0.0.31

1 release file

0.0.30

1 release file

0.0.29

1 release file

0.0.28

1 release file

0.0.27

1 release file

0.0.26

1 release file

0.0.25

1 release file

0.0.24

1 release file

0.0.23

1 release file

0.0.22

1 release file

0.0.21

1 release file

0.0.20

1 release file

0.0.19

1 release file

0.0.18

1 release file

0.0.17

1 release file

0.0.16

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page