Skip to content

Allow string labels in Bin primitive#99

Merged
matthewhorridge merged 1 commit intomainfrom
feat/bin-string-labels
Feb 18, 2026
Merged

Allow string labels in Bin primitive#99
matthewhorridge merged 1 commit intomainfrom
feat/bin-string-labels

Conversation

@matthewhorridge
Copy link
Contributor

Summary

  • allow string labels in Bin.from_serialization() by removing forced int(...) cast on labels
  • update Bin internal type hints to support non-integer labels
  • add tests for string-label roundtrip serialization and transform behavior

Why

Issue #96 identifies that bin labels are currently forced to integers, which prevents meaningful categories like child, teen, adult, senior from being used directly in rules.

Validation

  • venv/bin/pytest -q
  • result: 72 passed

Related

- remove integer cast for bin labels during deserialization\n- update Bin typing to support non-integer labels\n- add serialization/transform tests for string labels\n\nImplements #96
@matthewhorridge matthewhorridge merged commit 7cbf134 into main Feb 18, 2026
1 check 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.

Allow string labels in Bin primitive

1 participant