mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 06:52:39 +00:00
BuildingSmart IFCRail changes to BIMTester (#1309)
* Add a way to validate the IFC file in BIMTester * Fix an issue in Report where only the first error was shown * Fix the usage of Schema in BIMTester * Add Aggreation steps to BIMTester
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
from collections import defaultdict
|
||||
|
||||
|
||||
class TableModel:
|
||||
"""This class represents a table of data"""
|
||||
|
||||
def __init__(self, key_name=None, value_name=None):
|
||||
self.rows = defaultdict(list)
|
||||
self.key_name = key_name
|
||||
self.value_name = value_name
|
||||
|
||||
def add_row(self, related, relating):
|
||||
self.rows[related].append(relating)
|
||||
|
||||
def get_count(self):
|
||||
return len(self.rows)
|
||||
|
||||
def get_count_distinct_values(self):
|
||||
return len(set(item for sublist in self.rows.values() for item in sublist))
|
||||
Reference in New Issue
Block a user