Add VIN + email-to-title recipes (0.2.0) - #21
Merged
Conversation
Two expression-first recipes plus the atoms they needed: - UPPERCASE_CODE_NORMALIZE: NFKC -> whitespace-canonicalize -> uppercase -> nullify the '?' placeholder. The canonical form for identifier codes (VIN); agrees byte-for-byte with SQL UPPER(TRIM(vin)) on clean input. - EMAIL_TO_TITLE_NAME: strict local-part extract -> [._-]+ to space -> titlecase. A title-cased display name from an email, modeled on the BigQuery report; the docstring documents the two cosmetic divergences from INITCAP (mcdonald and digit-adjacency) rather than claiming byte parity. New atoms: to_uppercase (case), separators_to_space (substitution), extract_email_local_part_strict (names), DEFAULT_PLACEHOLDER_SENTINELS (missing). Existing atoms reused where they fit. ruff + mypy + 945 tests green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGY3PA5SKv8f9mKWAo91xF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two new expression-first recipes for the fleet data-mart handoff:
UPPERCASE_CODE_NORMALIZE— canonical identifier/VIN form (NFKC + whitespace-canonicalize + uppercase + nullify?). Verified byte-equal to SQLUPPER(TRIM(vin))on clean input, so a VIN cleaned here joins exactly to one cleaned elsewhere.EMAIL_TO_TITLE_NAME— title-cased display name from an email local part, modeled on the BigQuery report expression. Docstring honestly documents the two cosmetic divergences fromINITCAP(intra-word capitals, digit-adjacency) instead of claiming byte parity.Plus the four atoms these needed (
to_uppercase,separators_to_space,extract_email_local_part_strict,DEFAULT_PLACEHOLDER_SENTINELS), reusing existing atoms wherever they fit.Verified
ruff clean, mypy clean, 945 tests pass. Built and adversary-reviewed; the adversary's finding (a false "exactly reproduces INITCAP" claim) is fixed with an honest docstring + digit-adjacent regression tests.
🤖 Generated with Claude Code