From fa07f184c36e69cb380f994b72328c09855f902f Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 29 Oct 2024 18:16:45 +0500 Subject: [PATCH] ifctester - indicate optionality in report message Previously for both cardinality optional/required ifctester would show same results. E.g. Were resulting in something like LoadBearing data shall be true and in the dataset Pset_WallCommon LoadBearing data shall be true and in the dataset Pset_WallCommon Now it will result in LoadBearing data shall be true and in the dataset Pset_WallCommon LoadBearing data may be true and in the dataset Pset_WallCommon --- src/ifctester/ifctester/facet.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ifctester/ifctester/facet.py b/src/ifctester/ifctester/facet.py index d7e68efcdc..05c786e5d0 100644 --- a/src/ifctester/ifctester/facet.py +++ b/src/ifctester/ifctester/facet.py @@ -133,6 +133,10 @@ class Facet: if requirement.cardinality == "prohibited": is_prohibited = not is_prohibited templates = self.prohibited_templates if is_prohibited else self.requirement_templates + if requirement.cardinality == "optional": + templates = [ + t.replace("shall", "may").replace("Shall", "May").replace("must", "may") for t in templates + ] for template in templates: total_variables = len(template) - len(template.replace("{", ""))