Skip to content

feat: IATA BCBP boarding pass payload builder#10

Merged
greyllmmoder merged 1 commit intomainfrom
feat/bcbp-builder
Apr 9, 2026
Merged

feat: IATA BCBP boarding pass payload builder#10
greyllmmoder merged 1 commit intomainfrom
feat/bcbp-builder

Conversation

@greyllmmoder
Copy link
Copy Markdown
Owner

Summary

  • Adds BCBPSegment dataclass and build_bcbp_string() producing a 60-character IATA Resolution 792 Format Code F string
  • datetime.date is auto-converted to Julian day; long passenger names warn and truncate; all fields validated
  • Result is ready for AztecCode.from_preset(bcbp, "boarding_pass")

Testing

  • 10 tests covering field validation, date conversion, name truncation/warning, length invariant, and full Aztec encoding
  • Full suite passes, coverage ≥90%

Notes / Risks

  • Purely additive — new module aztec_py/bcbp.py, two new exports in __init__.py
  • No changes to existing modules

Add BCBPSegment dataclass and build_bcbp_string() that produces a
standards-compliant 60-character IATA Resolution 792 Format Code F
mandatory section string, ready for AztecCode.from_preset(bcbp, "boarding_pass").

- BCBPSegment: frozen dataclass for all 12 mandatory BCBP fields
- build_bcbp_string: validates fields, auto-converts datetime.date to Julian day,
  warns+truncates passenger_name >20 chars, returns exactly 60 chars
- 10 tests covering field validation, encoding, date conversion, warnings
- All 108 tests pass, coverage 91%

Co-Authored-By: Riafy agent <benny@riafy.me>
@greyllmmoder greyllmmoder merged commit 60bbe45 into main Apr 9, 2026
16 checks passed
@greyllmmoder greyllmmoder deleted the feat/bcbp-builder branch April 9, 2026 07:58
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