Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Release History
===============

0.2.17 Apr 13, 2026
-------------------
- Added library enum constants (KOLIBRI, COMMUNITY) for identifying channel library membership


0.1.33 Oct 5, 2021
-------------------
- Added new labelslookup.json constants
Expand Down
8 changes: 8 additions & 0 deletions js/Library.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// -*- coding: utf-8 -*-
// Generated by scripts/generate_from_specs.py
// Library

export default {
COMMUNITY: "COMMUNITY",
KOLIBRI: "KOLIBRI",
};
18 changes: 18 additions & 0 deletions le_utils/constants/library.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# Generated by scripts/generate_from_specs.py
from __future__ import unicode_literals

# Library

COMMUNITY = "COMMUNITY"
KOLIBRI = "KOLIBRI"

choices = (
(COMMUNITY, "Community"),
(KOLIBRI, "Kolibri"),
)

LIBRARYLIST = [
COMMUNITY,
KOLIBRI,
]
4 changes: 4 additions & 0 deletions spec/constants-library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"COMMUNITY",
"KOLIBRI"
]
21 changes: 21 additions & 0 deletions tests/test_library.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from le_utils.constants import library


def test_library_constants_exist():
assert library.KOLIBRI == "KOLIBRI"
assert library.COMMUNITY == "COMMUNITY"


def test_library_choices():
choices_dict = dict(library.choices)
assert library.KOLIBRI in choices_dict
assert library.COMMUNITY in choices_dict
assert choices_dict[library.KOLIBRI] == "Kolibri"
assert choices_dict[library.COMMUNITY] == "Community"


def test_LIBRARYLIST_exists():
assert library.LIBRARYLIST, "LIBRARYLIST did not generate properly"
Loading