fix: Standardize BaseSequence to separate metadata extraction and ASL context generation#43
Open
Devguru-codes wants to merge 1 commit intoOSIPI:mainfrom
Open
fix: Standardize BaseSequence to separate metadata extraction and ASL context generation#43Devguru-codes wants to merge 1 commit intoOSIPI:mainfrom
BaseSequence to separate metadata extraction and ASL context generation#43Devguru-codes wants to merge 1 commit intoOSIPI:mainfrom
Conversation
… context generation
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.
Fixes #42 where the DICOM processing endpoint crashes with
ValueError: not enough values to unpackwhen processing Siemens DICOMs.The root cause was inconsistent sequence implementation:
reports.pyexpectsget_bids_metadatato return a tuple(metadata, asl_context). GE sequences incorrectly returned this tuple fromextract_bids_metadata, while Siemens correctly returned only adict, causing the unpack crash.Fix
generate_asl_contextmethod toBaseSequencedictfromextract_bids_metadata(), moving context generation togenerate_asl_context()generate_asl_context()to Siemens sequencesget_bids_metadata()inmain.pyto call both methods and return the tupleFiles Changed
package/src/pyaslreport/main.pypackage/src/pyaslreport/sequences/base_sequence.pypackage/src/pyaslreport/sequences/ge/asl/ge_basic_single_pld.pypackage/src/pyaslreport/sequences/ge/asl/ge_easl_multi_pld.pypackage/src/pyaslreport/sequences/siemens/asl/siemens_basic_single_pld.pyAPI Endpoint Response Comparison
mainbranch (before fix)issue9_arch_fixbranch (after fix)Python Test Suite Results
mainbranch (before fix)Summary: PASSED=3 FAILED=1
issue9_arch_fixbranch (after fix)Summary: PASSED=4 FAILED=0