fix: Support EnVision calculated formulas without a name prefix#1245
Closed
nathan-stender wants to merge 1 commit into
Closed
fix: Support EnVision calculated formulas without a name prefix#1245nathan-stender wants to merge 1 commit into
nathan-stender wants to merge 1 commit into
Conversation
Some PerkinElmer EnVision exports report a calculated formula as a plain description with no "name =" prefix (e.g. "Calc 1: OD450 direct absorbance value at 450 nm"). The name-extraction regex required an '=' and raised "Unable to find expected formula name for calculated results section." Fall back to using the whole formula string as the calculated data name when there is no '=' delimiter. Adds a 384-well absorbance regression file. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
Author
|
Superseded by #1246, which drops the large 384-well testdata file and instead exercises the no-'=' formula case by editing an existing example file. |
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.
Summary
A PerkinElmer EnVision 384-well absorbance export (
OD450) failed to parse:The calculated plate's
Formulais a plain description with noname =prefix:CalculatedPlateInfo.createextracted the name with^([^=]*)=, which assumes the standard formCalc N: <name> = <expression>and raised when no=was present.Fix
When the formula has no
=, fall back to using the whole formula string as the calculated data name. Standard formulas are unaffected.Changes
perkin_elmer_envision_structure.py: make the formula-name regex optional with a whole-string fallback.test_create_calculated_plate_info_with_invalid_formula→test_create_calculated_plate_info_with_formula_without_nameto assert the fallback.PE_Envision_absorbance_OD450_384_calc_no_name.csv(+ expected JSON).Testing
perkin_elmer_envisiontests pass;hatch run lint(ruff, black, mypy) clean.🤖 Generated with Claude Code