Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into add-rdfs-labels-back
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Sep 20, 2024
2 parents 452ac8c + 3937d88 commit 6969e8b
Show file tree
Hide file tree
Showing 13 changed files with 3,368 additions and 2,057 deletions.
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ git clone https://github.com/BrickSchema/Brick
cd Brick
```

2. Install the virtual environment and set up dependencies
2. Use Git submodules to pull in the RealEstateCore ontology

```bash
git submodule update --init
```

3. Install the virtual environment and set up dependencies

```bash
# creates virtual environment
Expand All @@ -65,7 +71,7 @@ pip install -r requirements.txt
pre-commit install
```

3. Run tests to make sure the build is not broken
4. Run tests to make sure the build is not broken

```bash
make test
Expand Down
2 changes: 1 addition & 1 deletion bricksrc/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Patch version: increment for minor additions/changes to the ontology that
# are largely backwards compatible (bug-fixes exempted)
BRICK_PATCH_VERSION = 1
BRICK_PATCH_VERSION = 2

# the simplified (no patch version) version number for Brick. Intended for
# inclusion in the Brick namespace URI
Expand Down
2 changes: 2 additions & 0 deletions generate_brick.py
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,8 @@ def handle_concept_labels():

# add rec stuff
env.import_graph(G, "https://w3id.org/rec")
# remove the REC import
G.remove((None, OWL.imports, URIRef("https://w3id.org/rec")))

