Skip to content

Update README for multi-source rules; Case selector fix; drop .tab - #114

Merged
matthewhorridge merged 3 commits into
mainfrom
feat/case-coalesce-primitives
Jul 9, 2026
Merged

Update README for multi-source rules; Case selector fix; drop .tab#114
matthewhorridge merged 3 commits into
mainfrom
feat/case-coalesce-primitives

Conversation

@matthewhorridge

Copy link
Copy Markdown
Contributor

Summary

  • Match integer-valued float selectors in Case (a 2.0 read from CSV now matches when: ["2"])
  • Drop .tab extension support in the CLI; tab-separated I/O is selected by .tsv only
  • Update the README to match the current code:
    • Document the sources (list) rule schema, optional metadata, and JSON/YAML rules files, with the same rule shown in both formats
    • New Multi-Source Rules section with YAML examples for case, coalesce, and multi-operand combine branches (YAML taken verbatim from RuleSet.save output)
    • Add missing primitives to the reference tables: case, coalesce, extract_regex, map_each, missing_code, validate_pattern
    • Fix enum_to_enum docs to the {from,to} entry-list mapping form (the old documented dict form no longer deserializes)
    • Document --on-missing default/semantics and --dataset-name

Test plan

  • pytest tests — 199 passed
  • README YAML examples round-tripped through RuleSet.load and exercised via rule.transform

🤖 Generated with Claude Code

matthewhorridge and others added 3 commits June 30, 2026 13:48
A CSV/pandas flag column with blank cells is read as float, so an integer code
2 arrives as 2.0; str(2.0) == '2.0' missed a when entry of '2'. Normalize an
integer-valued float to its int string for both the selector value and when
keys, so the flag matches regardless of reader typing. Same class of fix as the
enum integer-key handling. +1 test; 199 passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Tab-separated input/output is selected by .tsv only.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Document the sources (list) rule schema, optional metadata, and
  JSON/YAML rules files; show the same rule in both formats
- Add a Multi-Source Rules section with YAML examples for case,
  coalesce, and multi-operand combine branches
- Add missing primitives to the reference tables: case, coalesce,
  extract_regex, map_each, missing_code, validate_pattern
- Fix enum_to_enum docs to the {from,to} entry-list mapping form
- Document --on-missing default/semantics and --dataset-name
- Remove duplicated normalize_boolean defaults section

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@matthewhorridge
matthewhorridge merged commit 56d752b into main Jul 9, 2026
1 check passed
@matthewhorridge
matthewhorridge deleted the feat/case-coalesce-primitives branch July 9, 2026 17:04
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.

1 participant