Summary
The vocabulary defined in src/topologicpy/Ontology.py (the internal OBJECT_PROPERTIES / DATA_PROPERTIES tables and the class hierarchy) and the published vocabulary in ontology/topologicpy.ttl have diverged. As a result, RDF graphs produced by the exporter reference ~29 properties that are not defined in the ontology they are supposed to conform to, so exported graphs do not validate against topologicpy.ttl.
Both files were introduced together in the same commit (b6b8f69, 2026-05-31), and the TTL declares dcterms:modified "2026-05-24", owl:versionInfo "0.1.0". Neither file has been edited independently since, so the two definitions appear to have been generated at different points and committed already out of sync.
How to reproduce
Parse the published TTL, collect the top: terms it defines, then collect the top: terms the exporter emits, and diff them. Every emitted term should be defined in the vocabulary; 29 are not.
Category 1: emitted term has a different name in the TTL (19)
The exporter emits these, but the TTL defines the right-hand form:
| Ontology.py emits |
topologicpy.ttl defines |
top:hasVertices |
top:hasVertex |
top:hasEdges |
top:hasEdge |
top:hasFaces |
top:hasFace |
top:hasShells |
top:hasShell |
top:hasWires |
top:hasWire |
top:hasCells |
top:hasCell |
top:hasCellComplexes |
top:hasCellComplex |
top:hasInternalBoundaries |
top:hasInternalBoundary |
top:hasStartVertex |
top:startsAt |
top:hasEndVertex |
top:endsAt |
top:hasX / hasY / hasZ |
top:x / y / z |
top:hasArea |
top:area |
top:hasLength |
top:length |
top:hasVolume |
top:volume |
top:hasMantissa |
top:mantissa |
top:hasUnit |
top:unit |
top:updatedAt |
top:modifiedAt |
Category 2: emitted concept absent from the TTL entirely (10)
These are defined in the Ontology.py tables and emitted, but have no counterpart in the published vocabulary:
top:Point, top:hasDirection, top:interfaceOf, top:isPartOf, top:hasFreeVertices, top:hasFreeEdges, top:hasFreeWires,top:hasFreeFaces, top:hasFreeShells, top:hasFreeCells.
Two related bugs noticed alongside
- Duplicate dict key. In
OBJECT_PROPERTIES, "top:connectsTo" is defined twice (consecutive lines ~279–280); the second silently overwrites the first.
- Ontology IRI stamp. The exporter emits
top:TopologicPyOntology rdf:type owl:Ontology, i.e. a fresh entity in the top: namespace, rather than the canonical ontology IRI <http://w3id.org/topologicpy> that topologicpy.ttl declares.
Question before a PR
I'm happy to prepare a fix, but the direction depends on which artefact you consider canonical:
- (A) the published
topologicpy.ttl — in which case I'd align the Ontology.py terms to the TTL names and add the 10 missing concepts to the vocabulary; or
- (B) the Ontology.py tables — in which case the TTL would be regenerated from them (a breaking change to the published v0.1.0 names, so presumably v0.2.0).
Either way I'd add a round-trip test asserting that every emitted term is defined in the ontology, so this can't drift again. There are a few smaller modelling points (e.g. owl:imports for BOT/Brick/PROV, dimensional disjointness) that I'll raise separately to keep this issue focused.
@wassimj Happy to send the PR once you've indicated A or B.
Summary
The vocabulary defined in
src/topologicpy/Ontology.py(the internalOBJECT_PROPERTIES/DATA_PROPERTIEStables and the class hierarchy) and the published vocabulary inontology/topologicpy.ttlhave diverged. As a result, RDF graphs produced by the exporter reference ~29 properties that are not defined in the ontology they are supposed to conform to, so exported graphs do not validate againsttopologicpy.ttl.Both files were introduced together in the same commit (
b6b8f69, 2026-05-31), and the TTL declaresdcterms:modified "2026-05-24",owl:versionInfo "0.1.0". Neither file has been edited independently since, so the two definitions appear to have been generated at different points and committed already out of sync.How to reproduce
Parse the published TTL, collect the
top:terms it defines, then collect thetop:terms the exporter emits, and diff them. Every emitted term should be defined in the vocabulary; 29 are not.Category 1: emitted term has a different name in the TTL (19)
The exporter emits these, but the TTL defines the right-hand form:
top:hasVerticestop:hasVertextop:hasEdgestop:hasEdgetop:hasFacestop:hasFacetop:hasShellstop:hasShelltop:hasWirestop:hasWiretop:hasCellstop:hasCelltop:hasCellComplexestop:hasCellComplextop:hasInternalBoundariestop:hasInternalBoundarytop:hasStartVertextop:startsAttop:hasEndVertextop:endsAttop:hasX/hasY/hasZtop:x/y/ztop:hasAreatop:areatop:hasLengthtop:lengthtop:hasVolumetop:volumetop:hasMantissatop:mantissatop:hasUnittop:unittop:updatedAttop:modifiedAtCategory 2: emitted concept absent from the TTL entirely (10)
These are defined in the Ontology.py tables and emitted, but have no counterpart in the published vocabulary:
top:Point,top:hasDirection,top:interfaceOf,top:isPartOf,top:hasFreeVertices,top:hasFreeEdges,top:hasFreeWires,top:hasFreeFaces,top:hasFreeShells,top:hasFreeCells.Two related bugs noticed alongside
OBJECT_PROPERTIES,"top:connectsTo"is defined twice (consecutive lines ~279–280); the second silently overwrites the first.top:TopologicPyOntology rdf:type owl:Ontology, i.e. a fresh entity in thetop:namespace, rather than the canonical ontology IRI<http://w3id.org/topologicpy>thattopologicpy.ttldeclares.Question before a PR
I'm happy to prepare a fix, but the direction depends on which artefact you consider canonical:
topologicpy.ttl— in which case I'd align the Ontology.py terms to the TTL names and add the 10 missing concepts to the vocabulary; orEither way I'd add a round-trip test asserting that every emitted term is defined in the ontology, so this can't drift again. There are a few smaller modelling points (e.g.
owl:importsfor BOT/Brick/PROV, dimensional disjointness) that I'll raise separately to keep this issue focused.@wassimj Happy to send the PR once you've indicated A or B.