Skip to content

Decode registered classes from their registry key; RegisteredClassChoices (0.2.7) - #20

Merged
trissim merged 1 commit into
mainfrom
k6-registered-class-decoding
Oct 11, 2026
Merged

trissim merged 1 commit into
mainfrom
k6-registered-class-decoding

Conversation

@trissim

@trissim trissim commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

For OpenHCS K6 (debug and progress records on the declared codec).

  • to_jsonable already writes a class of an AutoRegisterMeta family as its registry key. dataclass_from_mapping now reads it back for fields annotated type[Family], through registered_class_from_key, which dispatches on the family's metaclass, so a family with its own boundary spelling (OpenHCS axes, decoded through the active family) registers its own decoder. A key outside the family fails loudly.
  • RegisteredClassChoices(family): the AnnotationChoices of a field holding one class of a family, labelled by registry key.
  • Version 0.2.7 (rebased on FieldLabel 0.2.6), CHANGELOG entry, tests in tests/test_jsonable.py (full suite: 175 passed locally).

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 11, 2026 08:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…ices; 0.2.7

to_jsonable already writes a class of an AutoRegisterMeta family as its
registry key. dataclass_from_mapping now reads it back for fields annotated
type[Family], through registered_class_from_key, which dispatches on the
family's metaclass so a family with its own boundary spelling registers its
decoder. RegisteredClassChoices is the form-choice view of a registry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trissim
trissim force-pushed the k6-registered-class-decoding branch from 58a2b79 to 1a74ca8 Compare October 11, 2026 09:16
@trissim trissim changed the title Decode registered classes from their registry key; RegisteredClassChoices (0.2.6) Decode registered classes from their registry key; RegisteredClassChoices (0.2.7) Oct 11, 2026
@trissim
trissim merged commit 046a1f6 into main Oct 11, 2026
15 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.

2 participants