Title: Add support for validating UNIQUE functions in EXPRESS · Issue #4499 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Add support for validating UNIQUE functions in EXPRESS · Issue #4499 · IfcOpenShell/IfcOpenShell
X Title: Add support for validating UNIQUE functions in EXPRESS · Issue #4499 · IfcOpenShell/IfcOpenShell
Description: Noticed that running ifcopenshell.validate.validate() doesn't detect if IFC file has duplicated guids (IfcRoot.UR1 rule). import ifcopenshell import ifcopenshell.validate def validate_ifc_file(ifc_file: ifcopenshell.file, use_json=False)...
Open Graph Description: Noticed that running ifcopenshell.validate.validate() doesn't detect if IFC file has duplicated guids (IfcRoot.UR1 rule). import ifcopenshell import ifcopenshell.validate def validate_ifc_file(ifc_...
X Description: Noticed that running ifcopenshell.validate.validate() doesn't detect if IFC file has duplicated guids (IfcRoot.UR1 rule). import ifcopenshell import ifcopenshell.validate def validate_ifc_file(...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/4499
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add support for validating UNIQUE functions in EXPRESS","articleBody":"Noticed that running `ifcopenshell.validate.validate()` doesn't detect if IFC file has duplicated guids (IfcRoot.UR1 rule).\r\n\r\n\r\n\r\n```python\r\nimport ifcopenshell\r\nimport ifcopenshell.validate\r\n\r\ndef validate_ifc_file(ifc_file: ifcopenshell.file, use_json=False):\r\n\r\n if use_json:\r\n logger = ifcopenshell.validate.json_logger()\r\n else:\r\n import logging\r\n\r\n logger = logging.getLogger(\"validate\")\r\n logger.setLevel(logging.DEBUG)\r\n\r\n ifcopenshell.validate.validate(ifc_file, logger, express_rules=True)\r\n if use_json:\r\n from pprint import pprint\r\n\r\n pprint(logger.statements)\r\n\r\nifc_file = ifcopenshell.file(schema=\"ifc4\")\r\nguid = \"3pdqyORIn8KBHZAhhtJ72T\"\r\nifc_file.createIfcWall(GlobalId=guid)\r\nifc_file.createIfcWall(GlobalId=guid)\r\nvalidate_ifc_file(ifc_file)\r\n\r\n```\r\n\r\nI've added a fix in https://github.com/IfcOpenShell/IfcOpenShell/commit/bf9bddc867b5ad70a1da973998826ea0f6f2b1c0 checking it inside `validate()` but not sure if it's the best approach - maybe it should be handled as some file scope rule in generated https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4.py based on `UNIQUE` keyword in .exp file.\r\n\r\nThough `UNIQUE` occurrs only 3 times in .exp files entity definitions and guid seems to be the most imporant case with it, so maybe it's okay to just check it in `validate()` for now.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/Andrej730","@type":"Person","name":"Andrej730"},"datePublished":"2024-04-02T12:18:46Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/4499"}
| 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:d6f9591f-2a92-ffc1-0aa8-3443dec18476 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 960E:1E34F6:6C8831:921C2C:6B04A9DA |
| html-safe-nonce | 1f0a8012a6e24c9f887003cd6e84b010b391c636cee9612752fb4d6f4e7c0ca7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjBFOjFFMzRGNjo2Qzg4MzE6OTIxQzJDOjZCMDRBOURBIiwidmlzaXRvcl9pZCI6Ijg0NjE3MzM5OTQ3MTgwNzk0NTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c887babf280922c9bafcb8977fb5628c5b6982c3d8d4458e9bce7681f758e7c7 |
| hovercard-subject-tag | issue:2220372855 |
| 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/4499/issue_layout |
| twitter:image | https://opengraph.githubassets.com/58fa130f7e4ab8d3a6b64f66730f0f433496e26ef7239958f759a323b1c33f1f/IfcOpenShell/IfcOpenShell/issues/4499 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/58fa130f7e4ab8d3a6b64f66730f0f433496e26ef7239958f759a323b1c33f1f/IfcOpenShell/IfcOpenShell/issues/4499 |
| og:image:alt | Noticed that running ifcopenshell.validate.validate() doesn't detect if IFC file has duplicated guids (IfcRoot.UR1 rule). import ifcopenshell import ifcopenshell.validate def validate_ifc_file(ifc_... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Andrej730 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 188497a0f45a7aa8f7c866faa1950d1a7f8d82b59416adf549b222ad1d1dd19b |
| 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 | 557cfbac6cdb532730c95c90f2cefdc0c4128029 |
| 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