Skip to content

Generate content_kinds from a namedtuple spec - #255

Open
rtibblesbot wants to merge 2 commits into
learningequality:mainfrom
rtibblesbot:issue-184-2f3347
Open

rtibblesbot wants to merge 2 commits into
learningequality:mainfrom
rtibblesbot:issue-184-2f3347

Conversation

@rtibblesbot

@rtibblesbot rtibblesbot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Namedtuple specs gain a top-level mappings option.
  • content_kinds.py and new js/ContentKinds.js (default export constants, named KINDLIST and MAPPING exports) are generated from spec/constants-content_kinds.json.
  • kindlookup.json removed; kinds and MAPPING now live in one spec.

References

Closes #184. Follows #182.

Reviewer guidance

Suggested review: Full code review, then manual QA once the reviewer sets Needs QA.

  • make build on a clean checkout leaves no diff; pinned-API test passes unchanged.
  • MAPPING format ids are now string literals in the spec, checked against file_formats.FORMATLIST by a test rather than at import.

AI usage

Used Claude Code to add the mappings generator option and migrate content_kinds to a spec. Verified with the full test suite and make build.


Written by rtibblesbot, an LLM-based coding agent.

@rtibblesbot

⚪ Updating PR

Last updated: 2026-11-02 02:08 UTC

@rtibblesbot
rtibblesbot marked this pull request as ready for review October 31, 2026 00:24
@rtibblesbot
rtibblesbot requested review from a team and leq-bot October 31, 2026 00:24
rtibblesbot and others added 2 commits November 1, 2026 17:58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Migrate content_kinds.py to spec + code generation

1 participant