Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated QUDT to v2.1.32 #579

Merged
merged 54 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
628793e
swapping out brick quantitykinds for QUDT QKs when Brick adds nothing
gtfierro Sep 27, 2023
b91cfe6
Updated QUDT
steveraysteveray Oct 25, 2023
e7d956a
Made SystemOfUnits import QUDT Prefixes
steveraysteveray Oct 25, 2023
d4861d3
Merge remote-tracking branch 'origin/master' into srr-update-qudt
gtfierro Dec 7, 2023
2905aa2
use topquadrant for SHACL
gtfierro Dec 8, 2023
932e8ea
switch reasoning on qudt
gtfierro Dec 14, 2023
9fa1975
Merge remote-tracking branch 'origin/gtf-use-qudtqk' into srr-update-…
gtfierro Dec 14, 2023
b0df8bb
formatting
gtfierro Dec 30, 2023
d7eafab
remove broken HTML, add missing namespace to QUDT
gtfierro Dec 30, 2023
98269f3
remove brick:Power quantity kind
gtfierro Dec 30, 2023
a2a9d1d
fix old "substances" annotation
gtfierro Dec 30, 2023
8c4997a
format sensor.py
gtfierro Dec 30, 2023
8c1a141
remove old definitions
gtfierro Dec 30, 2023
eec66d9
format equipment.py
gtfierro Dec 30, 2023
30a7f68
more qudt imports
gtfierro Dec 30, 2023
1cedf6b
formatting and some minor fixes/optimizations
gtfierro Dec 30, 2023
f876085
formatting tests, fixing a few to account for QUDT
gtfierro Dec 30, 2023
181eb56
formatting
gtfierro Dec 30, 2023
2c5f11e
aider: Added BRICK.hasQuantity annotations to subclasses of Current_R…
gtfierro Dec 30, 2023
670a436
aider: Add BRICK.hasQuantity annotations to subclasses of Flow_Setpoi…
gtfierro Dec 30, 2023
f075bd8
aider: Replace BRICK.Flow_Loss, BRICK.Flow and BRICK.VolumeFlowRate w…
gtfierro Dec 30, 2023
50c07ff
aider: Ensure all subclasses of `Humidity_Setpoint` use the correct q…
gtfierro Dec 30, 2023
ce52b97
Remove unused quantity definitions and references.
gtfierro Dec 30, 2023
31948d8
Update setpoint definitions to use QUDTQK for volume flow rate and re…
gtfierro Dec 30, 2023
39f19eb
qudt flow
gtfierro Dec 30, 2023
b326f6c
more quantity fixes
gtfierro Dec 30, 2023
fd70344
aider: Added function to recursively inherit BRICK.hasQuantity annota…
gtfierro Dec 30, 2023
e5f2dc4
Remove redundant BRICK.hasQuantity properties and update one occurren…
gtfierro Dec 30, 2023
9e89aa7
Add BRICK.hasQuantity to every subclass in setpoint.py.
gtfierro Dec 30, 2023
35cd54d
working with quantities
gtfierro Dec 30, 2023
3abfcd4
skolemize entity properties when doing subproperties
gtfierro Dec 30, 2023
f05c20c
Removed "Dewpoint" from `bricksrc/quantities.py` and replaced all ref…
gtfierro Dec 30, 2023
1c962f8
Change sensor quantity property to use QUDTQK for dewpoint temperature.
gtfierro Dec 30, 2023
45a185e
Replace all references to BRICK.Dewpoint in `bricksrc/sensor.py` with…
gtfierro Dec 30, 2023
2797311
Fix the syntax in bricksrc/setpoint.py.
gtfierro Dec 30, 2023
6f5800b
Removed unnecessary BRICK.hasQuantity and BRICK.hasSubstance properti…
gtfierro Dec 30, 2023
2dacb85
Add appropriate tags to the `Demand_Setpoint` subclass.
gtfierro Dec 30, 2023
62fbd0b
Add BRICK.hasQuantity with value QUDTQK.Temperature to the Temperatur…
gtfierro Dec 30, 2023
3d3a1ed
Add BRICK.hasQuantity with value QUDTQK.VolumeFlowRate to the Flow_Se…
gtfierro Dec 30, 2023
268b621
Remove duplicate "BRICK.hasQuantity: QUDTQK.DewPointTemperature" entr…
gtfierro Dec 30, 2023
ea00767
add quantities to all sensors and setpoints
gtfierro Dec 30, 2023
eee35ac
remove old definitions
gtfierro Dec 30, 2023
da93a63
import ref-schema
gtfierro Dec 30, 2023
795ac17
fix sparqltarget in rules
gtfierro Jan 3, 2024
8485b48
removing bad html from qudt
gtfierro Jan 3, 2024
2c1c763
add rdf prefix to ref-schema
gtfierro Jan 3, 2024
9d9ea6a
adjusting tests
gtfierro Jan 3, 2024
447cee6
Merge branch 'master' into srr-update-qudt
gtfierro Jan 3, 2024
518cf9a
bump deps
gtfierro Jan 4, 2024
a23839a
Merge branch 'srr-update-qudt' of github.com:BrickSchema/Brick into s…
gtfierro Jan 4, 2024
1af2140
bump brickschema
gtfierro Jan 4, 2024
c7e7ceb
bump deps
gtfierro Jan 4, 2024
9620f3b
bump brickschema
gtfierro Jan 4, 2024
c70406e
always initialize ontoenv
gtfierro Jan 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions bricksrc/alarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
],
"subclasses": {
"Low_Supply_Air_Flow_Alarm": {
"aliases": [BRICK["Low_Discharge_Air_Flow_Alarm"]],
"aliases": [
BRICK["Low_Discharge_Air_Flow_Alarm"]
],
"tags": [
TAG.Point,
TAG.Air,
Expand Down Expand Up @@ -217,7 +219,11 @@
],
"subclasses": {
"High_Supply_Air_Temperature_Alarm": {
"aliases": [BRICK["High_Discharge_Air_Temperature_Alarm"]],
"aliases": [
BRICK[
"High_Discharge_Air_Temperature_Alarm"
]
],
"tags": [
TAG.Point,
TAG.High,
Expand All @@ -230,7 +236,9 @@
"parents": [BRICK.High_Temperature_Alarm],
},
"Low_Supply_Air_Temperature_Alarm": {
"aliases": [BRICK["Low_Discharge_Air_Temperature_Alarm"]],
"aliases": [
BRICK["Low_Discharge_Air_Temperature_Alarm"]
],
"tags": [
TAG.Point,
TAG.Low,
Expand Down Expand Up @@ -288,7 +296,9 @@
"tags": [TAG.Point, TAG.Smoke, TAG.Detection, TAG.Alarm],
"subclasses": {
"Supply_Air_Smoke_Detection_Alarm": {
"aliases": [BRICK["Discharge_Air_Smoke_Detection_Alarm"]],
"aliases": [
BRICK["Discharge_Air_Smoke_Detection_Alarm"]
],
"tags": [
TAG.Point,
TAG.Supply,
Expand Down
9 changes: 8 additions & 1 deletion bricksrc/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@
},
"Gas_System": {"tags": [TAG.Gas, TAG.System]},
"Heating_Ventilation_Air_Conditioning_System": {
"tags": [TAG.Heat, TAG.Ventilation, TAG.Air, TAG.Conditioning, TAG.HVAC, TAG.System],
"tags": [
TAG.Heat,
TAG.Ventilation,
TAG.Air,
TAG.Conditioning,
TAG.HVAC,
TAG.System,
],
"aliases": [BRICK["HVAC_System"]],
"subclasses": {
"Air_System": {
Expand Down
1 change: 0 additions & 1 deletion bricksrc/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
},
"Humidify_Command": {
"tags": [TAG.Point, TAG.Humidify, TAG.Command],
BRICK.hasQuantity: BRICK.Humidity,
},
"Position_Command": {
"tags": [TAG.Point, TAG.Position, TAG.Command],
Expand Down
15 changes: 0 additions & 15 deletions bricksrc/definitions.csv

Large diffs are not rendered by default.

42 changes: 26 additions & 16 deletions bricksrc/deprecations.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
from .namespaces import BRICK, RDFS, SKOS, A

deprecations = {
BRICK.Heat_Sensor: {
"version": "1.4.0",
"mitigation_message": "This class has a poor definition is supplanted by Temperature_Sensor",
"replace_with": BRICK.Temperature_Sensor,
},
BRICK.Trace_Heat_Sensor: {
"version": "1.4.0",
"mitigation_message": "Removed due to unclear definition",
"replace_with": BRICK.Sensor,
},
BRICK.Solar_Radiance_Sensor: {
"version": "1.3.0",
"mitigation_message": "The class 'Solar_Radiance_Sensor' is deprecated in favor of 'Solar_Irradiance_Sensor'. The new name better reflects the standard unit of measurement, watts per square meter (W/m²), and aligns with the terminology commonly used in solar applications.",
"replace_with": BRICK.Solar_Irradiance_Sensor,
RDFS.subClassOf: BRICK.Sensor,
},
BRICK.Occupied_Air_Temperature_Cooling_Setpoint: {
"version": "1.3.0",
"mitigation_message": "'Occupied_Air_Temperature_Cooling_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Occupied_Cooling_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Occupied_Air_Temperature_Setpoint,
"version": "1.3.0",
"mitigation_message": "'Occupied_Air_Temperature_Cooling_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Occupied_Cooling_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Occupied_Air_Temperature_Setpoint,
},
BRICK.Occupied_Air_Temperature_Heating_Setpoint: {
"version": "1.3.0",
"mitigation_message": "'Occupied_Air_Temperature_Heating_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Occupied_Heating_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Occupied_Air_Temperature_Setpoint,
"version": "1.3.0",
"mitigation_message": "'Occupied_Air_Temperature_Heating_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Occupied_Heating_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Occupied_Air_Temperature_Setpoint,
},
BRICK.Unoccupied_Air_Temperature_Cooling_Setpoint: {
"version": "1.3.0",
"mitigation_message": "'Unoccupied_Air_Temperature_Cooling_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Unoccupied_Cooling_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Unoccupied_Air_Temperature_Setpoint,
"version": "1.3.0",
"mitigation_message": "'Unoccupied_Air_Temperature_Cooling_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Unoccupied_Cooling_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Unoccupied_Air_Temperature_Setpoint,
},
BRICK.Unoccupied_Air_Temperature_Heating_Setpoint: {
"version": "1.3.0",
"mitigation_message": "'Unoccupied_Air_Temperature_Heating_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Unoccupied_Heating_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Unoccupied_Air_Temperature_Setpoint,
"version": "1.3.0",
"mitigation_message": "'Unoccupied_Air_Temperature_Heating_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Unoccupied_Heating_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Unoccupied_Air_Temperature_Setpoint,
},
BRICK.Effective_Air_Temperature_Cooling_Setpoint: {
"version": "1.3.0",
Expand Down
6 changes: 3 additions & 3 deletions bricksrc/entity_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
from collections import defaultdict
from rdflib import Literal
from .namespaces import BRICK, RDFS, SKOS, UNIT, XSD, SH, BSH, REF
from .namespaces import BRICK, RDFS, SKOS, UNIT, XSD, SH, BSH, REF, QUDTQK

# these are the "relationship"/predicates/OWL properties that
# relate a Brick entity to a structured value.
Expand Down Expand Up @@ -461,7 +461,7 @@
BRICK.longitude: {"datatype": BSH.NumericValue},
},
},
BSH.TiltShape: {"unitsFromQuantity": BRICK.Angle, "datatype": BSH.NumericValue},
BSH.TiltShape: {"unitsFromQuantity": QUDTQK.Angle, "datatype": BSH.NumericValue},
BSH.TemperatureShape: {
"unitsFromQuantity": BRICK.Temperature,
"datatype": BSH.NumericValue,
Expand All @@ -471,7 +471,7 @@
"datatype": BSH.NumericValue,
},
BSH.AzimuthShape: {
"unitsFromQuantity": BRICK.Angle,
"unitsFromQuantity": QUDTQK.Angle,
"datatype": BSH.NumericValue,
"rotationalDirection": {"values": ["clockwise", "counterclockwise"]},
"referenceDirection": {"values": ["North", "South", "East", "West"]},
Expand Down
11 changes: 6 additions & 5 deletions bricksrc/ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
ontology_imports = {
"qudtschema": "http://qudt.org/2.1/schema/shacl/qudt",
"qudtoverlay": "http://qudt.org/2.1/schema/shacl/overlay/qudt",
"qudtfacade": "http://qudt.org/2.1/schema/facade/qudt",
"qudtsou": "http://qudt.org/2.1/vocab/sou",
"unit": "http://qudt.org/2.1/vocab/unit",
"currency": "http://qudt.org/2.1/vocab/currency",
"quantitykind": "http://qudt.org/2.1/vocab/quantitykind",
"dimensionvector": "http://qudt.org/2.1/vocab/dimensionvector",
"bacnet": "http://data.ashrae.org/bacnet/2020",
"quantitykind": "http://qudt.org/2.1/vocab/quantitykind",
"qudtsou": "http://qudt.org/2.1/vocab/sou",
"qudtdv": "http://qudt.org/2.1/vocab/dimensionvector",
"qudtprefix": "http://qudt.org/2.1/vocab/prefix",
"ref": "https://brickschema.org/schema/Brick/ref",
}

shacl_namespace_declarations = [
Expand Down Expand Up @@ -80,6 +80,7 @@

BRICK_IRI_VERSION = URIRef(f"https://brickschema.org/schema/{BRICK_VERSION}/Brick")


def define_ontology(G):
G.add((BRICK_IRI_VERSION, RDF.type, OWL.Ontology))
G.add((BRICK_IRI_VERSION, RDFS.isDefinedBy, BRICK_IRI_VERSION))
Expand Down
Loading