Skip to content

170 ifc check via ids#809

Open
Cudok wants to merge 223 commits intodevelopmentfrom
170-ifc_check_via_IDS
Open

170 ifc check via ids#809
Cudok wants to merge 223 commits intodevelopmentfrom
170-ifc_check_via_IDS

Conversation

@Cudok
Copy link
Contributor

@Cudok Cudok commented Jun 10, 2025

implementation of ifc check include IDS support

@Cudok Cudok self-assigned this Jun 10, 2025
@Cudok Cudok linked an issue Jun 10, 2025 that may be closed by this pull request
8 tasks
@Cudok Cudok force-pushed the 170-ifc_check_via_IDS branch from 391c93a to b55da76 Compare June 25, 2025 13:00
@Cudok Cudok force-pushed the 170-ifc_check_via_IDS branch from a5bea01 to a4dc9d0 Compare August 26, 2025 09:36
@Cudok Cudok force-pushed the 170-ifc_check_via_IDS branch from ebe1d22 to 98d4efa Compare September 24, 2025 18:00
@Cudok Cudok force-pushed the 170-ifc_check_via_IDS branch from 5e4290a to 6a7b91c Compare October 22, 2025 12:15
@Cudok Cudok force-pushed the 170-ifc_check_via_IDS branch from 5c9154b to 2155865 Compare November 13, 2025 08:12
@Cudok Cudok force-pushed the 170-ifc_check_via_IDS branch from 94c318a to 6ad5b2a Compare December 10, 2025 14:28
@Cudok Cudok requested review from veronikarichter and removed request for veronikarichter January 30, 2026 15:57
@Cudok Cudok force-pushed the 170-ifc_check_via_IDS branch from 71cc31c to e497971 Compare January 30, 2026 16:12
@Cudok Cudok requested a review from veronikarichter January 30, 2026 21:42
Cudok added 27 commits February 19, 2026 14:02
and add underscore to file path
hopefully the integration test are running
not possible to use, because sim_settings are not part of the base sim_settings
to resolve the dependencies of the PluginIFCCheck
the ifccheck task is moved to a new group
this group should deal with preprocessing of ifc files
and implementation for ids check
and implemented vor report summary_prop
into other test functions
Copy link
Member

@veronikarichter veronikarichter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the revision! Some points remain. Please also consider reformatting the files for a maximum line length of 79 characters and double check spacing and indentation.

Holds a plugin with only base tasks mostly for demonstration.
"""
from bim2sim.plugins import Plugin
from bim2sim.tasks import prepro, common, bps
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rather use a more common name instead prepro, either 'preprocessing' or something like 'check', since the ifc check is not really a preprocessing (it does not modify the data) but just a preliminary check.

Also, the import of 'bps' is obsolete. Please remove.

"""
from bim2sim.plugins import Plugin
from bim2sim.tasks import prepro, common, bps
from bim2sim.sim_settings import BuildingSimSettings
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from bim2sim.sim_settings import BuildingSimSettings

not used.

Comment on lines +23 to +25
mandatory=False # TODO make is mandatory AND
# adapt all tests and examples AND
# remove default values in check_ifc.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why this is not yet set to mandatory? Since the IFC check is now a separate plugin, the IDS check could be set to mandatory.
In some cases, an IDS check may not be applicable. Could you add a sim_setting if the IFC Check should be executed with or without the IDS checking part? If there is a separate sim_setting to enable the IDS functionality, it may be feasible to keep mandatory=False here.

Comment on lines +131 to +163
# xpaths to elements in html
# fail percent (unique)
xpath_fail_perc = '//div[@class="fail percent"]'
# create function for xpath generation
xpath_ids_var = Gen_xpath(
xpath_incl_var = ('//p/span[@class="item" and ' +
'contains(normalize-space(.),"{}")]/ strong[{}]'))

# Specifications passed
xpath_spec_pass = xpath_ids_var.gen_xpath_name_pos("Specifications passed", 1)
# Specifications total
xpath_spec_total = xpath_ids_var.gen_xpath_name_pos("Specifications passed", 2)
# Requirements passed
xpath_req_pass = xpath_ids_var.gen_xpath_name_pos("Requirements passed", 1)
# Requirements total
xpath_req_total = xpath_ids_var.gen_xpath_name_pos("Requirements passed", 2)
# Checks passed
xpath_checks_pass = xpath_ids_var.gen_xpath_name_pos("Checks passed", 1)
# Checks total
xpath_checks_total = xpath_ids_var.gen_xpath_name_pos("Checks passed", 2)

self.xpaths = [
xpath_fail_perc,
xpath_spec_pass, xpath_spec_total,
xpath_req_pass, xpath_req_total,
xpath_checks_pass, xpath_checks_total]

reg_result = self.run_regression_test()

self.assertTrue(reg_result[0], "Comparison of the ifc tester " +
"html reports (IDS) fails. " +
"expected: {} ".format(reg_result[1]) +
"test: {}".format(reg_result[2]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion this is still to complicated for a generalized regression test. If I would need to add another regression test for either the ifctester, the summary_prop, the summary_inst or the summary, I would need to write additional full tests which are prone to errors. I assume the structure of the html-result files won't chance across example files (e.g., if I would try to setup another regression test for the DigitalHub), but I would still need to write a quite lenghty test (instead of applying a evaluate_summary function or similar).

You can still decide to keep it like it is, but in my opinion its too hard to handle and adapt to other test cases.


def test_run_ifc_check_fzk_haus_sum_prop(self):
"""Run IFCCheck regression test with AC20-FZK-Haus.ifc
checking the html report "summary_prop" generated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is summary_prop? please clarify.


return (all_guids_unique, double_guids)

def run_check_guid_empty(ifc_file) -> (bool, dict):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above. Please add is this supposed to be self?

used_guids[guid] = inst

return (all_guids_filled, empty_guids)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

else:
version_error = False
return (version_error, schema)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

all_guids_unique = False
warnings.warn(
"Some GUIDs are not unique! A bijective ifc file have "
"to have unique GUIDs. But bim2sim provides a option "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"to have unique GUIDs. But bim2sim provides a option "
"to have unique GUIDs. But bim2sim provides an option "

"Some GUIDs are not unique (for transformed GUIDS "
"letters lowcase into uppercase)! "
"A bijective ifc file have "
"to have unique GUIDs. But bim2sim provides a option "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"to have unique GUIDs. But bim2sim provides a option "
"to have unique GUIDs. But bim2sim provides an option "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

integrate common tasks for validation

2 participants