Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
Commit of change for public test of further cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ggoneiESS committed Aug 4, 2023
1 parent cf1a56e commit cf7ed8c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
12 changes: 9 additions & 3 deletions nexus_constructor/json/load_from_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,16 @@ def _add_transform_and_shape_to_component(self, component, children_dict):
)
transformation_reader.add_transformations_to_component()
self.warnings += transformation_reader.warnings
depends_on_path = _find_depends_on_path(children_dict, component.name)
if depends_on_path not in DEPENDS_ON_IGNORE:
depends_on = _find_depends_on_path(children_dict, component.name)
if depends_on not in [".", ""]:
if depends_on[0] != "/":
if depends_on.split("/")[0].startswith('transform'):
depends_on = depends_on.split("/")[1]
depends_on = component.absolute_path + "/transformations/" + depends_on

if depends_on not in DEPENDS_ON_IGNORE:
depends_on_id = TransformId(
*get_component_and_transform_name(depends_on_path)
*get_component_and_transform_name(depends_on)
)
self._components_depends_on[component.name] = (component, depends_on_id)
else:
Expand Down
4 changes: 4 additions & 0 deletions nexus_constructor/json/transformation_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ def _create_transformations(self, json_transformations: list):
depends_on = _find_attribute_from_list_or_dict(
CommonAttrs.DEPENDS_ON, attributes
)
if depends_on not in [".", ""]:
if depends_on[0] != "/":
depends_on = self.parent_component.absolute_path + "/transformations/" + depends_on

if module == DATASET:
values = self._get_transformation_attribute(
CommonKeys.VALUES, config, name
Expand Down
2 changes: 1 addition & 1 deletion nexus_constructor/link_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class LinkTransformation:
"""
Used for keeping track of links (depends_on) to transformations outside the
current component and for keeping track of the parent transformation list
Not a "link" in the NeXus/HDF5 sense
Not a "link" in the NeXus/HDF5 sense so the name should be changed
"""

def __init__(self, parent: TransformationsList):
Expand Down

0 comments on commit cf7ed8c

Please sign in to comment.