-
Notifications
You must be signed in to change notification settings - Fork 7
serialize TargetConstraints #347 #348
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
serialize TargetConstraints #347 #348
Conversation
ebrahimebrahim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This would have been caught by the test
OpenLIFU-python/tests/test_protocol.py
Lines 39 to 41 in c83a133
| @pytest.mark.parametrize("compact_representation", [True, False]) | |
| def test_serialize_deserialize_protocol(example_protocol : Protocol, compact_representation: bool): | |
| assert example_protocol.from_json(example_protocol.to_json(compact_representation)) == example_protocol |
but I am guessing it didn't get caught because the protocol used for testing doesn't have any target constraints:
OpenLIFU-python/tests/resources/example_db/protocols/example_protocol/example_protocol.json
Line 91 in c83a133
| "target_constraints": [], |
Can you add some target constraints to tests/resources/example_db/protocols/example_protocol/example_protocol.json in this PR? Or I can, lmk
This actually actually raises another issue, which is that by default |
Is this something we can fix in SlicerOpenLIFU? We can make it us lat, ele, ax if it is mis-using x,y,z somewhere |
ebrahimebrahim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty for updating the test data!
Closes #347