Fix testcases with coordinate issue#83
Merged
olivhoenen merged 5 commits intoiterorganization:developfrom Nov 20, 2025
Merged
Conversation
maarten-ic
requested changes
Nov 18, 2025
Collaborator
maarten-ic
left a comment
There was a problem hiding this comment.
Hi Prasad, thanks for looking into this!
Your changes look more complex than should be necessary, can you have a look at below comments?
imas/test/test_helpers.py
Outdated
Comment on lines
+141
to
+143
| if any( | ||
| same_as.references for same_as in primitive.metadata.coordinates_same_as | ||
| ): |
Collaborator
There was a problem hiding this comment.
I don't see why we should reject error-bars from filling if they have same_as references, can you explain?
Collaborator
Author
There was a problem hiding this comment.
I am getting error with this specific case in distributions IDS. I will recheck this
try:
self._validate()
except ValidationError as exc:
# hide recursive stack trace from user
logger.debug("Original stack-trace of ValidationError: ", exc_info=1)
> raise exc.with_traceback(None) from None
E imas.exception.CoordinateError: Element `distribution[0]/profiles_2d[0]/grid/theta_straight_error_upper` has incorrect shape (5,): its coordinate in dimension 1 (`distribution[0]/profiles_2d[0]/grid/theta_straight`) has size 0.
imas/ids_toplevel.py:284: CoordinateError
Collaborator
There was a problem hiding this comment.
As discussed over Slack: I found the issue and pushed a commit to fix this. Please have a look and let me know if you have any comments 🙂
Collaborator
Author
There was a problem hiding this comment.
Thank you Maarten
- Errorbars were not cleared by `unset_coordinate()`, this is fixed now - Use imas.util.tree_iter in unset_coordinate, which is more clear than visit_children and performs slightly better - Simplify some checks in `maybe_set_random_value()`
maarten-ic
approved these changes
Nov 20, 2025
olivhoenen
approved these changes
Nov 20, 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.
No description provided.