Sort imports

This commit is contained in:
Andrej730
2025-12-19 18:53:04 +05:00
parent 29176330e8
commit 13be6ccd45
731 changed files with 2234 additions and 1709 deletions
+5 -4
View File
@@ -18,13 +18,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcTester. If not, see <http://www.gnu.org/licenses/>.
import time
import argparse
import ifcopenshell
from . import ids
from . import reporter
import time
from pathlib import Path
import ifcopenshell
from . import ids, reporter
parser = argparse.ArgumentParser(description="Uses an IDS to audit an IFC")
parser.add_argument("ids", type=str, help="Path to an IDS")
parser.add_argument("ifc", type=str, help="Path to an IFC", nargs="?")
+8 -6
View File
@@ -17,15 +17,17 @@
# along with IfcTester. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import re
import builtins
import ifcopenshell.util.unit
import ifcopenshell.util.element
import ifcopenshell.util.classification
import re
from functools import lru_cache
from xmlschema.validators import identities
from typing import Union, Optional, Any, Literal, TYPE_CHECKING, TypedDict
from logging import Logger
from typing import TYPE_CHECKING, Any, Literal, Optional, TypedDict, Union
import ifcopenshell.util.classification
import ifcopenshell.util.element
import ifcopenshell.util.unit
from xmlschema.validators import identities
if TYPE_CHECKING:
from .ids import Specification
+14 -12
View File
@@ -17,28 +17,30 @@
# along with IfcTester. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import os
import datetime
import ifcopenshell
from xmlschema.validators.exceptions import XMLSchemaValidationError
from xmlschema import XMLSchema
from xmlschema import etree_tostring
import os
from typing import Any, Optional, Union
from xml.etree import ElementTree as ET
import ifcopenshell
from xmlschema import XMLSchema, etree_tostring
from xmlschema.validators.exceptions import XMLSchemaValidationError
from .facet import (
Facet,
Entity,
Attribute,
Cardinality,
Classification,
Property,
PartOf,
Entity,
Facet,
FacetFailure,
Material,
PartOf,
Property,
Restriction,
get_pset,
get_psets,
Cardinality,
FacetFailure,
)
from typing import Optional, Union, Any
cwd = os.path.dirname(os.path.realpath(__file__))
schema = None
+9 -6
View File
@@ -17,18 +17,21 @@
# along with IfcTester. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import datetime
import math
import os
import re
import sys
import math
import datetime
from typing import Literal, Optional, TypedDict, Union
import ifcopenshell
import ifcopenshell.util.element
import ifcopenshell.util.placement
import ifcopenshell.util.unit
from .ids import Specification, Ids
from .facet import Facet, FacetFailure
from typing import TypedDict, Union, Literal, Optional
from .ids import Ids, Specification
cwd = os.path.dirname(os.path.realpath(__file__))
@@ -555,7 +558,7 @@ class Ods(Json):
def to_file(self, filepath: str) -> None:
from odf.opendocument import OpenDocumentSpreadsheet
from odf.style import Style, TableCellProperties
from odf.table import Table, TableRow, TableCell
from odf.table import Table, TableCell, TableRow
from odf.text import P
self.doc = OpenDocumentSpreadsheet()
@@ -696,7 +699,7 @@ class OdsSummary(Json):
def to_file(self, filepath: str) -> None:
from odf.opendocument import OpenDocumentSpreadsheet
from odf.style import Style, TableCellProperties
from odf.table import Table, TableRow, TableCell
from odf.table import Table, TableCell, TableRow
from odf.text import P
self.doc = OpenDocumentSpreadsheet()
+9 -7
View File
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcTester. If not, see <http://www.gnu.org/licenses/>.
import functools
import os
import re
import uuid
import pytest
import functools
from pathlib import Path
from xml.dom.minidom import parseString
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.aggregate
@@ -32,15 +34,15 @@ import ifcopenshell.api.spatial
import ifcopenshell.api.type
import ifcopenshell.api.unit
import ifcopenshell.guid
import ifctester
import numpy as np
import pytest
import test_facet
import test_ids
import numpy as np
from pathlib import Path
from xml.dom.minidom import parseString
from ifctester import ids
from ifcopenshell import validate
import ifctester
from ifctester import ids
outdir = "build"
+11 -2
View File
@@ -18,6 +18,7 @@
import uuid
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.aggregate
@@ -33,9 +34,17 @@ import ifcopenshell.api.type
import ifcopenshell.api.unit
import ifcopenshell.guid
import ifcopenshell.util.pset
import ifctester.ids
import ifctester.facet
from ifctester.facet import Entity, Attribute, Classification, Property, PartOf, Material, Restriction
import ifctester.ids
from ifctester.facet import (
Attribute,
Classification,
Entity,
Material,
PartOf,
Property,
Restriction,
)
def set_facet(facet):
+5 -3
View File
@@ -17,13 +17,15 @@
# along with IfcTester. If not, see <http://www.gnu.org/licenses/>.
import os
import pytest
import xmlschema
from typing import Optional
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.material
import pytest
import xmlschema
from ifctester import ids
from typing import Optional
def run(
+3 -2
View File
@@ -1,11 +1,12 @@
import xml.etree.ElementTree as ET
import ifcopenshell
import ifcopenshell.util
import ifcopenshell.util.attribute
import ifcopenshell.util.pset
import ifcopenshell.util.schema
import xml.etree.ElementTree as ET
from xmlschema.validators.exceptions import XMLSchemaValidationError
from ifctester.ids import Ids, IdsXmlValidationError, get_schema
from xmlschema.validators.exceptions import XMLSchemaValidationError
# https://github.com/buildingSMART/IDS/blob/9914d568c7ac037acd97e58a0d16e9f93c3e3416/Schema/ids.xsd#L232
ifc_schemas = ["IFC2X3", "IFC4", "IFC4X3_ADD2"]
+3 -3
View File
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcTester. If not, see <http://www.gnu.org/licenses/>.
import os
import sys
import argparse
import mimetypes
import os
import sys
bonsai_lib_path = os.environ.get("BONSAI_LIB_PATH")
print(os.environ)
@@ -29,7 +29,7 @@ bonsai_version = os.environ.get("BONSAI_VERSION")
if bonsai_lib_path:
sys.path.insert(0, bonsai_lib_path)
from flask import Flask, send_from_directory, send_file
from flask import Flask, send_file, send_from_directory
# Browsers expecting this specific MIME type for .mjs files,
# otherwise they fail to load.