Skip to content

feat: add library enum constants for Kolibri and Community libraries#215

Merged
rtibbles merged 2 commits intolearningequality:mainfrom
rtibblesbot:issue-214-c5aa29
Apr 13, 2026
Merged

feat: add library enum constants for Kolibri and Community libraries#215
rtibbles merged 2 commits intolearningequality:mainfrom
rtibblesbot:issue-214-c5aa29

Conversation

@rtibblesbot
Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot commented Apr 13, 2026

Plan: Add a library enum to le-utils that identifies whether a channel belongs to the Kolibri Library or the Community Library, with generated Python and JavaScript constant files.

  • Write failing test, create spec, generate constants

status

Summary

Adds a library enum with KOLIBRI and COMMUNITY values for identifying which library a channel belongs to. The spec file (spec/constants-library.json) drives generation of the Python and JavaScript constants via the existing generator script.

References

Closes #214
Related: learningequality/studio#5821

Reviewer guidance

Run uv run pytest tests/test_library.py -v to verify the generated constants. No risky areas — purely additive change following an established pattern.

AI usage

Used Claude Code to implement following a pre-approved plan. Wrote failing tests first, created the spec, ran the generator, verified all tests pass.


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?
  • Ran pre-flight CI checks (lint, format, tests) and verified all pass
  • Rebased onto the target branch and resolved any conflicts
  • Reorganized commit history into clean, logical commits
  • Audited the diff to ensure only issue-relevant files are changed
  • Built PR body from the repository's PR template with evidence blocks

Adds spec/constants-library.json with KOLIBRI and COMMUNITY enum values.
Generated le_utils/constants/library.py and js/Library.js via generate_from_specs.py.

test: simplify LIBRARYLIST test assertion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rtibblesbot rtibblesbot marked this pull request as ready for review April 13, 2026 19:48
Copy link
Copy Markdown
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, can you also bump the version so we can make a new release?

@rtibblesbot
Copy link
Copy Markdown
Contributor Author

Done — added a CHANGELOG entry for v0.2.17 in 0c3197a. After this merges, tagging v0.2.17 will cut the release (version is driven by git tags via setuptools-scm).

@rtibbles rtibbles merged commit b6edad0 into learningequality:main Apr 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add library enum constants for channel library identification

2 participants