5
5
from . import ValidationOutcome , OutcomeSeverity
6
6
7
7
8
- @gherkin_ifc .step ('A relationship {relationship} {dir1:from_to} {entity} {dir2:from_to} {other_entity}' )
9
- @gherkin_ifc .step ('A relationship {relationship} exists {dir1:from_to} {entity} {dir2:from_to} {other_entity}' )
10
- @gherkin_ifc .step ('A relationship {relationship} must exist {dir1:from_to} {entity} {dir2:from_to} {other_entity}' )
11
- @gherkin_ifc .step ('A relationship {relationship} {dir1:from_to} {entity} {dir2:from_to} {other_entity} {tail:maybe_and_following_that}' )
12
- @gherkin_ifc .step ('A *{required}* relationship {relationship} {dir1:from_to} {entity} {dir2:from_to} {other_entity}' )
13
- @gherkin_ifc .step ('A *{required}* relationship {relationship} {dir1:from_to} {entity} {dir2:from_to} {other_entity} {tail:maybe_and_following_that}' )
8
+ @gherkin_ifc .step ('A relationship . {relationship}. {dir1:from_to} {entity} {dir2:from_to} . {other_entity}. ' )
9
+ @gherkin_ifc .step ('A relationship . {relationship}. exists {dir1:from_to} . {entity}. {dir2:from_to} . {other_entity}. ' )
10
+ @gherkin_ifc .step ('A relationship . {relationship}. must exist {dir1:from_to} . {entity}. {dir2:from_to} . {other_entity}. ' )
11
+ @gherkin_ifc .step ('A relationship . {relationship}. {dir1:from_to} . {entity}. {dir2:from_to} . {other_entity}. {tail:maybe_and_following_that}' )
12
+ @gherkin_ifc .step ('A *{required}* relationship . {relationship}. {dir1:from_to} . {entity}. {dir2:from_to} . {other_entity}. ' )
13
+ @gherkin_ifc .step ('A *{required}* relationship . {relationship}. {dir1:from_to} . {entity}. {dir2:from_to} . {other_entity}. {tail:maybe_and_following_that}' )
14
14
def step_impl (context , inst , relationship , dir1 , entity , dir2 , other_entity , tail = " " , required = False ):
15
15
"""""
16
16
Reference to tfk ALB999 rule https://github.com/buildingSMART/ifc-gherkin-rules/pull/37
@@ -54,7 +54,7 @@ def make_aggregate(val):
54
54
yield ValidationOutcome (instance_id = inst , severity = OutcomeSeverity .ERROR )
55
55
56
56
if rel_attribute_name == attr_to_entity :
57
- if tail .strip ():
57
+ if str ( tail ) .strip ():
58
58
instances .extend (to_other )
59
59
else :
60
60
instances .append (inst )
@@ -67,7 +67,7 @@ def make_aggregate(val):
67
67
68
68
69
69
70
- @gherkin_ifc .step ("The element {relationship_type} an {entity}" )
70
+ @gherkin_ifc .step ("The element ^ {relationship_type}^ an . {entity}. " )
71
71
def step_impl (context , inst , relationship_type , entity ):
72
72
reltype_to_extr = {'nests' : {'attribute' : 'Nests' , 'object_placement' : 'RelatingObject' },
73
73
'is nested by' : {'attribute' : 'IsNestedBy' , 'object_placement' : 'RelatedObjects' }}
0 commit comments