Skip to content

Commit 755ec2b

Browse files
committed
Collections download: Cleanup local manifests
This is not needed anymore. Remove the setting and the method to parse local manifests.
1 parent 29e9e30 commit 755ec2b

4 files changed

Lines changed: 0 additions & 36 deletions

File tree

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,3 @@ packages/template-ui/src/overrides
2828

2929
# Environment file with secrets
3030
/.env
31-
32-
# Collection files. These are bundled in apps
33-
kolibri_explore_plugin/static/collections/

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ extract them to the `kolibri_explore_plugin/apps` folder. Note that
3333
this is not ideal, because you should know where has `pip` installed
3434
the plugin.
3535

36-
Download the JSON files from the
37-
[endless-key-collections](https://github.com/endlessm/endless-key-collections/tree/main/json)
38-
repo and place them in `kolibri_explore_plugin/static/collections/`.
39-
4036
Now start Kolibri. You should be able to navigate to `/explore` if `/`
4137
doesn't redirect you already.
4238

kolibri_explore_plugin/collectionviews.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import logging
2-
import os
32
import time
43
from enum import auto
54
from enum import IntEnum
@@ -33,12 +32,6 @@
3332

3433
COLLECTION_URL_TEMPLATE = "{COLLECTIONS_HOST}/{grade}-{name}.json"
3534

36-
COLLECTION_PATHS = os.path.join(
37-
os.path.dirname(__file__), "static", "collections"
38-
)
39-
if conf.OPTIONS["Explore"]["CONTENT_COLLECTIONS_PATH"]:
40-
COLLECTION_PATHS = conf.OPTIONS["Explore"]["CONTENT_COLLECTIONS_PATH"]
41-
4235
# FIXME: Rename to PACK_IDS
4336
COLLECTION_GRADES = [
4437
"explorer",
@@ -90,20 +83,6 @@ def read_from_remote_collection(self, grade, name, validate=False):
9083
response.raise_for_status()
9184
self.read_dict(response.json(), validate)
9285

93-
def read_from_static_collection(self, grade, name, validate=False):
94-
self.grade = grade
95-
self.name = name
96-
manifest_filename = os.path.join(
97-
COLLECTION_PATHS, f"{grade}-{name}.json"
98-
)
99-
100-
if not os.path.exists(manifest_filename):
101-
raise ContentManifestParseError(
102-
f"Collection manifest {manifest_filename} not found"
103-
)
104-
105-
super().read(manifest_filename, validate)
106-
10786
def read_dict(self, manifest_data, validate=False):
10887
self.metadata = manifest_data.get("metadata")
10988
if self.metadata is None:

kolibri_explore_plugin/options.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@
1616
Defaults to GitHub pages.
1717
""",
1818
},
19-
"CONTENT_COLLECTIONS_PATH": {
20-
"type": "string",
21-
"default": "",
22-
"description": """
23-
Location where collections manifests are stored. Defaults
24-
to the static/collections folder.
25-
""",
26-
},
2719
"SHOW_AS_STANDALONE_CHANNEL": {
2820
"type": "boolean",
2921
"default": False,

0 commit comments

Comments
 (0)