Skip to content

Commit dbbad05

Browse files
committed
Merge branch 'preview' of https://github.com/buildingSMART/ifc-gherkin-rules into preview
2 parents 9735edd + 2409392 commit dbbad05

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

.github/workflows/dispatch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Dispatch
33
on:
44
push:
55
branches:
6-
- development
6+
- preview
77
paths-ignore:
88
- '.github/**'
99
workflow_dispatch:

features/rules/GRF/GRF003_CRS-presence-with-spatial-entities.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
@version1
55
Feature: GRF003 - CRS presence with spatial entities
66
The rule verifies that proper georeferencing using a coordinate reference system is established when facilities such as buildings or bridges are present in a model.
7-
Models containing IfcFacility must contain a IfcProjectedCRS or IfcGeographicCRS.
7+
Models containing facilities such as buildings, bridges, railways, and roads should contain an IfcProjectedCRS or IfcGeographicCRS.
88

99

1010
Scenario: CRS required when IfcBuilding is present
1111

1212
Given a model with Schema 'IFC4'
1313
Given an .IfcBuilding.
1414

15-
Then There must be at least 1 instance(s) of .IfcProjectedCRS.
15+
Then There should be at least 1 instance(s) of .IfcProjectedCRS.
1616

1717
Scenario: CRS required when IfcFacility is present
1818

1919
Given a model with Schema 'IFC4.3'
2020
Given an .IfcFacility.
2121

22-
Then There must be at least 1 instance(s) of .IfcCoordinateReferenceSystem.
22+
Then There should be at least 1 instance(s) of .IfcCoordinateReferenceSystem.

features/steps/registered_type_definitions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
"display_entity": [" ", "and display entity instance"],
1818
"property_set_or_element_quantity": ["IfcPropertySet", "IfcElementQuantity"],
1919
"property_or_physical_quantity": ["IfcProperty", "IfcPhysicalQuantity"],
20-
"continuity_type": ["position", "tangency", "cant gradient", "vertical gradient"]
20+
"continuity_type": ["position", "tangency", "cant gradient", "vertical gradient"],
21+
"must_or_should": ["must", "should"]
2122
}

features/steps/thens/existence.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ def get_entities_in_model(context, constraint, entity, include_or_exclude_subtyp
4747

4848

4949
@gherkin_ifc.step(
50-
"There must be {constraint} {num:d} instance(s) of .{entity}. ^{subtype_handling:include_or_exclude_subtypes}^"
50+
"There {spec_word:must_or_should} be {constraint} {num:d} instance(s) of .{entity}. ^{subtype_handling:include_or_exclude_subtypes}^"
5151
)
5252
@global_rule
53-
def step_impl(context, inst, constraint, num, entity, subtype_handling="including subtypes"):
53+
def step_impl(context, inst, spec_word, constraint, num, entity, subtype_handling="including subtypes"):
5454
op = misc.stmt_to_op(constraint)
5555
instances_in_model = get_entities_in_model(context, constraint, entity, subtype_handling)
5656
if not op(len(instances_in_model), num):
@@ -59,9 +59,9 @@ def step_impl(context, inst, constraint, num, entity, subtype_handling="includin
5959
)
6060

6161

62-
@gherkin_ifc.step("There must be {constraint} {num:d} instance(s) of .{entity}.")
62+
@gherkin_ifc.step("There {spec_word:must_or_should} be {constraint} {num:d} instance(s) of .{entity}.")
6363
@global_rule
64-
def step_impl(context, inst, constraint, num, entity, include_or_exclude_subtypes="including subtypes"):
64+
def step_impl(context, inst, spec_word, constraint, num, entity, include_or_exclude_subtypes="including subtypes"):
6565
"""
6666
The Given step_impl in combination with 'at least 1' is the equivalent of 'Given an IfcEntity', but without setting new applicable instances.
6767
For example:

0 commit comments

Comments
 (0)