Carry a license holder and validate/enrich CC licenses #11

Merged
raisondetredev merged 1 commit from refs/pull/11/head into main 2026-06-13 15:50:39 +02:00
raisondetredev commented 2026-06-13 15:46:07 +02:00 (Migrated from codeberg.org)

Grammar lessons can declare a license_holder (e.g. "Tae Kim"), which flows to the emitted studyset's license_holder field (additive archive field — no version bump).

A new creative_commons module parses a CC license structurally (BY/NC/SA/ND + version + optional jurisdiction port), so older/ported licenses like "CC BY-NC-SA 3.0 US" resolve to a canonical id, deed URL, human name, and conditions. validateCcLicense confirms the deed resolves on creativecommons.org (HTTP 200; injectable client for tests, degrades to unverified on error).

The grammar CLI resolves the lessons file's license through it: a recognised CC license is stamped in canonical form and its deed woven into the description; a non-CC or unverifiable license is left as-is with a warning. The pure curate() transform stays network-free.

Pairs with the halkyon-learn license-holder PR. Tests: parsing + MockClient-backed validation, plus grammar-curator holder/enrich coverage (69 pass).

Grammar lessons can declare a license_holder (e.g. "Tae Kim"), which flows to the emitted studyset's license_holder field (additive archive field — no version bump). A new creative_commons module parses a CC license structurally (BY/NC/SA/ND + version + optional jurisdiction port), so older/ported licenses like "CC BY-NC-SA 3.0 US" resolve to a canonical id, deed URL, human name, and conditions. validateCcLicense confirms the deed resolves on creativecommons.org (HTTP 200; injectable client for tests, degrades to unverified on error). The grammar CLI resolves the lessons file's license through it: a recognised CC license is stamped in canonical form and its deed woven into the description; a non-CC or unverifiable license is left as-is with a warning. The pure curate() transform stays network-free. Pairs with the halkyon-learn license-holder PR. Tests: parsing + MockClient-backed validation, plus grammar-curator holder/enrich coverage (69 pass).
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
project-halkyon/halkyon-curator!11
No description provided.