# add inferred information to Brick
# logger.info("Adding inferred information to Brick")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dev-dependencies = [
"pytest-xdist[psutil]>=3.6.1",
"semver>=3.0.2",
"html5lib>=1.1",
"pyontoenv>=0.1.9a6",
"pyontoenv>=0.1.9",
"brickschema[topquadrant]>=0.7.6a2",
"scipy>=1.13.1",
"sentence-transformers>=3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ flake8>=6.0
semver>=2.10.1
pytest-xdist[psutil]
html5lib
pyontoenv>=0.1.8
pyontoenv>=0.1.9
23 changes: 22 additions & 1 deletion support/COLLECTION_QUDT_USER_TESTS-v2.1.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<http://qudt.org/2.1/collection/usertest>
a owl:Ontology ;
rdfs:isDefinedBy <http://qudt.org/2.1/collection/usertest> ;
rdfs:label "QUDT Collection - USER TESTS - v 2.1.37" ;
rdfs:label "QUDT Collection - USER TESTS - v 2.1.42" ;
sh:declare [
a sh:PrefixDeclaration ;
sh:namespace "http://purl.org/dc/terms/"^^xsd:anyURI ;
Expand Down Expand Up @@ -76,6 +76,27 @@
sh:prefix "xsd" ;
]
.
qudt:ConsistentDimensionVectorConstraint
a sh:NodeShape ;
rdfs:isDefinedBy <http://qudt.org/2.1/collection/usertest> ;
rdfs:label "Consistent Dimension Vector Constraint" ;
sh:sparql [
a sh:SPARQLConstraint ;
rdfs:comment "Checks for consistent dimension vectors for a QuantityKind and the Unit" ;
sh:message "s223: Inconsistent dimensionalities for a Quantity's Unit and Quantity Kind" ;
sh:prefixes <http://qudt.org/2.1/collection/usertest> ;
sh:select """
SELECT $this
WHERE
{
$this qudt:hasQuantityKind/qudt:hasDimensionVector ?qkdv1 .
$this qudt:hasUnit/qudt:hasDimensionVector ?qkdv2 .
FILTER (?qkdv1 != ?qkdv2) .
}
""" ;
] ;
sh:targetClass qudt:Quantity ;
.
qudt:DeprecatedPropertyConstraint
a sh:NodeShape ;
rdfs:isDefinedBy <http://qudt.org/2.1/collection/usertest> ;
Expand Down
56 changes: 19 additions & 37 deletions support/SCHEMA_QUDT_NoOWL-v2.1.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ dcterms:title
a owl:Ontology ;
vaem:hasGraphMetadata vaem:GMD_SHACLQUDT-SCHEMA ;
rdfs:isDefinedBy <http://qudt.org/2.1/schema/shacl/qudt> ;
rdfs:label "QUDT SHACL Schema Version 2.1.37" ;
rdfs:label "QUDT SHACL Schema Version 2.1.42" ;
owl:imports <http://qudt.org/2.1/schema/shacl/overlay/qudt> ;
owl:imports <http://www.linkedmodel.org/schema/dtype> ;
owl:imports <http://www.linkedmodel.org/schema/vaem> ;
Expand Down Expand Up @@ -1409,17 +1409,17 @@ qudt:Quantity
a rdfs:Class ;
a sh:NodeShape ;
qudt:dbpediaMatch "http://dbpedia.org/resource/Quantity"^^xsd:anyURI ;
rdfs:comment """<p class=\"lm-para\">A <b>quantity</b> is the measurement of an observable property of a particular object, event, or physical system.
A quantity is always associated with the context of measurement (i.e. the thing measured, the measured value, the accuracy of measurement, etc.) whereas the
underlying <b>quantity kind</b> is independent of any particular measurement. Thus, length is a quantity kind while the height of a rocket is a specific
quantity of length; its magnitude that may be expressed in meters, feet, inches, etc. Examples of physical quantities include physical constants, such as
rdfs:comment """<p class=\"lm-para\">A <b>quantity</b> is the measurement of an observable property of a particular object, event, or physical system.
A quantity is always associated with the context of measurement (i.e. the thing measured, the measured value, the accuracy of measurement, etc.) whereas the
underlying <b>quantity kind</b> is independent of any particular measurement. Thus, length is a quantity kind while the height of a rocket is a specific
quantity of length; its magnitude that may be expressed in meters, feet, inches, etc. Examples of physical quantities include physical constants, such as
the speed of light in a vacuum, Planck's constant, the electric permittivity of free space, and the fine structure constant. </p>
<p class=\"lm-para\">In other words, quantities are quantifiable aspects of the world, such as the duration of a movie, the distance between two points,
velocity of a car, the pressure of the atmosphere, and a person's weight; and units are used to describe their numerical measure.</p>
<p class=\"lm-para\">Many <b>quantity kinds</b> are related to each other by various physical laws, and as a result, the associated units of some quantity
kinds can be expressed as products (or ratios) of powers of other quantity kinds (e.g., momentum is mass times velocity and velocity is defined as distance
divided by time). In this way, some quantities can be calculated from other measured quantities using their associations to the quantity kinds in these
expressions. These quantity kind relationships are also discussed in dimensional analysis. Those that cannot be so expressed can be regarded
<p class=\"lm-para\">In other words, quantities are quantifiable aspects of the world, such as the duration of a movie, the distance between two points,
velocity of a car, the pressure of the atmosphere, and a person's weight; and units are used to describe their numerical measure.</p>
<p class=\"lm-para\">Many <b>quantity kinds</b> are related to each other by various physical laws, and as a result, the associated units of some quantity
kinds can be expressed as products (or ratios) of powers of other quantity kinds (e.g., momentum is mass times velocity and velocity is defined as distance
divided by time). In this way, some quantities can be calculated from other measured quantities using their associations to the quantity kinds in these
expressions. These quantity kind relationships are also discussed in dimensional analysis. Those that cannot be so expressed can be regarded
as \"fundamental\" in this sense.</p>
<p class=\"lm-para\">A quantity is distinguished from a \"quantity kind\" in that the former carries a value and the latter is a type specifier.</p>"""^^rdf:HTML ;
rdfs:isDefinedBy <http://qudt.org/2.1/schema/shacl/qudt> ;
Expand All @@ -1429,7 +1429,6 @@ as \"fundamental\" in this sense.</p>
sh:property qudt:Quantity-hasQuantityKind ;
sh:property qudt:Quantity-isDeltaQuantity ;
sh:property qudt:Quantity-quantityValue ;
sh:property qudt:Quantity-quantityValueSN ;
.
qudt:Quantity-hasQuantityKind
a sh:PropertyShape ;
Expand Down Expand Up @@ -1640,10 +1639,10 @@ qudt:QuantityKindDimensionVector
a rdfs:Class ;
a sh:NodeShape ;
dcterms:description """
$\\text{Quantity Kind Dimension Vector}$ describes the dimensionality of a quantity kind in the context of a system of units.
$\\text{Quantity Kind Dimension Vector}$ describes the dimensionality of a quantity kind in the context of a system of units.
In the SI system of units, the dimensions of a quantity kind are expressed as a product of the basic
physical dimensions mass ($M$), length ($L$), time ($T$) current ($I$), amount of substance ($N$),
luminous intensity ($J$) and absolute temperature
luminous intensity ($J$) and absolute temperature
($\\theta$) as $dim \\, Q = L^{\\alpha} \\, M^{\\beta} \\, T^{\\gamma} \\, I ^{\\delta} \\, \\theta ^{\\epsilon} \\, N^{\\eta} \\, J ^{\\nu}$.
Expand Down Expand Up @@ -1830,22 +1829,6 @@ qudt:QuantityValue
rdfs:label "Quantity value" ;
rdfs:subClassOf qudt:Concept ;
rdfs:subClassOf qudt:Quantifiable ;
sh:property qudt:QuantityValue-hasUnit ;
sh:property qudt:QuantityValue-unit ;
.
qudt:QuantityValue-hasUnit
a sh:PropertyShape ;
sh:path qudt:hasUnit ;
rdfs:isDefinedBy <http://qudt.org/2.1/schema/shacl/qudt> ;
sh:class qudt:Unit ;
sh:maxCount 1 ;
.
qudt:QuantityValue-unit
a sh:PropertyShape ;
sh:path qudt:unit ;
rdfs:isDefinedBy <http://qudt.org/2.1/schema/shacl/qudt> ;
sh:class qudt:Unit ;
sh:maxCount 1 ;
.
qudt:RatioScale
a rdfs:Class ;
Expand Down Expand Up @@ -2141,7 +2124,6 @@ qudt:SystemOfQuantityKinds
sh:property qudt:SystemOfQuantityKinds-hasQuantityKind ;
sh:property qudt:SystemOfQuantityKinds-hasUnitSystem ;
sh:property qudt:SystemOfQuantityKinds-systemDerivedQuantityKind ;
sh:property [] ;
.
qudt:SystemOfQuantityKinds-baseDimensionEnumeration
a sh:PropertyShape ;
Expand Down Expand Up @@ -3692,33 +3674,33 @@ vaem:GMD_SHACLQUDT-SCHEMA
<p class=\"lm-para\">Except for unit prefixes, all units are specified in separate vocabularies. Descriptions are provided in both HTML and LaTeX formats. A quantity is a measure of an observable phenomenon, that, when associated with something, becomes a property of that thing; a particular object, event, or physical system. </p>
<p class=\"lm-para\">A quantity has meaning in the context of a measurement (i.e. the thing measured, the measured value, the accuracy of measurement, etc.) whereas the underlying quantity kind is independent of any particular measurement. Thus, length is a quantity kind while the height of a rocket is a specific quantity of length; its magnitude that may be expressed in meters, feet, inches, etc. Or, as stated at Wikipedia, in the language of measurement, quantities are quantifiable aspects of the world, such as time, distance, velocity, mass, momentum, energy, and weight, and units are used to describe their measure. Many of these quantities are related to each other by various physical laws, and as a result the units of some of the quantities can be expressed as products (or ratios) of powers of other units (e.g., momentum is mass times velocity and velocity is measured in distance divided by time).</p>"""^^rdf:HTML ;
dcterms:modified "2024-03-22T14:31:08.385-04:00"^^xsd:dateTime ;
dcterms:modified "2024-08-31T10:34:12.126-04:00"^^xsd:dateTime ;
dcterms:rights """
This product includes all or a portion of the UCUM table, UCUM codes, and UCUM definitions or is derived from it, subject to a license from Regenstrief Institute, Inc. and The UCUM Organization. Your use of the UCUM table, UCUM codes, UCUM definitions also is subject to this license, a copy of which is available at ​http://unitsofmeasure.org. The current complete UCUM table, UCUM Specification are available for download at ​http://unitsofmeasure.org. The UCUM table and UCUM codes are copyright © 1995-2009, Regenstrief Institute, Inc. and the Unified Codes for Units of Measures (UCUM) Organization. All rights reserved.
THE UCUM TABLE (IN ALL FORMATS), UCUM DEFINITIONS, AND SPECIFICATION ARE PROVIDED 'AS IS.' ANY EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
""" ;
dcterms:rights "The QUDT Ontologies are issued under a Creative Commons Attribution 4.0 International License (CC BY 4.0), available at https://creativecommons.org/licenses/by/4.0/. Attribution should be made to QUDT.org" ;
dcterms:subject "QUDT" ;
dcterms:title "QUDT SHACL Schema - Version 2.1.37" ;
dcterms:title "QUDT SHACL Schema - Version 2.1.42" ;
qudt:informativeReference "http://unitsofmeasure.org/trac"^^xsd:anyURI ;
qudt:informativeReference "http://www.bipm.org/en/publications/si-brochure"^^xsd:anyURI ;
qudt:informativeReference "http://www.bipm.org/utils/common/documents/jcgm/JCGM_200_2008.pdf"^^xsd:anyURI ;
qudt:informativeReference "https://books.google.com/books?id=pIlCAAAAIAAJ&dq=dimensional+analysis&hl=en"^^xsd:anyURI ;
qudt:informativeReference "https://www.nist.gov/physical-measurement-laboratory/special-publication-811"^^xsd:anyURI ;
vaem:graphName "qudt" ;
vaem:graphTitle "Quantities, Units, Dimensions and Types (QUDT) SHACL Schema - Version 2.1.37" ;
vaem:graphTitle "Quantities, Units, Dimensions and Types (QUDT) SHACL Schema - Version 2.1.42" ;
vaem:hasGraphRole vaem:SHACLSchemaGraph ;
vaem:hasOwner vaem:QUDT ;
vaem:hasSteward vaem:QUDT ;
vaem:intent "Specifies the schema for quantities, units and dimensions. Types are defined in other schemas." ;
vaem:isMetadataFor <http://qudt.org/2.1/schema/shacl/qudt> ;
vaem:latestPublishedVersion "https://qudt.org/doc/2024/03/DOC_SCHEMA-SHACL-QUDT-v2.1.html"^^xsd:anyURI ;
vaem:latestPublishedVersion "https://qudt.org/doc/2024/08/DOC_SCHEMA-SHACL-QUDT-v2.1.html"^^xsd:anyURI ;
vaem:logo "https://qudt.org/linkedmodels.org/assets/lib/lm/images/logos/qudt_logo-300x110.png"^^xsd:anyURI ;
vaem:namespace "http://qudt.org/schema/qudt/" ;
vaem:namespacePrefix "qudt" ;
vaem:owner "qudt.org" ;
vaem:previousPublishedVersion "https://qudt.org/doc/2024/02/DOC_SCHEMA-SHACL-QUDT-v2.1.html"^^xsd:anyURI ;
vaem:previousPublishedVersion "https://qudt.org/doc/2024/07/DOC_SCHEMA-SHACL-QUDT-v2.1.html"^^xsd:anyURI ;
vaem:revision "2.1" ;
vaem:turtleFileURL "http://qudt.org/2.1/schema/shacl/qudt"^^xsd:anyURI ;
vaem:usesNonImportedResource dcterms:abstract ;
Expand All @@ -3733,7 +3715,7 @@ THE UCUM TABLE (IN ALL FORMATS), UCUM DEFINITIONS, AND SPECIFICATION ARE PROVIDE
vaem:usesNonImportedResource voag:QUDT-Attribution ;
vaem:withAttributionTo voag:QUDT-Attribution ;
rdfs:isDefinedBy <http://qudt.org/2.1/schema/shacl/qudt> ;
rdfs:label "QUDT SHACL Schema Metadata Version 2.1.37" ;
rdfs:label "QUDT SHACL Schema Metadata Version 2.1.42" ;
owl:versionIRI <http://qudt.org/2.1/schema/shacl/qudt> ;
.
vaem:QUDT
Expand Down
14 changes: 7 additions & 7 deletions support/SHACL-SCHEMA-SUPPLEMENT_QUDT-v2.1.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
a owl:Ontology ;
vaem:hasGraphMetadata vaem:GMD_SHACLQUDTOVERLAY-SCHEMA ;
rdfs:comment "Supplements the generated SHACL Schema with constructs not expressible in the QUDT OWL Ontology" ;
rdfs:label "QUDT SHACL Schema Supplement Version 2.1.37" ;
rdfs:label "QUDT SHACL Schema Supplement Version 2.1.42" ;
owl:imports <http://qudt.org/2.1/schema/shacl/qudt> ;
owl:imports sh: ;
sh:declare [
Expand Down Expand Up @@ -581,28 +581,28 @@ vaem:GMD_SHACLQUDTOVERLAY-SCHEMA
dcterms:created "2020-04-20"^^xsd:date ;
dcterms:creator "Ralph Hodgson" ;
dcterms:description "<p class=\"lm-para\">The QUDT, or \"Quantity, Unit, Dimension and Type\" schema defines the base classes properties, and restrictions used for modeling physical quantities, units of measure, and their dimensions in various measurement systems. This overlay graph provides additional properties that affect the display of entities in a user interface, as well as some SHACL rules.</p>"^^rdf:HTML ;
dcterms:modified "2024-03-22T14:31:43.241-04:00"^^xsd:dateTime ;
dcterms:modified "2024-08-31T10:34:42.434-04:00"^^xsd:dateTime ;
dcterms:rights """
This product includes all or a portion of the UCUM table, UCUM codes, and UCUM definitions or is derived from it, subject to a license from Regenstrief Institute, Inc. and The UCUM Organization. Your use of the UCUM table, UCUM codes, UCUM definitions also is subject to this license, a copy of which is available at ​http://unitsofmeasure.org. The current complete UCUM table, UCUM Specification are available for download at ​http://unitsofmeasure.org. The UCUM table and UCUM codes are copyright © 1995-2009, Regenstrief Institute, Inc. and the Unified Codes for Units of Measures (UCUM) Organization. All rights reserved.
THE UCUM TABLE (IN ALL FORMATS), UCUM DEFINITIONS, AND SPECIFICATION ARE PROVIDED 'AS IS.' ANY EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
""" ;
dcterms:rights "The QUDT Ontologies are issued under a Creative Commons Attribution 4.0 International License (CC BY 4.0), available at https://creativecommons.org/licenses/by/4.0/. Attribution should be made to QUDT.org" ;
dcterms:subject "QUDT" ;
dcterms:title "QUDT SHACL Schema Overlay - Version 2.1.37" ;
dcterms:title "QUDT SHACL Schema Overlay - Version 2.1.42" ;
vaem:graphName "qudtOverlay" ;
vaem:graphTitle "Quantities, Units, Dimensions and Types (QUDT) SHACL Schema Overlay - Version 2.1.37" ;
vaem:graphTitle "Quantities, Units, Dimensions and Types (QUDT) SHACL Schema Overlay - Version 2.1.42" ;
vaem:hasGraphRole vaem:SHACLSchemaOverlayGraph ;
vaem:hasOwner vaem:QUDT ;
vaem:hasSteward vaem:QUDT ;
vaem:intent "Specifies overlay properties and rules for the schema for quantities, units and dimensions. Types are defined in other schemas." ;
vaem:isMetadataFor <http://qudt.org/2.1/schema/shacl/overlay/qudt> ;
vaem:latestPublishedVersion "https://qudt.org/doc/2024/03/DOC_SCHEMA-SHACL-QUDT-OVERLAY-v2.1.html"^^xsd:anyURI ;
vaem:latestPublishedVersion "https://qudt.org/doc/2024/08/DOC_SCHEMA-SHACL-QUDT-OVERLAY-v2.1.html"^^xsd:anyURI ;
vaem:logo "https://qudt.org/linkedmodels.org/assets/lib/lm/images/logos/qudt_logo-300x110.png"^^xsd:anyURI ;
vaem:namespace "http://qudt.org/schema/qudt/" ;
vaem:namespacePrefix "qudt" ;
vaem:owner "qudt.org" ;
vaem:previousPublishedVersion "https://qudt.org/doc/2024/02/DOC_SCHEMA-SHACL-QUDT-OVERLAY-v2.1.html"^^xsd:anyURI ;
vaem:previousPublishedVersion "https://qudt.org/doc/2024/07/DOC_SCHEMA-SHACL-QUDT-OVERLAY-v2.1.html"^^xsd:anyURI ;
vaem:revision "2.1" ;
vaem:turtleFileURL "http://qudt.org/2.1/schema/shacl/overlay/qudt"^^xsd:anyURI ;
vaem:usesNonImportedResource dcterms:abstract ;
Expand All @@ -617,6 +617,6 @@ THE UCUM TABLE (IN ALL FORMATS), UCUM DEFINITIONS, AND SPECIFICATION ARE PROVIDE
vaem:usesNonImportedResource voag:QUDT-Attribution ;
vaem:withAttributionTo voag:QUDT-Attribution ;
rdfs:isDefinedBy <http://qudt.org/2.1/schema/shacl/overlay/qudt> ;
rdfs:label "QUDT SHACL Schema Overlay Metadata Version 2.1.37" ;
rdfs:label "QUDT SHACL Schema Overlay Metadata Version 2.1.42" ;
owl:versionIRI <http://qudt.org/2.1/schema/shacl/overlay/qudt> ;
.
Loading

0 comments on commit 6969e8b

Please sign in to comment.