Title: ifcopenshell-python: test test/util/scripts/test_validate_stub.py::TestValidateStub::test_run fails · Issue #6976 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: ifcopenshell-python: test test/util/scripts/test_validate_stub.py::TestValidateStub::test_run fails · Issue #6976 · IfcOpenShell/IfcOpenShell
X Title: ifcopenshell-python: test test/util/scripts/test_validate_stub.py::TestValidateStub::test_run fails · Issue #6976 · IfcOpenShell/IfcOpenShell
Description: Bug Description compile ifcopenshell and install the python bindings in a venv Execute .venv/bin/python3.12 -m pytest test/util/scripts/test_validate_stub.py::TestValidateStub::test_run The test fails, see full logs below. Attachments No...
Open Graph Description: Bug Description compile ifcopenshell and install the python bindings in a venv Execute .venv/bin/python3.12 -m pytest test/util/scripts/test_validate_stub.py::TestValidateStub::test_run The test fa...
X Description: Bug Description compile ifcopenshell and install the python bindings in a venv Execute .venv/bin/python3.12 -m pytest test/util/scripts/test_validate_stub.py::TestValidateStub::test_run The test fa...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/6976
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ifcopenshell-python: test test/util/scripts/test_validate_stub.py::TestValidateStub::test_run fails","articleBody":"### Bug Description\n\n- compile ifcopenshell and install the python bindings in a venv\n- Execute `.venv/bin/python3.12 -m pytest test/util/scripts/test_validate_stub.py::TestValidateStub::test_run`\n\nThe test fails, see full logs below. \n\n\n### Attachments\n\n_No response_\n\n### Debug and Error Output\n\n```true\n==================================================== test session starts ====================================================\nplatform linux -- Python 3.12.10, pytest-8.3.5, pluggy-1.5.0\nrootdir: /home/augustin/repos/IfcOpenShell/src/ifcopenshell-python\nconfigfile: pyproject.toml\ncollected 1 item\n\ntest/util/scripts/test_validate_stub.py F [100%]\n\n========================================================= FAILURES ==========================================================\n_________________________________________________ TestValidateStub.test_run _________________________________________________\n\nself = \u003ctest_validate_stub.TestValidateStub object at 0x7efbeadb3050>\n\n def test_run(self):\n> subject.main()\n\ntest/util/scripts/test_validate_stub.py:25:\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n\n def main() -> None:\n package = Path(__file__).parent.parent.parent\n stub_path = package / \"ifcopenshell_wrapper.pyi\"\n wrapper_path = package / \"ifcopenshell_wrapper.py\"\n\n # Parse files\n stub_tree = ast.parse(stub_path.read_text())\n wrapper_tree = ast.parse(wrapper_path.read_text())\n\n # Extract class names\n stub_classes = get_names_tree_lines(stub_tree)\n wrapper_classes = get_names_tree_lines(wrapper_tree)\n\n # Use difflib to create a unified diff of class names\n diff = difflib.unified_diff(\n stub_classes,\n wrapper_classes,\n fromfile=\"stub.pyi classes\",\n tofile=\"wrapper.py classes\",\n lineterm=\"\",\n n=10,\n )\n diff = list(diff)\n\n format_diff(diff)\n diff_no_header = diff[2:]\n added = len([l for l in diff_no_header if l.startswith(\"+\")])\n removed = len([l for l in diff_no_header if l.startswith(\"-\")])\n\n if added or removed:\n print(f\"Added lines: {added}\")\n print(f\"Removed lines: {removed}\")\n> raise Exception(\"Found discrepancies between stub and wrapper.\")\nE Exception: Found discrepancies between stub and wrapper.\n\nifcopenshell/util/scripts/validate_stub.py:251: Exception\n--------------------------------------------------- Captured stdout call ----------------------------------------------------\n--- stub.pyi classes\n+++ wrapper.py classes\n@@ -48,40 +48,47 @@\n SHARED_PTR_DISOWN\n SHELL\n SOLID\n SPHERE\n STYLE\n SURFACES_AND_SOLIDS\n SWEEP_ALONG_CURVE\n TORUS\n TRIANGLE_MESH\n TRIANGULATED\n+class ApplyOffset:\n+ description\n+ name\n class BRep(Representation):\n def as_compound(self, force_meters): ...\n def begin(self): ...\n def calculate_projected_surface_area(self, ax, along_x, along_y, along_z): ...\n def calculate_surface_area(self, arg2): ...\n def calculate_volume(self, arg2): ...\n def end(self): ...\n def item(self, i): ...\n def item_id(self, i): ...\n def shapes(self): ...\n def size(self): ...\n class BRepElement(Element):\n def calculate_projected_surface_area(self, along_x, along_y, along_z): ...\n @property\n def geometry(self): ...\n def geometry_pointer(self): ...\n @property\n def surface_area(self): ...\n @property\n def volume(self): ...\n+class CacheShapes:\n+ defaultvalue\n+ description\n+ name\n class CgalEmitOriginalEdges:\n defaultvalue\n description\n name\n class ColladaSerializer(WriteOnlyGeometrySerializer):\n def finalize(self): ...\n def isTesselated(self): ...\n def object_id(self, o): ...\n def ready(self): ...\n def setFile(self, arg2): ...\n@@ -127,20 +134,24 @@\n def position(self): ...\n def serialize(self): ...\n def serialize_obj(self): ...\n def set_box(self, b): ...\n def solid(self): ...\n def solid_mt(self): ...\n def subtract(self, arg2): ...\n def surface_genus(self): ...\n def vertices(self): ...\n def volume(self): ...\n+class DeferProcessingFirstElement:\n+ defaultvalue\n+ description\n+ name\n class DoubleArray3:\n def back(self): ...\n def begin(self): ...\n def empty(self): ...\n def end(self): ...\n def fill(self, u): ...\n def front(self): ...\n def iterator(self): ...\n def rbegin(self): ...\n def rend(self): ...\n@@ -193,28 +204,20 @@\n class GeometrySerializer:\n READ_BREP\n READ_TRIANGULATION\n def geometry_settings(self, *args): ...\n def isTesselated(self): ...\n def object_id(self, o): ...\n def read(self, *args): ...\n def setUnitNameAndMagnitude(self, name, magnitude): ...\n def settings(self, *args): ...\n def write(self, *args): ...\n-class GltfSerializer(WriteOnlyGeometrySerializer):\n- def finalize(self): ...\n- def isTesselated(self): ...\n- def ready(self): ...\n- def setFile(self, arg2): ...\n- def setUnitNameAndMagnitude(self, arg2, arg3): ...\n- def write(self, *args): ...\n- def writeHeader(self): ...\n class HdfSerializer(GeometrySerializer):\n def finalize(self): ...\n def isTesselated(self): ...\n def read(self, *args): ...\n def ready(self): ...\n def remove(self, guid): ...\n def setFile(self, arg2): ...\n def setUnitNameAndMagnitude(self, arg2, arg3): ...\n def write(self, *args): ...\n def writeHeader(self): ...\n@@ -251,41 +254,57 @@\n def bounds_max(self): ...\n def bounds_min(self): ...\n def compute_bounds(self, with_geometry): ...\n def create(self): ...\n def file(self): ...\n def filters(self, *args): ...\n def get(self): ...\n def getLog(self): ...\n def get_native(self): ...\n def get_object(self, id): ...\n+ def get_task_items(self): ...\n+ def get_task_products(self): ...\n def had_error_processing_elements(self): ...\n initialization_outcome_\n def initialize(self): ...\n def next(self): ...\n def process_concurrently(self): ...\n def process_finished_rep(self, rep): ...\n processed_\n def progress(self): ...\n def set_cache(self, cache): ...\n def unit_magnitude(self): ...\n def unit_name(self): ...\n+class MaxOffset:\n+ description\n+ name\n+class MaxOffsetDeviation:\n+ description\n+ name\n+class OcctNoCleanTriangulation:\n+ defaultvalue\n+ description\n+ name\n class OpaqueCoordinate_3:\n def get(self, i): ...\n def set(self, i, n): ...\n class OpaqueCoordinate_4:\n def get(self, i): ...\n def set(self, i, n): ...\n class OpaqueNumber:\n def clone(self): ...\n def to_double(self): ...\n def to_string(self): ...\n+class PermissiveShapeReuse:\n+ defaultvalue\n+ description\n+ name\n class Representation:\n def entity(self): ...\n @property\n def id(self): ...\n def settings(self): ...\n class Serialization(Representation):\n @property\n def brep_data(self): ...\n @property\n def surface_style_ids(self): ...\n@@ -386,20 +405,21 @@\n def addNormal(self, X, Y, Z): ...\n def addVertex(self, item_index, material_index, X, Y, Z): ...\n @staticmethod\n def box_project_uvs(vertices, normals): ...\n @property\n def colors_buffer(self): ...\n @property\n def edges(self): ...\n @property\n def edges_buffer(self): ...\n+ @property\n def edges_item_ids(self): ...\n @property\n def edges_item_ids_buffer(self): ...\n @staticmethod\n def empty(settings): ...\n @property\n def faces(self): ...\n @property\n def faces_buffer(self): ...\n @property\n@@ -650,21 +670,20 @@\n def derived(self): ...\n def is_abstract(self): ...\n def set_attributes(self, attributes, derived): ...\n def set_inverse_attributes(self, inverse_attributes): ...\n def set_subtypes(self, subtypes): ...\n def subtypes(self): ...\n def supertype(self): ...\n class entity_instance:\n def data(self, *args): ...\n def declaration(self): ...\n- file\n file_\n def file_pointer(self): ...\n def get_argument(self, *args): ...\n def get_argument_index(self, a): ...\n def get_argument_name(self, i): ...\n def get_argument_type(self, i): ...\n def get_attribute_category(self, name): ...\n def get_attribute_names(self): ...\n def get_inverse(self, a): ...\n def get_inverse_attribute_names(self): ...\n@@ -688,20 +707,21 @@\n def setArgumentAsString(self, i, a): ...\n def toString(self, arg2, upper): ...\n def to_string(self, valid_spf): ...\n def unset_attribute_value(self, i): ...\n class enumeration_type(declaration):\n def argument_types(self): ...\n def as_enumeration_type(self): ...\n def enumeration_items(self): ...\n def lookup_enum_offset(self, string): ...\n def lookup_enum_value(self, i): ...\n+class equal_functor: ...\n class extrusion(sweep):\n def calc_hash(self): ...\n def clone_(self): ...\n depth\n direction\n def kind(self): ...\n @property\n def matrix(self): ...\n class face:\n basis\n@@ -787,30 +807,39 @@\n def evaluation_points(self, *args): ...\n class functor_item(function_item):\n def calc_hash(self): ...\n def clone_(self): ...\n def end(self): ...\n def kind(self): ...\n def start(self): ...\n class geom_item(item):\n matrix\n surface_style\n+class geometry_conversion_result:\n+ breps\n+ elements\n+ index\n+ item\n+ products\n+ products_2\n+ representation\n class geometry_exception:\n def what(self): ...\n class gradient_function(function_item):\n def calc_hash(self): ...\n def clone_(self): ...\n def end(self): ...\n def get_horizontal(self): ...\n def get_vertical(self): ...\n def kind(self): ...\n def start(self): ...\n+class hash_functor: ...\n class horizontal_plan_at_element: ...\n class implicit_item(geom_item): ...\n class inverse_attribute:\n def attribute_reference(self): ...\n bag_type\n def bound1(self): ...\n def bound2(self): ...\n def entity_reference(self): ...\n def name(self): ...\n set_type\n@@ -849,20 +878,21 @@\n axis\n def calc_hash(self): ...\n @property\n def children(self): ...\n def clone_(self): ...\n def kind(self): ...\n def print_impl(self, o, indent): ...\n class loop:\n def calc_hash(self): ...\n def calculate_linear_edge_curves(self): ...\n+ def centroid(self): ...\n @property\n def children(self): ...\n def clone_(self): ...\n closed\n external\n fi\n def is_polyhedron(self): ...\n def kind(self): ...\n def remove_linear_edge_curves(self): ...\n class matrix4(item):\n@@ -981,20 +1011,21 @@\n def enumeration_types(self): ...\n def instantiate(self, decl, data): ...\n def name(self): ...\n def select_types(self): ...\n def type_declarations(self): ...\n class select_type(declaration):\n def as_select_type(self): ...\n def select_list(self): ...\n class shell:\n def calc_hash(self): ...\n+ def centroid(self): ...\n @property\n def children(self): ...\n def clone_(self): ...\n closed\n def kind(self): ...\n def print_impl(self, o, indent): ...\n class simple_type(parameter_type):\n def as_simple_type(self): ...\n binary_type\n boolean_type\nAdded lines: 40\nRemoved lines: 9\n===================================================== warnings summary ======================================================\n\u003cfrozen importlib._bootstrap>:488\n \u003cfrozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute\n\n\u003cfrozen importlib._bootstrap>:488\n \u003cfrozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute\n\n\u003cfrozen importlib._bootstrap>:488\n \u003cfrozen importlib._bootstrap>:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n================================================== short test summary info ==================================================\nFAILED test/util/scripts/test_validate_stub.py::TestValidateStub::test_run - Exception: Found discrepancies between stub and wrapper.\n=============================================== 1 failed, 3 warnings in 0.34s ===============================================\n```","author":{"url":"https://github.com/autra","@type":"Person","name":"autra"},"datePublished":"2025-08-01T15:34:27Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/6976"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:842cfd89-4e31-0abb-f256-2b22b9fed749 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA56:38D535:1D78:2779:6B04C024 |
| html-safe-nonce | e24410b4ad325f6785aba14da0b7cfa7c9b3738eaeb6d54e3bfe77ebe2a91114 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTU2OjM4RDUzNToxRDc4OjI3Nzk6NkIwNEMwMjQiLCJ2aXNpdG9yX2lkIjoiNTkzMzQ5MDkzODg5ODA3MTU4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 98e9f6b3fd06a703fc09f9f1de070f8d5f86151e6029538542673f6889848ffa |
| hovercard-subject-tag | issue:3284323200 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/6976/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e35b888bf53b844d81782807b154d2f14cdb48e0f7b0c5ec2c34d9bd8d1eb822/IfcOpenShell/IfcOpenShell/issues/6976 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e35b888bf53b844d81782807b154d2f14cdb48e0f7b0c5ec2c34d9bd8d1eb822/IfcOpenShell/IfcOpenShell/issues/6976 |
| og:image:alt | Bug Description compile ifcopenshell and install the python bindings in a venv Execute .venv/bin/python3.12 -m pytest test/util/scripts/test_validate_stub.py::TestValidateStub::test_run The test fa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | autra |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4 |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width