bonsai core module imports #5178

This commit is contained in:
Andrej730
2024-08-14 15:41:52 +05:00
committed by Andrej
parent 3860884db3
commit 726bf40d58
48 changed files with 80 additions and 80 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ from typing import TYPE_CHECKING, Optional, Union
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def enable_editing_aggregate(aggregator: tool.Aggregate, obj: bpy.types.Object) -> None:
+1 -1
View File
@@ -23,7 +23,7 @@ if TYPE_CHECKING:
import bpy
import ifcopenshell
import bsdd
import blenderbim.tool as tool
import bonsai.tool as tool
def get_class_properties(client: bsdd.Client, bsdd: tool.Bsdd) -> dict[str, dict[str, Any]]:
+1 -1
View File
@@ -23,7 +23,7 @@ if TYPE_CHECKING:
import bpy
import ifcopenshell
import ifcopenshell.util.cost
import blenderbim.tool as tool
import bonsai.tool as tool
def add_cost_schedule(ifc: tool.Ifc, name: str, predefined_type: str) -> None:
+1 -1
View File
@@ -22,7 +22,7 @@ from typing import TYPE_CHECKING, Optional
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def add_instance_flooring_covering_from_cursor(ifc: tool.Ifc, root: tool.Root, spatial: tool.Spatial) -> None:
+1 -1
View File
@@ -24,7 +24,7 @@ if TYPE_CHECKING:
import bpy
import ifcopenshell
import ifcopenshell.util.representation
import blenderbim.tool as tool
import bonsai.tool as tool
def enable_editing_text(drawing: tool.Drawing, obj: bpy.types.Object) -> None:
+1 -1
View File
@@ -22,7 +22,7 @@ from typing import TYPE_CHECKING, Optional, Sequence
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def edit_object_placement(
+1 -1
View File
@@ -22,7 +22,7 @@ from typing import TYPE_CHECKING, Optional
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def add_georeferencing(georeference: tool.Georeference) -> None:
+1 -1
View File
@@ -22,7 +22,7 @@ from typing import TYPE_CHECKING, Optional, Union
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def add_material(
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.tool as tool
import bonsai.core.tool as tool
from typing import Literal
+1 -1
View File
@@ -22,7 +22,7 @@ from typing import TYPE_CHECKING, Optional, Union
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
from ifcopenshell.api.owner.add_address import ADDRESS_TYPE
from ifcopenshell.api.owner.add_actor import ACTOR_TYPE
+1 -1
View File
@@ -23,7 +23,7 @@ from typing import TYPE_CHECKING, Optional
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def run_migrate_patch(patch: tool.Patch, infile: str, outfile: str, schema: str) -> None:
+1 -1
View File
@@ -22,7 +22,7 @@ from typing import TYPE_CHECKING, Optional
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def purge_unused_profiles(ifc: tool.Ifc, profile: tool.Profile) -> int:
+1 -1
View File
@@ -22,7 +22,7 @@ from typing import TYPE_CHECKING, Optional
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def create_project(
+1 -1
View File
@@ -23,7 +23,7 @@ from typing import TYPE_CHECKING, Optional, Union, Any
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def copy_property_to_selection(
+1 -1
View File
@@ -21,7 +21,7 @@ from typing import TYPE_CHECKING
if TYPE_CHECKING:
import bpy
import blenderbim.tool as tool
import bonsai.tool as tool
def calculate_circle_radius(qto: tool.Qto, obj: bpy.types.Object) -> float:
+1 -1
View File
@@ -24,7 +24,7 @@ from typing import TYPE_CHECKING, Optional, Union, Iterable
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def load_resources(resource: tool.Resource) -> None:
+1 -1
View File
@@ -22,7 +22,7 @@ from typing import TYPE_CHECKING, Optional
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def copy_class(
+1 -1
View File
@@ -22,7 +22,7 @@ from typing import TYPE_CHECKING, Optional, Union
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def add_work_plan(ifc: tool.Ifc) -> ifcopenshell.entity_instance:
+1 -1
View File
@@ -22,7 +22,7 @@ from typing import TYPE_CHECKING, Optional, Union
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def reference_structure(
+1 -1
View File
@@ -22,7 +22,7 @@ from typing import TYPE_CHECKING, Optional, Any
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def add_style(ifc: tool.Ifc, style: tool.Style, obj: bpy.types.Material) -> ifcopenshell.entity_instance:
+2 -2
View File
@@ -17,13 +17,13 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import blenderbim.core.geometry
import bonsai.core.geometry
from typing import TYPE_CHECKING, Optional
if TYPE_CHECKING:
import bpy
import ifcopenshell
import blenderbim.tool as tool
import bonsai.tool as tool
def assign_type(
+32 -32
View File
@@ -19,224 +19,224 @@
import sys
import json
import pytest
import blenderbim.core.tool
import bonsai.core.tool
from typing import Any, Optional
from typing_extensions import Self
@pytest.fixture
def ifc():
prophet = Prophecy(blenderbim.core.tool.Ifc)
prophet = Prophecy(bonsai.core.tool.Ifc)
yield prophet
prophet.verify()
@pytest.fixture
def blender():
prophet = Prophecy(blenderbim.core.tool.Blender)
prophet = Prophecy(bonsai.core.tool.Blender)
yield prophet
prophet.verify()
@pytest.fixture
def brick():
prophet = Prophecy(blenderbim.core.tool.Brick)
prophet = Prophecy(bonsai.core.tool.Brick)
yield prophet
prophet.verify()
@pytest.fixture
def aggregate():
prophet = Prophecy(blenderbim.core.tool.Aggregate)
prophet = Prophecy(bonsai.core.tool.Aggregate)
yield prophet
prophet.verify()
@pytest.fixture
def collector():
prophet = Prophecy(blenderbim.core.tool.Collector)
prophet = Prophecy(bonsai.core.tool.Collector)
yield prophet
prophet.verify()
@pytest.fixture
def context():
prophet = Prophecy(blenderbim.core.tool.Context)
prophet = Prophecy(bonsai.core.tool.Context)
yield prophet
prophet.verify()
@pytest.fixture
def debug():
prophet = Prophecy(blenderbim.core.tool.Debug)
prophet = Prophecy(bonsai.core.tool.Debug)
yield prophet
prophet.verify()
@pytest.fixture
def demo():
prophet = Prophecy(blenderbim.core.tool.Demo)
prophet = Prophecy(bonsai.core.tool.Demo)
yield prophet
prophet.verify()
@pytest.fixture
def document():
prophet = Prophecy(blenderbim.core.tool.Document)
prophet = Prophecy(bonsai.core.tool.Document)
yield prophet
prophet.verify()
@pytest.fixture
def drawing():
prophet = Prophecy(blenderbim.core.tool.Drawing)
prophet = Prophecy(bonsai.core.tool.Drawing)
yield prophet
prophet.verify()
@pytest.fixture
def geometry():
prophet = Prophecy(blenderbim.core.tool.Geometry)
prophet = Prophecy(bonsai.core.tool.Geometry)
yield prophet
prophet.verify()
@pytest.fixture
def georeference():
prophet = Prophecy(blenderbim.core.tool.Georeference)
prophet = Prophecy(bonsai.core.tool.Georeference)
yield prophet
prophet.verify()
@pytest.fixture
def library():
prophet = Prophecy(blenderbim.core.tool.Library)
prophet = Prophecy(bonsai.core.tool.Library)
yield prophet
prophet.verify()
@pytest.fixture
def material():
prophet = Prophecy(blenderbim.core.tool.Material)
prophet = Prophecy(bonsai.core.tool.Material)
yield prophet
prophet.verify()
@pytest.fixture
def misc():
prophet = Prophecy(blenderbim.core.tool.Misc)
prophet = Prophecy(bonsai.core.tool.Misc)
yield prophet
prophet.verify()
@pytest.fixture
def nest():
prophet = Prophecy(blenderbim.core.tool.Nest)
prophet = Prophecy(bonsai.core.tool.Nest)
yield prophet
prophet.verify()
@pytest.fixture
def owner():
prophet = Prophecy(blenderbim.core.tool.Owner)
prophet = Prophecy(bonsai.core.tool.Owner)
yield prophet
prophet.verify()
@pytest.fixture
def patch():
prophet = Prophecy(blenderbim.core.tool.Patch)
prophet = Prophecy(bonsai.core.tool.Patch)
yield prophet
prophet.verify()
@pytest.fixture
def project():
prophet = Prophecy(blenderbim.core.tool.Project)
prophet = Prophecy(bonsai.core.tool.Project)
yield prophet
prophet.verify()
@pytest.fixture
def pset():
prophet = Prophecy(blenderbim.core.tool.Pset)
prophet = Prophecy(bonsai.core.tool.Pset)
yield prophet
prophet.verify()
@pytest.fixture
def qto():
prophet = Prophecy(blenderbim.core.tool.Qto)
prophet = Prophecy(bonsai.core.tool.Qto)
yield prophet
prophet.verify()
@pytest.fixture
def root():
prophet = Prophecy(blenderbim.core.tool.Root)
prophet = Prophecy(bonsai.core.tool.Root)
yield prophet
prophet.verify()
@pytest.fixture
def selector():
prophet = Prophecy(blenderbim.core.tool.Selector)
prophet = Prophecy(bonsai.core.tool.Selector)
yield prophet
prophet.verify()
@pytest.fixture
def sequence():
prophet = Prophecy(blenderbim.core.tool.Sequence)
prophet = Prophecy(bonsai.core.tool.Sequence)
yield prophet
prophet.verify()
@pytest.fixture
def spatial():
prophet = Prophecy(blenderbim.core.tool.Spatial)
prophet = Prophecy(bonsai.core.tool.Spatial)
yield prophet
prophet.verify()
@pytest.fixture
def style():
prophet = Prophecy(blenderbim.core.tool.Style)
prophet = Prophecy(bonsai.core.tool.Style)
yield prophet
prophet.verify()
@pytest.fixture
def surveyor():
prophet = Prophecy(blenderbim.core.tool.Surveyor)
prophet = Prophecy(bonsai.core.tool.Surveyor)
yield prophet
prophet.verify()
@pytest.fixture
def system():
prophet = Prophecy(blenderbim.core.tool.System)
prophet = Prophecy(bonsai.core.tool.System)
yield prophet
prophet.verify()
@pytest.fixture
def type():
prophet = Prophecy(blenderbim.core.tool.Type)
prophet = Prophecy(bonsai.core.tool.Type)
yield prophet
prophet.verify()
@pytest.fixture
def unit():
prophet = Prophecy(blenderbim.core.tool.Unit)
prophet = Prophecy(bonsai.core.tool.Unit)
yield prophet
prophet.verify()
@pytest.fixture
def voider():
prophet = Prophecy(blenderbim.core.tool.Voider)
prophet = Prophecy(bonsai.core.tool.Voider)
yield prophet
prophet.verify()
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.aggregate as subject
import bonsai.core.aggregate as subject
from test.core.bootstrap import ifc, aggregate, collector
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.attribute as subject
import bonsai.core.attribute as subject
from test.core.bootstrap import ifc
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.brick as subject
import bonsai.core.brick as subject
from test.core.bootstrap import ifc, brick
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.context as subject
import bonsai.core.context as subject
from test.core.bootstrap import ifc, context
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.debug as subject
import bonsai.core.debug as subject
from test.core.bootstrap import debug
+1 -1
View File
@@ -37,7 +37,7 @@
# We always call the module we're testing the "test subject". This makes our
# tests simple to read: just look for where the "subject" is called!
import blenderbim.core.demo as subject
import bonsai.core.demo as subject
# These are like mocks, stubs, or spy objects. They don't do anything, but they
# let us check our test expectations.
+1 -1
View File
@@ -17,7 +17,7 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.document as subject
import bonsai.core.document as subject
from test.core.bootstrap import ifc, document
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.drawing as subject
import bonsai.core.drawing as subject
from test.core.bootstrap import ifc, drawing, collector
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.geometry as subject
import bonsai.core.geometry as subject
import test.core.test_style
from test.core.bootstrap import ifc, surveyor, geometry, style
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.georeference as subject
import bonsai.core.georeference as subject
from test.core.bootstrap import ifc, georeference
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.library as subject
import bonsai.core.library as subject
from test.core.bootstrap import ifc, library
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.material as subject
import bonsai.core.material as subject
from test.core.bootstrap import ifc, material, style, spatial
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.misc as subject
import bonsai.core.misc as subject
from test.core.bootstrap import misc
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.nest as subject
import bonsai.core.nest as subject
from test.core.bootstrap import ifc, nest, collector
+1 -1
View File
@@ -17,7 +17,7 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.owner as subject
import bonsai.core.owner as subject
from test.core.bootstrap import ifc, owner
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.patch as subject
import bonsai.core.patch as subject
from test.core.bootstrap import patch
+1 -1
View File
@@ -17,7 +17,7 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.project as subject
import bonsai.core.project as subject
from test.core.bootstrap import ifc, project, spatial, georeference
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.pset as subject
import bonsai.core.pset as subject
from test.core.bootstrap import ifc, pset
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.qto as subject
import bonsai.core.qto as subject
from test.core.bootstrap import qto
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.root as subject
import bonsai.core.root as subject
import test.core.test_geometry
from test.core.bootstrap import ifc, collector, geometry, root
+1 -1
View File
@@ -17,7 +17,7 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.sequence as subject
import bonsai.core.sequence as subject
from test.core.bootstrap import ifc, sequence
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.spatial as subject
import bonsai.core.spatial as subject
from test.core.bootstrap import ifc, collector, spatial
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.style as subject
import bonsai.core.style as subject
from test.core.bootstrap import ifc, material, style, spatial
+1 -1
View File
@@ -17,7 +17,7 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.system as subject
import bonsai.core.system as subject
from test.core.bootstrap import ifc, system, spatial
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.type as subject
import bonsai.core.type as subject
from test.core.bootstrap import ifc, type, geometry
+1 -1
View File
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.core.unit as subject
import bonsai.core.unit as subject
from test.core.bootstrap import ifc, unit