We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56e12fe commit aaac777Copy full SHA for aaac777
odml/validation.py
@@ -308,6 +308,20 @@ def property_unique_names(obj):
308
Validation.register_handler('section', property_unique_names)
309
310
311
+def object_name_readable(obj):
312
+ """
313
+ Tests if object name is easily readable, so not equal to id.
314
+
315
+ :param obj: odml.Section or odml.Property.
316
317
+ if obj.name == obj.id:
318
+ yield ValidationError(obj, 'Name should be readable', LABEL_WARNING)
319
320
321
+Validation.register_handler('section', object_name_readable)
322
+Validation.register_handler('property', object_name_readable)
323
324
325
def property_terminology_check(prop):
326
"""
327
1. warn, if there are properties that do not occur in the terminology.
0 commit comments