Skip to content

fix: Handle special characters in Machine ID in Mabtech APEX parser#1234

Merged
nathan-stender merged 1 commit into
mainfrom
fix/mabtech-apex-special-char-machine-id
Jun 29, 2026
Merged

fix: Handle special characters in Machine ID in Mabtech APEX parser#1234
nathan-stender merged 1 commit into
mainfrom
fix/mabtech-apex-special-char-machine-id

Conversation

@nathan-stender

Copy link
Copy Markdown
Collaborator

Summary

  • Some APEX instruments include special characters like # in the Machine ID field (e.g. "IRIS #569", "#569")
  • The previous regex only handled "Model 1234" and bare numeric formats, causing AllotropeConversionError on these files
  • Generalized the regex to use \W* (any non-word characters) between model and serial number, and extract digits from any format in the fallback case

Test plan

  • Verified both failing files (Mabtech_IRIS569.xlsx, Mabtech_IRISIRIS_569 (1).xlsx) now parse successfully
  • Existing mabtech_apex tests still pass (4/4)
  • Lint passes (ruff, black, mypy)

🤖 Generated with Claude Code

Some APEX instruments include special characters like `#` in the Machine
ID field (e.g. "IRIS #569", "#569"). Generalize the regex to accept any
non-word characters between model and serial, and extract digits from
any format in the fallback case.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nathan-stender
nathan-stender requested review from a team and slopez-b as code owners June 29, 2026 16:28
@nathan-stender
nathan-stender merged commit c573b1b into main Jun 29, 2026
9 checks passed
@nathan-stender
nathan-stender deleted the fix/mabtech-apex-special-char-machine-id branch June 29, 2026 16:39
nathan-stender added a commit that referenced this pull request Jun 29, 2026
### Fixed

- Handle special characters in Machine ID in Mabtech APEX parser (#1234)
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