Skip to content

Commit e2c0677

Browse files
committed
add a test for optional attribute with nameType=partial and concept name in template
1 parent 5763124 commit e2c0677

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

.github/workflows/plugin_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
branch: main
3434
tests_to_run: tests/.
3535
- plugin: pynxtools-mpes
36-
branch: entry-identifier
36+
branch: main
3737
tests_to_run: tests/.
3838
- plugin: pynxtools-raman
3939
branch: sibling-inheritance

src/pynxtools/dataconverter/helpers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ def _log(self, path: str, log_type: ValidationProblem, value: Optional[Any], *ar
151151
)
152152
elif log_type == ValidationProblem.KeyToBeRemoved:
153153
logger.warning(f"The attribute {path} will not be written.")
154-
155154
elif log_type == ValidationProblem.InvalidConceptForNonVariadic:
156155
value = cast(Any, value)
157156
log_text = f"Given {value.type} name '{path}' conflicts with the non-variadic name '{value}'"

src/pynxtools/dataconverter/nexus_tree.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,6 @@ def convert_to_hashable(item):
942942
pass
943943
else:
944944
# TODO: should we be this strict here? Or can appdefs define additional terms?
945-
print(self, set_items, set_elem_enum_items)
946945
pass
947946
return True
948947

tests/dataconverter/test_validation.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,15 @@ def listify_template(data_dict: Template):
762762
[],
763763
id="concept-name-given-for-nonvariadic-field",
764764
),
765+
pytest.param(
766+
alter_dict(
767+
TEMPLATE,
768+
"/ENTRY[my_entry]/optional_parent/@AXISNAME_indices[@required_child_indices]",
769+
0,
770+
),
771+
[],
772+
id="concept-name-given-for-optional-attribute",
773+
),
765774
pytest.param(
766775
alter_dict(
767776
remove_from_dict(

0 commit comments

Comments
 (0)