mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +00:00
ifcopenshell.validate - remove simple_spf dependency (689289b)
Moved it to `TYPE_CHECKING` since it's currently used just for typing. Was breaking validation in Bonsai since it doesn't provide all submodules with IfcOpenShell https://github.com/IfcOpenShell/IfcOpenShell/issues/6723#issuecomment-3016223786 Also added a simple test so github workflow would catch a simple error like this.
This commit is contained in:
@@ -26,3 +26,9 @@ Scenario: Use the inspector - inspect from object
|
|||||||
When the object "IfcProject/My Project" is selected
|
When the object "IfcProject/My Project" is selected
|
||||||
And I press "bim.inspect_from_object"
|
And I press "bim.inspect_from_object"
|
||||||
Then nothing happens
|
Then nothing happens
|
||||||
|
|
||||||
|
Scenario: Run IFC validation
|
||||||
|
Given an empty IFC project
|
||||||
|
And I load the demo construction library
|
||||||
|
And I press "bim.validate_ifc_file"
|
||||||
|
Then nothing happens
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ options:
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
@@ -50,7 +51,7 @@ import types
|
|||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from typing import Union, Any, Optional
|
from typing import Union, Any, Optional, TYPE_CHECKING
|
||||||
from collections.abc import Iterator
|
from collections.abc import Iterator
|
||||||
from logging import Logger, Handler
|
from logging import Logger, Handler
|
||||||
|
|
||||||
@@ -60,11 +61,13 @@ else:
|
|||||||
EllipsisType = type(...)
|
EllipsisType = type(...)
|
||||||
|
|
||||||
import ifcopenshell
|
import ifcopenshell
|
||||||
import ifcopenshell.simple_spf
|
|
||||||
import ifcopenshell.ifcopenshell_wrapper
|
import ifcopenshell.ifcopenshell_wrapper
|
||||||
import ifcopenshell.ifcopenshell_wrapper as W
|
import ifcopenshell.ifcopenshell_wrapper as W
|
||||||
import ifcopenshell.express.rule_executor
|
import ifcopenshell.express.rule_executor
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
import ifcopenshell.simple_spf
|
||||||
|
|
||||||
named_type = ifcopenshell.ifcopenshell_wrapper.named_type
|
named_type = ifcopenshell.ifcopenshell_wrapper.named_type
|
||||||
aggregation_type = ifcopenshell.ifcopenshell_wrapper.aggregation_type
|
aggregation_type = ifcopenshell.ifcopenshell_wrapper.aggregation_type
|
||||||
simple_type = ifcopenshell.ifcopenshell_wrapper.simple_type
|
simple_type = ifcopenshell.ifcopenshell_wrapper.simple_type
|
||||||
|
|||||||
Reference in New Issue
Block a user