mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-14 20:56:49 +00:00
Licensing and black for BIMTester and IfcBlender. See #1082.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
.PHONY: license
|
||||
license:
|
||||
copyright-header --license LGPL3 --copyright-holder "Dion Moult <dion@thinkmoult.com>" --copyright-year "2021" --copyright-software "BIMTester" --copyright-software-description "OpenBIM Auditing Tool" -a ./ -o ./
|
||||
|
||||
.PHONY: qa
|
||||
qa:
|
||||
black .
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from os.path import dirname
|
||||
from os.path import realpath
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import ifcopenshell
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
from behave.model import Scenario
|
||||
|
||||
@@ -24,19 +42,14 @@ def before_all(context):
|
||||
Scenario.continue_after_failed_step = continue_after_failed
|
||||
|
||||
# context.ifc_path = userdata.get("ifc", "")
|
||||
context.ifcfile_basename = os.path.basename(
|
||||
os.path.splitext(userdata["ifc"])[0]
|
||||
)
|
||||
context.ifcfile_basename = os.path.basename(os.path.splitext(userdata["ifc"])[0])
|
||||
context.outpath = os.path.join(this_path, "..")
|
||||
context.create_log = False
|
||||
context.create_smartview = False
|
||||
|
||||
if context.create_log is True:
|
||||
# set up log file
|
||||
context.thelogfile = os.path.join(
|
||||
context.outpath,
|
||||
context.ifcfile_basename + ".log"
|
||||
)
|
||||
context.thelogfile = os.path.join(context.outpath, context.ifcfile_basename + ".log")
|
||||
create_logfile(
|
||||
context.thelogfile,
|
||||
context.ifcfile_basename,
|
||||
@@ -61,10 +74,7 @@ def before_feature(context, feature):
|
||||
# TODO: refactor zoom smart view support into a decoupled module
|
||||
if context.create_smartview is True:
|
||||
smartview_name = context.ifcfile_basename + "_" + feature.name
|
||||
context.smview_file = os.path.join(
|
||||
context.outpath,
|
||||
smartview_name + ".bcsv"
|
||||
)
|
||||
context.smview_file = os.path.join(context.outpath, smartview_name + ".bcsv")
|
||||
# print("SmartView file: {}".format(context.smview_file))
|
||||
create_zoom_set_of_smartviews(
|
||||
context.smview_file,
|
||||
@@ -77,14 +87,6 @@ def after_step(context, step):
|
||||
if step.status == "failed" and context.create_log is True:
|
||||
append_logfile(context, step)
|
||||
|
||||
if (
|
||||
step.status == "failed"
|
||||
and context.create_smartview is True
|
||||
and hasattr(context, "falseguids")
|
||||
):
|
||||
if step.status == "failed" and context.create_smartview is True and hasattr(context, "falseguids"):
|
||||
# print(context.falseguids)
|
||||
add_smartview(
|
||||
context.smview_file,
|
||||
step.name,
|
||||
context.falseguids
|
||||
)
|
||||
add_smartview(context.smview_file, step.name, context.falseguids)
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import json
|
||||
|
||||
|
||||
@@ -20,11 +38,7 @@ def append_logfile(thecontext, step):
|
||||
logfile = open(thecontext.thelogfile, "a")
|
||||
logfile.write("\n\nStep '{}' failed\n".format(step.name))
|
||||
if hasattr(thecontext, "falseelems"):
|
||||
logfile.write("{}\n".format(
|
||||
json.dumps(thecontext.falseelems, indent=4)
|
||||
))
|
||||
logfile.write("{}\n".format(json.dumps(thecontext.falseelems, indent=4)))
|
||||
if hasattr(thecontext, "falseprops"):
|
||||
logfile.write("{}\n".format(
|
||||
json.dumps(thecontext.falseprops, indent=4)
|
||||
))
|
||||
logfile.write("{}\n".format(json.dumps(thecontext.falseprops, indent=4)))
|
||||
logfile.close()
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step, given, when, then, use_step_matcher
|
||||
|
||||
from bimtester import util
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use_step_matcher("parse")
|
||||
from bimtester.features.steps.aggregation import en
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
from bimtester.ifc import IfcStore
|
||||
@@ -8,10 +26,9 @@ from bimtester.lang import _
|
||||
def step_impl(context, fullname):
|
||||
|
||||
real_fullname = IfcStore.file.by_type("IfcApplication")[0].ApplicationFullName
|
||||
assert real_fullname == fullname , (
|
||||
assert real_fullname == fullname, (
|
||||
"The IFC file was not exported by application full name {} "
|
||||
"instead it was exported by application full name {}"
|
||||
.format(fullname, real_fullname)
|
||||
"instead it was exported by application full name {}".format(fullname, real_fullname)
|
||||
)
|
||||
|
||||
|
||||
@@ -19,10 +36,10 @@ def step_impl(context, fullname):
|
||||
def step_impl(context, identifier):
|
||||
|
||||
real_identifier = IfcStore.file.by_type("IfcApplication")[0].ApplicationIdentifier
|
||||
assert real_identifier == identifier , (
|
||||
"The IFC file was not exported by application identifier {} "
|
||||
"instead it was exported by identifier {}"
|
||||
.format(identifier, real_identifier)
|
||||
assert (
|
||||
real_identifier == identifier
|
||||
), "The IFC file was not exported by application identifier {} " "instead it was exported by identifier {}".format(
|
||||
identifier, real_identifier
|
||||
)
|
||||
|
||||
|
||||
@@ -30,18 +47,21 @@ def step_impl(context, identifier):
|
||||
def step_impl(context, version):
|
||||
|
||||
real_version = IfcStore.file.by_type("IfcApplication")[0].Version
|
||||
assert real_version == version , (
|
||||
"The IFC file was not exported by application version {} "
|
||||
"instead it was exported by version {}"
|
||||
.format(version, real_version)
|
||||
assert (
|
||||
real_version == version
|
||||
), "The IFC file was not exported by application version {} " "instead it was exported by version {}".format(
|
||||
version, real_version
|
||||
)
|
||||
|
||||
|
||||
@step('IFC data header must have a file description of "{header_file_description}" such as the new Allplan IFC exporter creates it')
|
||||
@step(
|
||||
'IFC data header must have a file description of "{header_file_description}" such as the new Allplan IFC exporter creates it'
|
||||
)
|
||||
def step_impl(context, header_file_description):
|
||||
|
||||
|
||||
is_header_file_description = IfcStore.file.wrapped_data.header.file_description.description
|
||||
assert str(is_header_file_description) == header_file_description , (
|
||||
"The file was not exported by the new ifc exporter in Allplan. File description header: {}"
|
||||
.format(is_header_file_description)
|
||||
assert (
|
||||
str(is_header_file_description) == header_file_description
|
||||
), "The file was not exported by the new ifc exporter in Allplan. File description header: {}".format(
|
||||
is_header_file_description
|
||||
)
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import ifcopenshell.util.element as eleutils
|
||||
|
||||
from behave import step
|
||||
@@ -9,50 +27,32 @@ from bimtester.lang import _
|
||||
|
||||
@step('There are exclusively "{ifc_classes}" elements only')
|
||||
def step_impl(context, ifc_classes):
|
||||
only_eleclasses(
|
||||
context,
|
||||
ifc_classes
|
||||
)
|
||||
only_eleclasses(context, ifc_classes)
|
||||
|
||||
|
||||
@step('There are no "{ifc_class}" elements')
|
||||
def step_impl(context, ifc_class):
|
||||
no_eleclass(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
no_eleclass(context, ifc_class)
|
||||
|
||||
|
||||
@step('There are no "{ifc_class}" elements because "{reason}"')
|
||||
def step_impl(context, ifc_class, reason):
|
||||
no_eleclass(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
no_eleclass(context, ifc_class)
|
||||
|
||||
|
||||
@step('All "{ifc_class}" elements class attributes have a value')
|
||||
def step_impl(context, ifc_class):
|
||||
eleclass_have_class_attributes_with_a_value(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
eleclass_have_class_attributes_with_a_value(context, ifc_class)
|
||||
|
||||
|
||||
@step('All "{ifc_class}" elements have a name given')
|
||||
def step_impl(context, ifc_class):
|
||||
eleclass_has_name_with_a_value(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
eleclass_has_name_with_a_value(context, ifc_class)
|
||||
|
||||
|
||||
@step('All "{ifc_class}" elements have a description given')
|
||||
def step_impl(context, ifc_class):
|
||||
eleclass_has_description_with_a_value(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
eleclass_has_description_with_a_value(context, ifc_class)
|
||||
|
||||
|
||||
@step('All "{ifc_class}" elements have a name matching the pattern "{pattern}"')
|
||||
@@ -76,15 +76,13 @@ def step_impl(context, ifc_class, attribute_name, attribute_value):
|
||||
|
||||
# ************************************************************************************************
|
||||
# helper
|
||||
def only_eleclasses(
|
||||
context, ifc_classes
|
||||
):
|
||||
def only_eleclasses(context, ifc_classes):
|
||||
|
||||
context.falseelems = []
|
||||
context.falseguids = []
|
||||
|
||||
# get the list of ifc_classes
|
||||
target_ifc_classes = ifc_classes.replace(" ","").split(",")
|
||||
target_ifc_classes = ifc_classes.replace(" ", "").split(",")
|
||||
# ToDo test if they exist in ifc standard, should be possible with ifcos
|
||||
|
||||
all_elements = IfcStore.file.by_type("IfcBuildingElement")
|
||||
@@ -105,13 +103,13 @@ def only_eleclasses(
|
||||
context.falsecount,
|
||||
context.falseelems,
|
||||
message_all_falseelems=_("All {elemcount} elements in the file are not {ifc_class} elements."),
|
||||
message_some_falseelems=_("{falsecount} of {elemcount} false_elements are not {ifc_class} elements: {falseelems}"),
|
||||
message_some_falseelems=_(
|
||||
"{falsecount} of {elemcount} false_elements are not {ifc_class} elements: {falseelems}"
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
def no_eleclass(
|
||||
context, ifc_class
|
||||
):
|
||||
def no_eleclass(context, ifc_class):
|
||||
|
||||
context.falseelems = []
|
||||
context.falseguids = []
|
||||
@@ -134,11 +132,10 @@ def no_eleclass(
|
||||
)
|
||||
|
||||
|
||||
def eleclass_have_class_attributes_with_a_value(
|
||||
context, ifc_class
|
||||
):
|
||||
def eleclass_have_class_attributes_with_a_value(context, ifc_class):
|
||||
|
||||
from ifcopenshell.ifcopenshell_wrapper import schema_by_name
|
||||
|
||||
# schema = schema_by_name("IFC2X3")
|
||||
schema = schema_by_name(IfcStore.file.schema)
|
||||
class_attributes = []
|
||||
@@ -172,10 +169,14 @@ def eleclass_have_class_attributes_with_a_value(
|
||||
context.elemcount,
|
||||
context.falsecount,
|
||||
context.falseelems,
|
||||
message_all_falseelems=_("For all {elemcount} {ifc_class} elements at least one of these class attributes {parameter} has no value."),
|
||||
message_some_falseelems=_("For the following {falsecount} out of {elemcount} {ifc_class} elements at least one of these class attributes {parameter} has no value: {falseelems}"),
|
||||
message_all_falseelems=_(
|
||||
"For all {elemcount} {ifc_class} elements at least one of these class attributes {parameter} has no value."
|
||||
),
|
||||
message_some_falseelems=_(
|
||||
"For the following {falsecount} out of {elemcount} {ifc_class} elements at least one of these class attributes {parameter} has no value: {falseelems}"
|
||||
),
|
||||
message_no_elems=_("There are no {ifc_class} elements in the IFC file."),
|
||||
parameter=failed_attribs
|
||||
parameter=failed_attribs,
|
||||
)
|
||||
|
||||
|
||||
@@ -190,7 +191,7 @@ def eleclass_has_name_with_a_value(context, ifc_class):
|
||||
if not elem.Name:
|
||||
context.falseelems.append(str(elem))
|
||||
context.falseguids.append(elem.GlobalId)
|
||||
|
||||
|
||||
context.elemcount = len(elements)
|
||||
context.falsecount = len(context.falseelems)
|
||||
util.assert_elements(
|
||||
@@ -199,14 +200,14 @@ def eleclass_has_name_with_a_value(context, ifc_class):
|
||||
context.falsecount,
|
||||
context.falseelems,
|
||||
message_all_falseelems=_("The name of all {elemcount} elements is not set."),
|
||||
message_some_falseelems=_("The name of {falsecount} out of {elemcount} {ifc_class} elements is not set: {falseelems}"),
|
||||
message_some_falseelems=_(
|
||||
"The name of {falsecount} out of {elemcount} {ifc_class} elements is not set: {falseelems}"
|
||||
),
|
||||
message_no_elems=_("There are no {ifc_class} elements in the IFC file."),
|
||||
)
|
||||
|
||||
|
||||
def eleclass_has_description_with_a_value(
|
||||
context, ifc_class
|
||||
):
|
||||
def eleclass_has_description_with_a_value(context, ifc_class):
|
||||
|
||||
context.falseelems = []
|
||||
context.falseguids = []
|
||||
@@ -217,7 +218,7 @@ def eleclass_has_description_with_a_value(
|
||||
if not elem.Description:
|
||||
context.falseelems.append(str(elem))
|
||||
context.falseguids.append(elem.GlobalId)
|
||||
|
||||
|
||||
context.elemcount = len(elements)
|
||||
context.falsecount = len(context.falseelems)
|
||||
util.assert_elements(
|
||||
@@ -226,8 +227,8 @@ def eleclass_has_description_with_a_value(
|
||||
context.falsecount,
|
||||
context.falseelems,
|
||||
message_all_falseelems=_("The description of all {elemcount} elements is not set."),
|
||||
message_some_falseelems=_("The description of {falsecount} out of {elemcount} {ifc_class} elements is not set: {falseelems}"),
|
||||
message_some_falseelems=_(
|
||||
"The description of {falsecount} out of {elemcount} {ifc_class} elements is not set: {falseelems}"
|
||||
),
|
||||
message_no_elems=_("There are no {ifc_class} elements in the IFC file."),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
from behave import use_step_matcher
|
||||
|
||||
@@ -8,12 +26,7 @@ from bimtester.lang import _
|
||||
|
||||
@step('All "{ifc_class}" elements have an "{aproperty}" property in the "{pset}" pset')
|
||||
def step_impl(context, ifc_class, aproperty, pset):
|
||||
eleclass_has_property_in_pset(
|
||||
context,
|
||||
ifc_class,
|
||||
aproperty,
|
||||
pset
|
||||
)
|
||||
eleclass_has_property_in_pset(context, ifc_class, aproperty, pset)
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
@@ -25,16 +38,13 @@ use_step_matcher("re")
|
||||
@step(r"All (?P<ifc_class>.*) elements have an? (?P<property_path>.*\..*) property")
|
||||
def step_impl(context, ifc_class, property_path):
|
||||
import re
|
||||
|
||||
pset, aproperty = property_path.split(".")
|
||||
eleclass_has_property_in_pset(
|
||||
context,
|
||||
ifc_class,
|
||||
aproperty,
|
||||
pset
|
||||
)
|
||||
eleclass_has_property_in_pset(context, ifc_class, aproperty, pset)
|
||||
|
||||
|
||||
@step(r'All (?P<ifc_class>.*) elements have an? (?P<property_path>.*\..*) property value matching the pattern "(?P<pattern>.*)"'
|
||||
@step(
|
||||
r'All (?P<ifc_class>.*) elements have an? (?P<property_path>.*\..*) property value matching the pattern "(?P<pattern>.*)"'
|
||||
)
|
||||
def step_impl(context, ifc_class, property_path, pattern):
|
||||
import re
|
||||
@@ -46,13 +56,13 @@ def step_impl(context, ifc_class, property_path, pattern):
|
||||
|
||||
psets = get_psets(element)
|
||||
|
||||
if not pset_name in psets:
|
||||
if not pset_name in psets:
|
||||
assert False
|
||||
|
||||
|
||||
pset = psets[pset_name]
|
||||
if not property_name in pset:
|
||||
assert False
|
||||
|
||||
|
||||
prop = pset[property_name]
|
||||
# get_psets returns just strings
|
||||
|
||||
@@ -60,9 +70,7 @@ def step_impl(context, ifc_class, property_path, pattern):
|
||||
assert False
|
||||
|
||||
|
||||
def eleclass_has_property_in_pset(
|
||||
context, ifc_class, aproperty, pset
|
||||
):
|
||||
def eleclass_has_property_in_pset(context, ifc_class, aproperty, pset):
|
||||
context.falseelems = []
|
||||
context.falseguids = []
|
||||
context.falseprops = {}
|
||||
@@ -84,9 +92,13 @@ def eleclass_has_property_in_pset(
|
||||
context.falsecount,
|
||||
context.falseelems,
|
||||
# TODO: Translate these messages into other languages
|
||||
message_all_falseelems=_("All {elemcount} {ifc_class} elements are missing the property {parameter} in the pset."),
|
||||
message_some_falseelems=_("The following {falsecount} of {elemcount} {ifc_class} elements are missing the property {parameter} in the pset: {falseelems}"),
|
||||
message_all_falseelems=_(
|
||||
"All {elemcount} {ifc_class} elements are missing the property {parameter} in the pset."
|
||||
),
|
||||
message_some_falseelems=_(
|
||||
"The following {falsecount} of {elemcount} {ifc_class} elements are missing the property {parameter} in the pset: {falseelems}"
|
||||
),
|
||||
message_no_elems=_("There are no {ifc_class} elements in the IFC file."),
|
||||
parameter=aproperty
|
||||
parameter=aproperty,
|
||||
)
|
||||
# the pset name is missing in the failing message, but it is in the step test name
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
# from bimtester import util
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import json
|
||||
from behave import step
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
from bimtester import util
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step, use_step_matcher
|
||||
|
||||
from bimtester import util
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import math
|
||||
import numpy as np
|
||||
import ifcopenshell
|
||||
@@ -244,6 +262,6 @@ def step_impl(context, guid):
|
||||
util.assert_type(site, "IfcSite")
|
||||
if not site.ObjectPlacement:
|
||||
assert False, _("The site has no object placement")
|
||||
site_placement = ifcopenshell.util.placement.get_local_placement(site.ObjectPlacement)[:,3][0:3]
|
||||
site_placement = ifcopenshell.util.placement.get_local_placement(site.ObjectPlacement)[:, 3][0:3]
|
||||
origin = np.array([0, 0, 0])
|
||||
assert np.allclose(origin, site_placement), _('The site location is at "{}" instead of "{}"')
|
||||
|
||||
@@ -1,6 +1,26 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
|
||||
@step('Alle "{ifc_class}" Bauteile müssen eine geometrische Repräsentation der Klasse "{representation_class}" verwenden')
|
||||
@step(
|
||||
'Alle "{ifc_class}" Bauteile müssen eine geometrische Repräsentation der Klasse "{representation_class}" verwenden'
|
||||
)
|
||||
def step_impl(context, ifc_class, representation_class):
|
||||
context.execute_steps(f'* All {ifc_class} elements have an "{representation_class}" representation')
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
from bimtester import util
|
||||
@@ -32,21 +50,12 @@ def step_impl(context, number):
|
||||
|
||||
@step('All "{ifc_class}" elements have an "{representation_class}" representation')
|
||||
def step_impl(context, ifc_class, representation_class):
|
||||
eleclass_has_geometric_representation_of_specific_class(
|
||||
context,
|
||||
ifc_class,
|
||||
representation_class
|
||||
)
|
||||
eleclass_has_geometric_representation_of_specific_class(context, ifc_class, representation_class)
|
||||
|
||||
|
||||
# ************************************************************************************************
|
||||
# helper
|
||||
def eleclass_has_geometric_representation_of_specific_class(
|
||||
context,
|
||||
ifc_class,
|
||||
representation_class
|
||||
):
|
||||
|
||||
def eleclass_has_geometric_representation_of_specific_class(context, ifc_class, representation_class):
|
||||
def is_item_a_representation(item, representation):
|
||||
if "/" in representation:
|
||||
for cls in representation.split("/"):
|
||||
@@ -90,7 +99,9 @@ def eleclass_has_geometric_representation_of_specific_class(
|
||||
context.falsecount,
|
||||
context.falseelems,
|
||||
message_all_falseelems=_("All {elemcount} {ifc_class} elements are not a {parameter} representation."),
|
||||
message_some_falseelems=_("The following {falsecount} of {elemcount} {ifc_class} elements are not a {parameter} representation: {falseelems}"),
|
||||
message_some_falseelems=_(
|
||||
"The following {falsecount} of {elemcount} {ifc_class} elements are not a {parameter} representation: {falseelems}"
|
||||
),
|
||||
message_no_elems=_("There are no {ifc_class} elements in the IFC file."),
|
||||
parameter=representation_class
|
||||
parameter=representation_class,
|
||||
)
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import ifcopenshell.util.geolocation
|
||||
import ifcopenshell.util.placement
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
from bimtester import util
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,28 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
from bimtester.ifc import IfcStore
|
||||
from bimtester.lang import _
|
||||
|
||||
|
||||
@step('All buildings have an address')
|
||||
@step("All buildings have an address")
|
||||
def step_impl(context):
|
||||
for building in IfcStore.file.by_type("IfcBuilding"):
|
||||
if not building.BuildingAddress:
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import fileinput
|
||||
import uuid
|
||||
|
||||
@@ -38,20 +56,12 @@ def add_smartview(sm_file, smartview_name, guids):
|
||||
|
||||
# build the smartview string
|
||||
smview_string = " <SMARTVIEW>\n"
|
||||
smview_string += (
|
||||
" <TITLE>GUID filter, {}</TITLE>\n"
|
||||
.format(smartview_name)
|
||||
)
|
||||
smview_string += " <TITLE>GUID filter, {}</TITLE>\n".format(smartview_name)
|
||||
smview_string += "{}\n".format(each_smartview_string_before1)
|
||||
smview_string += str(uuid.uuid4()) # create and add a smart view guid
|
||||
smview_string += "{}\n".format(each_smartview_string_before2)
|
||||
for guid in guids:
|
||||
smview_string += (
|
||||
"{}{}{}\n".format(
|
||||
rule_string_before,
|
||||
guid,
|
||||
rule_string_after)
|
||||
)
|
||||
smview_string += "{}{}{}\n".format(rule_string_before, guid, rule_string_after)
|
||||
smview_string += "{}\n".format(each_smartview_string_after)
|
||||
|
||||
# insert smartview string into file
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import json
|
||||
import sys
|
||||
@@ -47,9 +65,7 @@ class GuiWidgetBimTester(QtWidgets.QWidget):
|
||||
|
||||
def _setup_ui(self):
|
||||
package_path = os.path.dirname(os.path.realpath(__file__))
|
||||
iconpath = os.path.join(
|
||||
package_path, "resources", "icons", "bimtester.ico"
|
||||
)
|
||||
iconpath = os.path.join(package_path, "resources", "icons", "bimtester.ico")
|
||||
|
||||
"""
|
||||
# as svg
|
||||
@@ -87,14 +103,8 @@ class GuiWidgetBimTester(QtWidgets.QWidget):
|
||||
_ifcfile_browse_btn.clicked.connect(self.select_ifcfile)
|
||||
|
||||
# buttons
|
||||
self.run_button = QtWidgets.QPushButton(
|
||||
QtGui.QIcon.fromTheme("document-new"),
|
||||
"Run"
|
||||
)
|
||||
self.close_button = QtWidgets.QPushButton(
|
||||
QtGui.QIcon.fromTheme("window-close"),
|
||||
"Close"
|
||||
)
|
||||
self.run_button = QtWidgets.QPushButton(QtGui.QIcon.fromTheme("document-new"), "Run")
|
||||
self.close_button = QtWidgets.QPushButton(QtGui.QIcon.fromTheme("window-close"), "Close")
|
||||
self.run_button.clicked.connect(self.run_bimtester)
|
||||
self.close_button.clicked.connect(self.close_widget)
|
||||
_buttons = QtWidgets.QHBoxLayout()
|
||||
@@ -121,9 +131,7 @@ class GuiWidgetBimTester(QtWidgets.QWidget):
|
||||
self.setLayout(layout)
|
||||
|
||||
def select_ifcfile(self):
|
||||
ifcfile = QtWidgets.QFileDialog.getOpenFileName(
|
||||
self, dir=self.get_ifcfile()
|
||||
)[0]
|
||||
ifcfile = QtWidgets.QFileDialog.getOpenFileName(self, dir=self.get_ifcfile())[0]
|
||||
self.set_ifcfile(ifcfile)
|
||||
|
||||
def set_ifcfile(self, a_file):
|
||||
@@ -135,9 +143,7 @@ class GuiWidgetBimTester(QtWidgets.QWidget):
|
||||
return " ".join(self.ifcfile_text.text().split())
|
||||
|
||||
def select_featurefile(self):
|
||||
featurefile = QtWidgets.QFileDialog.getOpenFileName(
|
||||
self, dir=self.get_ifcfile()
|
||||
)[0]
|
||||
featurefile = QtWidgets.QFileDialog.getOpenFileName(self, dir=self.get_ifcfile())[0]
|
||||
self.set_featurefile(featurefile)
|
||||
|
||||
def set_featurefile(self, a_file):
|
||||
@@ -176,24 +182,15 @@ class GuiWidgetBimTester(QtWidgets.QWidget):
|
||||
if has_feature_file is True and has_ifc_file is True:
|
||||
print("Args passed from BIMtester GUI:")
|
||||
print(json.dumps(self.args, indent=4))
|
||||
report_json = bimtester.run.TestRunner(
|
||||
self.args["ifc"],
|
||||
self.args["schema_file"]
|
||||
).run(self.args)
|
||||
report_json = bimtester.run.TestRunner(self.args["ifc"], self.args["schema_file"]).run(self.args)
|
||||
else:
|
||||
print("Missing files, BIMTester can not run.")
|
||||
report_json = ""
|
||||
|
||||
# create html report
|
||||
if os.path.isfile(report_json):
|
||||
report_html = os.path.join(
|
||||
os.path.dirname(os.path.realpath(report_json)),
|
||||
"report.html"
|
||||
)
|
||||
bimtester.reports.ReportGenerator().generate(
|
||||
report_json,
|
||||
report_html
|
||||
)
|
||||
report_html = os.path.join(os.path.dirname(os.path.realpath(report_json)), "report.html")
|
||||
bimtester.reports.ReportGenerator().generate(report_json, report_html)
|
||||
print("HTML report generated: {}".format(report_html))
|
||||
elif report_json == "":
|
||||
report_html = ""
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
class IfcStore:
|
||||
path = ""
|
||||
file = None
|
||||
|
||||
@@ -1,7 +1,26 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import gettext
|
||||
|
||||
translation = None
|
||||
|
||||
|
||||
def _(message):
|
||||
if translation:
|
||||
return translation(message)
|
||||
@@ -14,15 +33,11 @@ def switch_locale(locale_dir, locale_id):
|
||||
# https://docs.python.org/3/library/gettext.html
|
||||
mo_file = gettext.find(domain, localedir=locale_dir, languages=[locale_id])
|
||||
if mo_file is not None:
|
||||
print(
|
||||
"Locale will be switched to language '{}'. Translation file found {}"
|
||||
.format(locale_id, mo_file)
|
||||
)
|
||||
print("Locale will be switched to language '{}'. Translation file found {}".format(locale_id, mo_file))
|
||||
newlang = gettext.translation(domain, localedir=locale_dir, languages=[locale_id])
|
||||
newlang.install()
|
||||
translation = newlang.gettext
|
||||
else:
|
||||
print(
|
||||
"Locale can not be switched to '{}'. Translation file (*.mo) not found in {}"
|
||||
.format(locale_id, locale_dir)
|
||||
"Locale can not be switched to '{}'. Translation file (*.mo) not found in {}".format(locale_id, locale_dir)
|
||||
)
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import datetime
|
||||
import json
|
||||
import os
|
||||
@@ -55,6 +73,7 @@ class ReportGenerator:
|
||||
# get language and switch locale
|
||||
the_lang = self.get_feature_lang(feature.get("keyword", None))
|
||||
from bimtester.lang import switch_locale
|
||||
|
||||
switch_locale(os.path.join(self.base_path, "locale"), the_lang)
|
||||
data["_lang"] = the_lang
|
||||
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
<!--
|
||||
BIMTester - OpenBIM Auditing Tool
|
||||
Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
|
||||
This file is part of BIMTester.
|
||||
|
||||
BIMTester is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
BIMTester is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang={{_lang}}>
|
||||
<head>
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
@@ -19,6 +37,7 @@ from behave.__main__ import main as behave_main
|
||||
# TODO: refactor when this isn't super experimental
|
||||
from logging import StreamHandler
|
||||
|
||||
|
||||
class IDSHandler(StreamHandler):
|
||||
def __init__(self):
|
||||
StreamHandler.__init__(self)
|
||||
@@ -27,13 +46,8 @@ class IDSHandler(StreamHandler):
|
||||
"status": "passed",
|
||||
"location": "filename.xml",
|
||||
"elements": [
|
||||
{
|
||||
"keyword": "Scenario",
|
||||
"name": "Checking IDS specifications",
|
||||
"status": "passed",
|
||||
"steps": []
|
||||
}
|
||||
]
|
||||
{"keyword": "Scenario", "name": "Checking IDS specifications", "status": "passed", "steps": []}
|
||||
],
|
||||
}
|
||||
|
||||
def emit(self, record):
|
||||
@@ -43,17 +57,19 @@ class IDSHandler(StreamHandler):
|
||||
if is_fail:
|
||||
self.results["status"] = "failed"
|
||||
self.results["elements"][0]["status"] = "failed"
|
||||
self.results["elements"][0]["steps"].append({
|
||||
"keyword": "*",
|
||||
"match": {},
|
||||
"name": msg,
|
||||
"result": {
|
||||
"duration": 0.0,
|
||||
"error_message": "Assertion Failed",
|
||||
"status": "failed" if is_fail else "passed"
|
||||
},
|
||||
"step_type": "given"
|
||||
})
|
||||
self.results["elements"][0]["steps"].append(
|
||||
{
|
||||
"keyword": "*",
|
||||
"match": {},
|
||||
"name": msg,
|
||||
"result": {
|
||||
"duration": 0.0,
|
||||
"error_message": "Assertion Failed",
|
||||
"status": "failed" if is_fail else "passed",
|
||||
},
|
||||
"step_type": "given",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class TestRunner:
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
|
||||
@@ -16,4 +34,4 @@ class TableModel:
|
||||
return len(self.rows)
|
||||
|
||||
def get_count_distinct_values(self):
|
||||
return len(set(item for sublist in self.rows.values() for item in sublist))
|
||||
return len(set(item for sublist in self.rows.values() for item in sublist))
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import ifcopenshell
|
||||
import ifcopenshell.util.element
|
||||
import ifcopenshell.validate
|
||||
@@ -95,7 +113,7 @@ def assert_elements(
|
||||
message_all_falseelems,
|
||||
message_some_falseelems,
|
||||
message_no_elems="",
|
||||
parameter=None
|
||||
parameter=None,
|
||||
):
|
||||
out_falseelems = "\n"
|
||||
for e in falseelems:
|
||||
@@ -112,42 +130,27 @@ def assert_elements(
|
||||
# )
|
||||
# )
|
||||
if falsecount == 0:
|
||||
return # test ok for elemcount == 0 and elemcount > 0
|
||||
return # test ok for elemcount == 0 and elemcount > 0
|
||||
elif falsecount == elemcount:
|
||||
if parameter is None:
|
||||
assert False, (
|
||||
message_all_falseelems.format(
|
||||
elemcount=elemcount,
|
||||
ifc_class=ifc_class
|
||||
)
|
||||
)
|
||||
assert False, message_all_falseelems.format(elemcount=elemcount, ifc_class=ifc_class)
|
||||
else:
|
||||
assert False, (
|
||||
message_all_falseelems.format(
|
||||
elemcount=elemcount,
|
||||
ifc_class=ifc_class,
|
||||
parameter=parameter
|
||||
)
|
||||
)
|
||||
assert False, message_all_falseelems.format(elemcount=elemcount, ifc_class=ifc_class, parameter=parameter)
|
||||
elif falsecount > 0 and falsecount < elemcount:
|
||||
if parameter is None:
|
||||
assert False, (
|
||||
message_some_falseelems.format(
|
||||
falsecount=falsecount,
|
||||
elemcount=elemcount,
|
||||
ifc_class=ifc_class,
|
||||
falseelems=out_falseelems,
|
||||
)
|
||||
assert False, message_some_falseelems.format(
|
||||
falsecount=falsecount,
|
||||
elemcount=elemcount,
|
||||
ifc_class=ifc_class,
|
||||
falseelems=out_falseelems,
|
||||
)
|
||||
else:
|
||||
assert False, (
|
||||
message_some_falseelems.format(
|
||||
falsecount=falsecount,
|
||||
elemcount=elemcount,
|
||||
ifc_class=ifc_class,
|
||||
falseelems=out_falseelems,
|
||||
parameter=parameter
|
||||
)
|
||||
assert False, message_some_falseelems.format(
|
||||
falsecount=falsecount,
|
||||
elemcount=elemcount,
|
||||
ifc_class=ifc_class,
|
||||
falseelems=out_falseelems,
|
||||
parameter=parameter,
|
||||
)
|
||||
else:
|
||||
assert False, _("Error in falsecount calculation, something went wrong.")
|
||||
|
||||
@@ -1,5 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
import os
|
||||
import argparse
|
||||
import bimtester.clean
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step, given, when, then, use_step_matcher
|
||||
|
||||
use_step_matcher("parse")
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from behave import step
|
||||
|
||||
from utils import IfcFile
|
||||
|
||||
@@ -1,5 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# BIMTester - OpenBIM Auditing Tool
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BIMTester.
|
||||
#
|
||||
# BIMTester is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BIMTester is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from bimtester.guiwidget import run
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
<!--
|
||||
BIMTester - OpenBIM Auditing Tool
|
||||
Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
|
||||
This file is part of BIMTester.
|
||||
|
||||
BIMTester is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
BIMTester is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
/*
|
||||
* BIMTester - OpenBIM Auditing Tool
|
||||
* Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
*
|
||||
* This file is part of BIMTester.
|
||||
*
|
||||
* BIMTester is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* BIMTester is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400&display=swap');
|
||||
|
||||
* {
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
/*
|
||||
* BIMTester - OpenBIM Auditing Tool
|
||||
* Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
*
|
||||
* This file is part of BIMTester.
|
||||
*
|
||||
* BIMTester is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* BIMTester is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with BIMTester. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* Hacky mockup */
|
||||
let elements = document.getElementsByTagName('input');
|
||||
for (let i=0; i<elements.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user