Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): update the plate reader serial number parser to include BYO and OPT delims. #16650

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

vegano1
Copy link
Contributor

@vegano1 vegano1 commented Oct 31, 2024

Overview

The serial number format was updated to OPT instead of BYO, so let's update the parser to include both.

Test Plan and Hands on Testing

  • Plate reader with BYO in serial number is shown on the desktop app with full serial number
  • Plate reader with OPT in serial number is shown on the desktop app with full serial number

Changelog

  • Update the serial number parser for the plate reader to include both OPT and BYO delimiters.

Review requests

Risk assessment

low

@vegano1 vegano1 requested a review from a team as a code owner October 31, 2024 11:34
@nusrat813 nusrat813 self-requested a review October 31, 2024 13:40
Copy link

@nusrat813 nusrat813 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, LGTM
Old plate reader serial BYO

Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be using re.fullmatch (possibly combined with str.trim()) instead of re.match? Right now, if there are extra trailing digits, I think this will silently truncate them, which does not seem intentional given the way that the regex is written.

@vegano1
Copy link
Contributor Author

vegano1 commented Oct 31, 2024

Should we be using re.fullmatch (possibly combined with str.trim()) instead of re.match? Right now, if there are extra trailing digits, I think this will silently truncate them, which does not seem intentional given the way that the regex is written.

thanks for the callout, it should be 1 or more digits.

use fullmatch and strip to make sure we dont silently fail if the format is invalid
@vegano1 vegano1 merged commit 4945928 into chore_release-8.2.0 Oct 31, 2024
21 checks passed
@vegano1 vegano1 deleted the update-plate-reader-serial-parser branch October 31, 2024 15:30
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.

3 participants