fix: Support EnVision calculated formulas without a name prefix#1246
Merged
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. The no-'=' case is exercised by editing the formula in an existing fluorescence example file; other example files retain the standard "name = expression" form. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The regenerated expected output reordered object keys, producing a ~5000-line diff for a change that only touches the calculated data name/description. Hand-edit the expected JSON to apply just the string changes, preserving the original key order so the diff reflects only the intended values. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ajcariaga16
approved these changes
Jul 23, 2026
nathan-stender
added a commit
that referenced
this pull request
Jul 24, 2026
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_fluorescence_example01.csvto the no-=form (and regenerated its expected JSON) to exercise the fallback end-to-end. Other example files retain the standardname = expressionform, so both branches stay covered.Testing
perkin_elmer_envisiontests pass;hatch run lint(ruff, black, mypy) clean.🤖 Generated with Claude Code