René's URL Explorer Experiment


Title: Validate EXPRESS UNIQUE clauses via express_parser (#4499) by petruconduraru · Pull Request #8519 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: Validate EXPRESS UNIQUE clauses via express_parser (#4499) by petruconduraru · Pull Request #8519 · IfcOpenShell/IfcOpenShell

X Title: Validate EXPRESS UNIQUE clauses via express_parser (#4499) by petruconduraru · Pull Request #8519 · IfcOpenShell/IfcOpenShell

Description: Refs #4499. Supersedes #8517 (which was closed on the "use express_parser, not a hardcoded table" review; this is the reworked version). Change Rely on express_parser instead of a hardcoded table. express_parser already captures each entity's UNIQUE clauses (nodes.entity_definition.unique) but they were dropped at codegen. They are now emitted, through the same pipeline that produces the WHERE rules, into the generated express/rules/.py modules, and validate.py reads them from there so the data tracks the EXPRESS schema. express/nodes.py: capture the full attribute list per UNIQUE clause (previously only the first attribute was kept, silently dropping compound clauses such as IfcApplication.UR2 (ApplicationFullName, Version)). express/rule_compiler.py: collect_uniqueness_rules / format_uniqueness_rules emit a uniqueness_rules dict into every generated rules module. express/rules/{IFC2X3,IFC4,IFC4X1,IFC4X2}.py: carry the generated dict. validate.py: get_uniqueness_rules reads it statically (ast, cached, graceful {} if absent) and validate_uniqueness_rules applies it generically. IfcRoot.UR1 and IfcApplication.UR1/UR2 keep their dedicated paths to avoid double-reporting. Verification get_uniqueness_rules('IFC4') returns IfcApplication / IfcPropertyEnumeration / IfcRoot from the rules module; duplicates are flagged, valid files clean; all 40 test_validate.py fixtures pass; black and ruff clean. IFC4X3 variants gain the dict on the next full rules regeneration; validate no-ops gracefully until then. This contribution was generated with the assistance of an AI coding tool. 🤖 Generated with Claude Code

Open Graph Description: Refs #4499. Supersedes #8517 (which was closed on the "use express_parser, not a hardcoded table" review; this is the reworked version). Change Rely on express_parser instead of a hardcod...

X Description: Refs #4499. Supersedes #8517 (which was closed on the "use express_parser, not a hardcoded table" review; this is the reworked version). Change Rely on express_parser instead of a...

Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/8519

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:61115e81-e45b-e1ba-4933-f250d60469d3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id80FA:2528FA:2448CA0:2F90174:6B054C10
html-safe-nonce431f63d6359390a7738685de224a1bc2aff47c18a01b45d68be94038119ce9c4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEZBOjI1MjhGQToyNDQ4Q0EwOjJGOTAxNzQ6NkIwNTRDMTAiLCJ2aXNpdG9yX2lkIjoiNjQ5ODI5MzExODQ0MDY1NTg4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4cc81686e70456add598f9c295197d549b8d80f60584096272fa05dd63532878
hovercard-subject-tagpull_request:4036005636
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files
twitter:imagehttps://avatars.githubusercontent.com/u/139251053?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/139251053?s=400&v=4
og:image:altRefs #4499. Supersedes #8517 (which was closed on the "use express_parser, not a hardcoded table" review; this is the reworked version). Change Rely on express_parser instead of a hardcod...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git
octolytics-dimension-user_id13692563
octolytics-dimension-user_loginIfcOpenShell
octolytics-dimension-repository_id40473201
octolytics-dimension-repository_nwoIfcOpenShell/IfcOpenShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id40473201
octolytics-dimension-repository_network_root_nwoIfcOpenShell/IfcOpenShell
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release220e980097d94ce616d5d11fbd5316d208e3fc93
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fpull%2F8519%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fpull%2F8519%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=IfcOpenShell%2FIfcOpenShell
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files
IfcOpenShellhttps://github.com/IfcOpenShell
IfcOpenShellhttps://github.com/IfcOpenShell/IfcOpenShell
Codehttps://github.com/IfcOpenShell/IfcOpenShell
Issues1.2k (1.2k)https://github.com/IfcOpenShell/IfcOpenShell/issues
Pull requests943 (943)https://github.com/IfcOpenShell/IfcOpenShell/pulls
Discussionshttps://github.com/IfcOpenShell/IfcOpenShell/discussions
Actionshttps://github.com/IfcOpenShell/IfcOpenShell/actions
Projectshttps://github.com/IfcOpenShell/IfcOpenShell/projects
Wikihttps://github.com/IfcOpenShell/IfcOpenShell/wiki
Security and qualityhttps://github.com/IfcOpenShell/IfcOpenShell/security
Insightshttps://github.com/IfcOpenShell/IfcOpenShell/insights
Sign up for GitHub https://github.com/signup?return_to=%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2Fnew%2Fchoose
petruconduraruhttps://github.com/petruconduraru
v0.8.0https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.8.0
fix-4499-uniqueness-ruleshttps://github.com/IfcOpenShell/IfcOpenShell/tree/fix-4499-uniqueness-rules
Conversation 2 https://github.com/IfcOpenShell/IfcOpenShell/pull/8519
Commits 1 https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/commits
Checks 8 https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/checks
Files changed https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files
Please reload this pagehttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files
Validate EXPRESS UNIQUE clauses via express_parser (#4499) https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#top
Show all changes 1 commit https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files
5d439f2 Source UNIQUE-clause validation from express_parser (#4499 review) petruconduraru Jul 11, 2026 https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/commits/5d439f2729ce18f64471685ed6b5ec728bfa3f97
Clear filters https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files
Please reload this pagehttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files
Please reload this pagehttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files
nodes.py https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-57b95903be0cc43d2f0ce09e83b358b46a480df54bdbd41b0d0a2b20c0dce917
rule_compiler.py https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-87978223d9dc9724a753036c3de9b1441c71df7fd0bf8f37623cff9d9f2edb47
IFC2X3.py https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-f1670c93c2293652b8a14c586e46b4e8b9351cebfde9b9388aec214541c071ac
IFC4.py https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-c690812a10538c512968db0f9b549700aadb0487d96f08e00e01524b83b84eaa
IFC4X1.py https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-ab613271c3ece842e103728004df7831f44be71d079d1371731e52bb93cf389d
IFC4X2.py https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-2527dab863884728cc18b68ddffe71dfab91387bc495e28e0ac68d099af3938b
validate.py https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-d18c0ec8733f56eee03e194593412f23a15db4f1af19b23991052b042630d2d4
fail-duplicated-property-enumeration-name-ifc4.ifc https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-f42045eb6e651a7fd28cafdc484809174f8cafa40c56ec7d19007a1b617ced5d
pass-not-duplicated-property-enumeration-name-ifc4.ifc https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-15ab7ff86bf9a7daf5c462401c0aa9ab192609bc6af4aef455cec92e60250722
src/ifcopenshell-python/ifcopenshell/express/nodes.pyhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-57b95903be0cc43d2f0ce09e83b358b46a480df54bdbd41b0d0a2b20c0dce917
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/5d439f2729ce18f64471685ed6b5ec728bfa3f97/src/ifcopenshell-python/ifcopenshell/express/nodes.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/{{ revealButtonHref }}
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-57b95903be0cc43d2f0ce09e83b358b46a480df54bdbd41b0d0a2b20c0dce917
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-57b95903be0cc43d2f0ce09e83b358b46a480df54bdbd41b0d0a2b20c0dce917
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-57b95903be0cc43d2f0ce09e83b358b46a480df54bdbd41b0d0a2b20c0dce917
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-57b95903be0cc43d2f0ce09e83b358b46a480df54bdbd41b0d0a2b20c0dce917
src/ifcopenshell-python/ifcopenshell/express/rule_compiler.pyhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-87978223d9dc9724a753036c3de9b1441c71df7fd0bf8f37623cff9d9f2edb47
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/5d439f2729ce18f64471685ed6b5ec728bfa3f97/src/ifcopenshell-python/ifcopenshell/express/rule_compiler.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/{{ revealButtonHref }}
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-87978223d9dc9724a753036c3de9b1441c71df7fd0bf8f37623cff9d9f2edb47
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-87978223d9dc9724a753036c3de9b1441c71df7fd0bf8f37623cff9d9f2edb47
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-87978223d9dc9724a753036c3de9b1441c71df7fd0bf8f37623cff9d9f2edb47
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-87978223d9dc9724a753036c3de9b1441c71df7fd0bf8f37623cff9d9f2edb47
src/ifcopenshell-python/ifcopenshell/express/rules/IFC2X3.pyhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-f1670c93c2293652b8a14c586e46b4e8b9351cebfde9b9388aec214541c071ac
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/5d439f2729ce18f64471685ed6b5ec728bfa3f97/src/ifcopenshell-python/ifcopenshell/express/rules/IFC2X3.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/{{ revealButtonHref }}
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-f1670c93c2293652b8a14c586e46b4e8b9351cebfde9b9388aec214541c071ac
src/ifcopenshell-python/ifcopenshell/express/rules/IFC4.pyhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-c690812a10538c512968db0f9b549700aadb0487d96f08e00e01524b83b84eaa
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/5d439f2729ce18f64471685ed6b5ec728bfa3f97/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/{{ revealButtonHref }}
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-c690812a10538c512968db0f9b549700aadb0487d96f08e00e01524b83b84eaa
src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X1.pyhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-ab613271c3ece842e103728004df7831f44be71d079d1371731e52bb93cf389d
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/5d439f2729ce18f64471685ed6b5ec728bfa3f97/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X1.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/{{ revealButtonHref }}
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-ab613271c3ece842e103728004df7831f44be71d079d1371731e52bb93cf389d
src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X2.pyhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-2527dab863884728cc18b68ddffe71dfab91387bc495e28e0ac68d099af3938b
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/5d439f2729ce18f64471685ed6b5ec728bfa3f97/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X2.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/{{ revealButtonHref }}
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-2527dab863884728cc18b68ddffe71dfab91387bc495e28e0ac68d099af3938b
src/ifcopenshell-python/ifcopenshell/validate.pyhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-d18c0ec8733f56eee03e194593412f23a15db4f1af19b23991052b042630d2d4
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/5d439f2729ce18f64471685ed6b5ec728bfa3f97/src/ifcopenshell-python/ifcopenshell/validate.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/{{ revealButtonHref }}
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-d18c0ec8733f56eee03e194593412f23a15db4f1af19b23991052b042630d2d4
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-d18c0ec8733f56eee03e194593412f23a15db4f1af19b23991052b042630d2d4
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-d18c0ec8733f56eee03e194593412f23a15db4f1af19b23991052b042630d2d4
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-d18c0ec8733f56eee03e194593412f23a15db4f1af19b23991052b042630d2d4
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-d18c0ec8733f56eee03e194593412f23a15db4f1af19b23991052b042630d2d4
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-d18c0ec8733f56eee03e194593412f23a15db4f1af19b23991052b042630d2d4
...penshell-python/test/fixtures/validate/fail-duplicated-property-enumeration-name-ifc4.ifchttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-f42045eb6e651a7fd28cafdc484809174f8cafa40c56ec7d19007a1b617ced5d
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/5d439f2729ce18f64471685ed6b5ec728bfa3f97/src/ifcopenshell-python/test/fixtures/validate/fail-duplicated-property-enumeration-name-ifc4.ifc
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/{{ revealButtonHref }}
...hell-python/test/fixtures/validate/pass-not-duplicated-property-enumeration-name-ifc4.ifchttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files#diff-15ab7ff86bf9a7daf5c462401c0aa9ab192609bc6af4aef455cec92e60250722
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/5d439f2729ce18f64471685ed6b5ec728bfa3f97/src/ifcopenshell-python/test/fixtures/validate/pass-not-duplicated-property-enumeration-name-ifc4.ifc
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8519/{{ revealButtonHref }}
Please reload this pagehttps://github.com/IfcOpenShell/IfcOpenShell/pull/8519/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.