Prevent deserialisation error when fetching data from GDA embedded visit service#956
Merged
DiamondJoseph merged 2 commits intomainfrom Mar 18, 2025
Merged
Prevent deserialisation error when fetching data from GDA embedded visit service#956DiamondJoseph merged 2 commits intomainfrom
DiamondJoseph merged 2 commits intomainfrom
Conversation
DiamondJoseph
commented
Dec 11, 2024
| response.raise_for_status() | ||
| json = await response.json() | ||
| return DataCollectionIdentifier.model_validate_json(json) | ||
| return DataCollectionIdentifier.model_validate(json) |
Contributor
Author
There was a problem hiding this comment.
model_validate_json is for turning a JSON string into the object. model_validate is for turning a Python object. response.json() converts the JSON string returned by the numTracker service into a dict.
Contributor
|
Please can you fix the tests |
8f2ce7f to
54a372d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #956 +/- ##
=======================================
Coverage 97.71% 97.71%
=======================================
Files 166 166
Lines 6707 6707
=======================================
Hits 6554 6554
Misses 153 153 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
olliesilvester
approved these changes
Mar 17, 2025
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.
During beamline testing on i22 December 10th, it was found that the current visit service impl uses the wrong method to convert the return value of the GDA numTracker
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}