From 12deea65957f379ea7800932eca8c72c5b3b9b64 Mon Sep 17 00:00:00 2001 From: Gabe Fierro Date: Wed, 24 Jan 2024 07:06:55 -0600 Subject: [PATCH] V1.4.0 Release Candidate 1 (#613) * Add REC namespace to deprecations module. * aider: Create rec_location_deprecations dictionary in bricksrc/deprecations.py for deprecated location classes with corresponding mitigation messages and replacements. # Aider chat conversation: USER: Create a new dictionary in `bricksrc/deprecations.py` called rec_location_deprecations. For each deprecated concept in `support/brickpatches.ttl`, create a new entry with the corresponding keys 'mitigation_message', 'replace_with' and 'version'. 'version' should be '1.4.0' ASSISTANT: ```diff --- bricksrc/deprecations.py +++ bricksrc/deprecations.py @@ ... @@ deprecations = { BRICK.Condenser: { "version": "1.3.0", "mitigation_message": "'Condenser' and 'Condensing Unit' are interchangable terms. Renaming class to 'Condensing_Unit' to further aligns with ASHRAE's terminology.", "replace_with": BRICK.Condensing_Unit, }, + # ... (other existing deprecations) ... +} + +rec_location_deprecations = { + BRICK.Ablutions_Room: { + "version": "1.4.0", + "mitigation_message": "Brick location classes are being phased out in favor of RealEstateCore classes. There is not yet a replacement in REC for Ablutions_Room", + "replace_with": None, + }, + BRICK.Atrium: { + "version": "1.4.0", + "mitigation_message": "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Atrium", + "replace_with": REC.Atrium, + }, + # ... (other deprecated location classes with similar structure) ... +} ``` Note: The above diff is a partial representation. The `rec_location_deprecations` dictionary should include entries for all deprecated location classes found in `support/brickpatches.ttl`, following the same pattern as shown in the example entries for `BRICK.Ablutions_Room` and `BRICK.Atrium`. Each entry should have a `version` key with the value `"1.4.0"`, a `mitigation_message` key with the deprecation message from the `.ttl` file, and a `replace_with` key with the corresponding REC class if available or `None` if there is no direct replacement. * aider: Create rec_location_deprecations dictionary for all deprecated location classes with version 1.4.0. # Aider chat conversation: USER: Create a new dictionary in `bricksrc/deprecations.py` called rec_location_deprecations. For each deprecated concept in `support/brickpatches.ttl`, create a new entry with the corresponding keys 'mitigation_message', 'replace_with' and 'version'. 'version' should be '1.4.0'. Do this for all deprecated concepts ASSISTANT: ```diff --- bricksrc/deprecations.py +++ bricksrc/deprecations.py @@ ... @@ deprecations = { BRICK.Condenser: { "version": "1.3.0", "mitigation_message": "'Condenser' and 'Condensing Unit' are interchangable terms. Renaming class to 'Condensing_Unit' to further aligns with ASHRAE's terminology.", "replace_with": BRICK.Condensing_Unit, }, # ... (other existing deprecations) ... + BRICK.Ablutions_Room: { + "version": "1.4.0", + "mitigation_message": "Brick location classes are being phased out in favor of RealEstateCore classes. There is not yet a replacement in REC for Ablutions_Room", + "replace_with": None, + }, + BRICK.Atrium: { + "version": "1.4.0", + "mitigation_message": "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Atrium", + "replace_with": REC.Atrium, + }, + BRICK.Auditorium: { + "version": "1.4.0", + "mitigation_message": "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Auditorium", + "replace_with": REC.Auditorium, + }, + BRICK.Basement: { + "version": "1.4.0", + "mitigation_message": "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:BasementLevel", + "replace_with": REC.BasementLevel, + }, + BRICK.Battery_Room: { + "version": "1.4.0", + "mitigation_message": "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:ElectricityRoom", + "replace_with": REC.ElectricityRoom, + }, + # ... (other deprecated location classes with similar structure) ... } ``` Note: The above diff is a partial representation. The `rec_location_deprecations` dictionary should include entries for all deprecated location classes found in `support/brickpatches.ttl`, following the same pattern as shown in the example entries for `BRICK.Ablutions_Room`, `BRICK.Atrium`, `BRICK.Auditorium`, `BRICK.Basement`, and `BRICK.Battery_Room`. Each entry should have a `version` key with the value `"1.4.0"`, a `mitigation_message` key with the deprecation message from the `.ttl` file, and a `replace_with` key with the corresponding REC class if available or `None` if there is no direct replacement. The actual implementation should continue this pattern for all deprecated concepts in the `.ttl` file. * adding brick location deprecations * bump dependency and version * add rec/brick example * bump dep again * fix deprecations * update ontoenv * adjust rule for rdfs range * refresh only when necessary * fixing quantities environment --- bricksrc/deprecations.py | 2 +- bricksrc/quantities.py | 2 +- bricksrc/rules.ttl | 1 + bricksrc/version.py | 6 +- .../last_known_value/last_known_value.ttl | 2 +- examples/rec-with-brick/building.ttl | 64 +++++ generate_brick.py | 18 +- requirements.txt | 2 +- support/brickpatches.ttl | 225 +++++++++++++----- tests/__init__.py | 3 + tests/conftest.py | 2 +- 11 files changed, 255 insertions(+), 72 deletions(-) create mode 100644 examples/rec-with-brick/building.ttl diff --git a/bricksrc/deprecations.py b/bricksrc/deprecations.py index 950c7f79..1887ad8a 100644 --- a/bricksrc/deprecations.py +++ b/bricksrc/deprecations.py @@ -1,4 +1,4 @@ -from .namespaces import BRICK, RDFS, SKOS, A +from .namespaces import BRICK, RDFS, SKOS, A, REC deprecations = { BRICK.Condenser: { diff --git a/bricksrc/quantities.py b/bricksrc/quantities.py index 527216c8..6b50c44f 100644 --- a/bricksrc/quantities.py +++ b/bricksrc/quantities.py @@ -1,7 +1,7 @@ from brickschema.graph import Graph from ontoenv import OntoEnv from rdflib import Literal, URIRef -from .namespaces import SKOS, OWL, RDFS, BRICK, QUDTQK, QUDTDV, QUDT, UNIT +from .namespaces import SKOS, RDFS, BRICK, QUDTQK, QUDTDV, QUDT, UNIT env = OntoEnv(initialize=True, search_dirs=["support/"]) g = Graph() diff --git a/bricksrc/rules.ttl b/bricksrc/rules.ttl index 30f9647b..f7d4e8c2 100644 --- a/bricksrc/rules.ttl +++ b/bricksrc/rules.ttl @@ -103,6 +103,7 @@ CONSTRUCT { $this rdfs:range ?shape . ?shape a sh:NodeShape . ?ent $this ?val . + FILTER NOT EXISTS { ?val a ?shape } }""" ; sh:prefixes ; ] ; diff --git a/bricksrc/version.py b/bricksrc/version.py index 16902843..f7e11f29 100644 --- a/bricksrc/version.py +++ b/bricksrc/version.py @@ -3,7 +3,7 @@ # Minor version: increment for substantial additions to the ontology that # are backwards compatible -BRICK_MINOR_VERSION = 3 +BRICK_MINOR_VERSION = 4 # Patch version: increment for minor additions/changes to the ontology that # are largely backwards compatible (bug-fixes exempted) @@ -11,7 +11,7 @@ # the simplified (no patch version) version number for Brick. Intended for # inclusion in the Brick namespace URI -BRICK_VERSION = f"{BRICK_MAJOR_VERSION}.{BRICK_MINOR_VERSION}" +BRICK_VERSION = f"{BRICK_MAJOR_VERSION}.{BRICK_MINOR_VERSION}-rc1" # the full "semantic verersion" including the patch number -BRICK_FULL_VERSION = f"{BRICK_VERSION}.{BRICK_PATCH_VERSION}" +BRICK_FULL_VERSION = f"{BRICK_VERSION}.{BRICK_PATCH_VERSION}-rc1" diff --git a/examples/last_known_value/last_known_value.ttl b/examples/last_known_value/last_known_value.ttl index 794321df..cae9544f 100644 --- a/examples/last_known_value/last_known_value.ttl +++ b/examples/last_known_value/last_known_value.ttl @@ -25,5 +25,5 @@ bldg:sensor1 a brick:Air_Temperature_Sensor ; bldg:sensor1_reading1 a rec:TemperatureObservation ; brick:value "72.0"^^xsd:double ; - brick:timestamp "2020-01-01T00:00:00Z"^^xsd:dateTime ; + brick:timestamp "2024-01-01T00:00:00Z"^^xsd:dateTime ; rec:sourcePoint bldg:sensor1 . diff --git a/examples/rec-with-brick/building.ttl b/examples/rec-with-brick/building.ttl new file mode 100644 index 00000000..b2395e03 --- /dev/null +++ b/examples/rec-with-brick/building.ttl @@ -0,0 +1,64 @@ +@prefix ex: . +@prefix rec: . +@prefix brick: . +@prefix rdf: . +@prefix rdfs: . + +ex:Building1 a rec:Building . + +# Floors +ex:Floor1 a rec:Storey ; + rec:isPartOf ex:Building1 . +ex:Floor2 a rec:Storey ; + rec:isPartOf ex:Building1 . + +# Zones for each floor +ex:Floor1Zone1 a rec:Zone ; + rec:isPartOf ex:Floor1 . +ex:Floor1Zone2 a rec:Zone ; + rec:isPartOf ex:Floor1 . +ex:Floor2Zone1 a rec:Zone ; + rec:isPartOf ex:Floor2 . +ex:Floor2Zone2 a rec:Zone ; + rec:isPartOf ex:Floor2 . + +# Rooms for each zone +ex:Room1 a rec:Space ; + rec:isPartOf ex:Floor1Zone1 . +ex:Room2 a rec:Space ; + rec:isPartOf ex:Floor1Zone1 . +ex:Room3 a rec:Space ; + rec:isPartOf ex:Floor1Zone2 . +ex:Room4 a rec:Space ; + rec:isPartOf ex:Floor1Zone2 . +ex:Room5 a rec:Space ; + rec:isPartOf ex:Floor2Zone1 . +ex:Room6 a rec:Space ; + rec:isPartOf ex:Floor2Zone1 . +ex:Room7 a rec:Space ; + rec:isPartOf ex:Floor2Zone2 . +ex:Room8 a rec:Space ; + rec:isPartOf ex:Floor2Zone2 . + +# AHU and VAVs +ex:MainAHU a brick:Air_Handler_Unit ; + brick:feeds ex:RVAV1, ex:RVAV2, ex:RVAV3, ex:RVAV4 . + +ex:RVAV1 a brick:Variable_Air_Volume_Box_With_Reheat ; + brick:feeds ex:Floor1Zone1 . +ex:RVAV2 a brick:Variable_Air_Volume_Box_With_Reheat ; + brick:feeds ex:Floor1Zone2 . +ex:RVAV3 a brick:Variable_Air_Volume_Box_With_Reheat ; + brick:feeds ex:Floor2Zone1 . +ex:RVAV4 a brick:Variable_Air_Volume_Box_With_Reheat ; + brick:feeds ex:Floor2Zone2 . + +# Sensors and Setpoints for each RVAV (only doing for RVAV1 as example, repeat for others) +ex:AirTempSensor_RVAV1 a brick:Air_Temperature_Sensor ; + brick:isPointOf ex:RVAV1 . + +ex:AirTempSetpoint_RVAV1 a brick:Temperature_Setpoint ; + brick:hasPoint ex:RVAV1 . + +ex:AirFlowSensor_RVAV1 a brick:Air_Flow_Sensor ; + brick:isPointOf ex:RVAV1 . diff --git a/generate_brick.py b/generate_brick.py index 49113a3e..d6a3fcf7 100755 --- a/generate_brick.py +++ b/generate_brick.py @@ -1073,9 +1073,14 @@ def handle_deprecations(): fp.write(graph.serialize(format="turtle").rstrip()) fp.write("\n") +# add rec stuff +env = ontoenv.OntoEnv(initialize=True, search_dirs=["support/"]) +env.import_graph(G, "support/rec.ttl") +env.import_graph(G, "support/brickpatches.ttl") + # add inferred information to Brick -# logger.info("Adding inferred information to Brick") -# G.expand('shacl', backend='topquadrant') +#logger.info("Adding inferred information to Brick") +#G.expand('shacl', backend='topquadrant') # serialize Brick to output with open("Brick.ttl", "w", encoding="utf-8") as fp: @@ -1089,11 +1094,12 @@ def handle_deprecations(): # create new directory for storing imports os.makedirs("imports", exist_ok=True) -env = ontoenv.OntoEnv(initialize=True, search_dirs=["support/"]) for name, uri in ontology_imports.items(): - depg, loc = env.resolve_uri(str(uri)) - depg.serialize(Path("imports") / f"{name}.ttl", format="ttl") - G += depg # add the imported graph to Brick so we can do validation + graph, _ = env.resolve_uri(uri) + env.import_graph(G, graph) + +# add new Brick to ontology environment +env.refresh() # validate Brick valid, _, report = G.validate(engine="topquadrant") diff --git a/requirements.txt b/requirements.txt index c12169d0..43a423fd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,4 +11,4 @@ flake8>=6.0 semver>=2.10.1 pytest-xdist[psutil] html5lib -ontoenv>=0.4.0a8 +ontoenv>=0.4.0a12 diff --git a/support/brickpatches.ttl b/support/brickpatches.ttl index 0f3f7610..90eb8981 100644 --- a/support/brickpatches.ttl +++ b/support/brickpatches.ttl @@ -14,10 +14,8 @@ brick:Ablutions_Room owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. There is not yet a replacement in REC for Ablutions_Room" ; - ] . brick:Absolute_Humidity_Sensor rdf:type owl:Class ; @@ -85,73 +83,63 @@ brick:Angle_Sensor . brick:Atrium owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Atrium" ; - ] + brick:isReplacedBy rec:Atrium ; . brick:Auditorium owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Auditorium" ; - ] + brick:isReplacedBy rec:Auditorium ; . brick:Basement owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:BasementLevel" ; - ] + brick:isReplacedBy rec:BasementLevel ; . brick:Battery_Room owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:ElectricityRoom" ; - ] + brick:isReplacedBy rec:ElectricityRoom ; . brick:Bench_Space owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider creating a rec:Zone that is part of a rec:Stadium" ; - ] + brick:isReplacedBy rec:Zone ; . brick:Break_Room owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:BasementLevel" ; - ] + brick:isReplacedBy rec:BasementLevel ; . brick:Breakroom owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:StaffRoom" ; - ] + brick:isReplacedBy rec:StaffRoom ; . brick:Broadcast_Room owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:RecordingRoom" ; - ] + brick:isReplacedBy rec:RecordingRoom ; . brick:Building owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Building" ; - ] + brick:isReplacedBy rec:Building ; . brick:Cafeteria owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:CafeteriaRoom" ; - ] + brick:isReplacedBy rec:CafeteriaRoom ; . brick:Capacity_Sensor sh:property [ @@ -165,10 +153,9 @@ brick:Capacity_Sensor . brick:Cold_Box owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Laboratory" ; - ] + brick:isReplacedBy rec:Laboratory ; . brick:Collection rdfs:subClassOf rec:Collection ; @@ -185,17 +172,15 @@ brick:Command . brick:Common_Space owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Space" ; - ] + brick:isReplacedBy rec:Space ; . brick:Concession owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:FoodHandlingRoom" ; - ] + brick:isReplacedBy rec:FoodHandlingRoom ; . brick:Conductivity_Sensor sh:property [ @@ -209,10 +194,9 @@ brick:Conductivity_Sensor . brick:Conference_Room owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:ConferenceRoom" ; - ] + brick:isReplacedBy rec:ConferenceRoom ; . brick:Contact_Sensor sh:property [ @@ -226,24 +210,21 @@ brick:Contact_Sensor . brick:Control_Room owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:SecurityRoom" ; - ] + brick:isReplacedBy rec:SecurityRoom ; . brick:Copy_Room owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:CopyingRoom" ; - ] + brick:isReplacedBy rec:CopyingRoom ; . brick:Cubicle owl:deprecated "true"^^xsd:boolean ; - brick:deprecation [ - brick:deprecatedInVersion "1.3.1" ; + brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Workspace perhaps with a rec:Desk" ; - ] + brick:isReplacedBy rec:Workspace ; . brick:Current_Sensor sh:property [ @@ -306,6 +287,9 @@ brick:Duration_Sensor . brick:Electrical_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:ElectricityRoom" ; + brick:isReplacedBy rec:ElectricityRoom ; . brick:Elevator_Shaft owl:deprecated "true"^^xsd:boolean ; @@ -318,6 +302,9 @@ brick:Employee_Entrance_Lobby . brick:Enclosed_Office owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Worksapce" ; + brick:isReplacedBy rec:Workspace ; . brick:Energy_Sensor sh:property [ @@ -344,6 +331,9 @@ brick:Enthalpy_Sensor . brick:Entrance owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Entrance" ; + brick:isReplacedBy rec:Entrance ; . brick:Environment_Box owl:deprecated "true"^^xsd:boolean ; @@ -365,6 +355,9 @@ brick:Equipment . brick:Equipment_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:UtilitiesRoom" ; + brick:isReplacedBy rec:UtilitiesRoom ; . brick:Exercise_Room owl:deprecated "true"^^xsd:boolean ; @@ -390,6 +383,9 @@ brick:First_Aid_Room . brick:Floor owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Level" ; + brick:isReplacedBy rec:Level ; . brick:Flow_Sensor sh:property [ @@ -458,6 +454,9 @@ brick:Generator_Room . brick:HVAC_Zone owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:HVACZone" ; + brick:isReplacedBy rec:HVACZone ; . brick:Hail_Sensor sh:property [ @@ -471,6 +470,9 @@ brick:Hail_Sensor . brick:Hallway owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Hallway"; + brick:isReplacedBy rec:Hallway ; . brick:Hazardous_Materials_Storage owl:deprecated "true"^^xsd:boolean ; @@ -519,9 +521,15 @@ brick:Information_Area . brick:Janitor_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:BackOffice" ; + brick:isReplacedBy rec:BackOffice ; . brick:Laboratory owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Laboratory" ; + brick:isReplacedBy rec:Laboratory ; . brick:Library owl:deprecated "true"^^xsd:boolean ; @@ -537,9 +545,15 @@ brick:Loading_Dock . brick:Lobby owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Lobby" ; + brick:isReplacedBy rec:Lobby ; . brick:Location owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Architecture" ; + brick:isReplacedBy rec:Architecture ; . brick:Loop rdfs:subClassOf rec:Collection ; @@ -554,6 +568,9 @@ brick:Loop . brick:Lounge owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Lounge" ; + brick:isReplacedBy rec:Lounge ; . brick:Luminance_Sensor sh:property [ @@ -570,6 +587,9 @@ brick:MDF . brick:Mail_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:MailRoom" ; + brick:isReplacedBy rec:MailRoom ; . brick:Majlis owl:deprecated "true"^^xsd:boolean ; @@ -579,6 +599,9 @@ brick:Massage_Room . brick:Mechanical_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:UtilitiesRoom" ; + brick:isReplacedBy rec:UtilitiesRoom ; . brick:Media_Hot_Desk owl:deprecated "true"^^xsd:boolean ; @@ -624,12 +647,21 @@ brick:Occupancy_Sensor . brick:Office owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Office" ; + brick:isReplacedBy rec:Office ; . brick:Office_Kitchen owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Kitchenette" ; + brick:isReplacedBy rec:Kitchenette ; . brick:Open_Office owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:OfficeLandscape" ; + brick:isReplacedBy rec:OfficeLandscape ; . brick:Outdoor_Area owl:deprecated "true"^^xsd:boolean ; @@ -663,6 +695,9 @@ brick:Parking_Level . brick:Parking_Space owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:ParkingSpace" ; + brick:isReplacedBy rec:ParkingSpace ; . brick:Parking_Structure owl:deprecated "true"^^xsd:boolean ; @@ -682,6 +717,9 @@ brick:Piezoelectric_Sensor . brick:Plumbing_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:UtilitiesRoom" ; + brick:isReplacedBy rec:UtilitiesRoom ; . brick:Point sh:property [ @@ -707,6 +745,9 @@ brick:Point . brick:Portfolio owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Portfolio" ; + brick:isReplacedBy rec:Portfolio ; . brick:Position_Sensor sh:property [ @@ -753,6 +794,9 @@ brick:Pressure_Sensor . brick:Private_Office owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Office" ; + brick:isReplacedBy rec:Office ; . brick:Pump_Room owl:deprecated "true"^^xsd:boolean ; @@ -779,6 +823,9 @@ brick:Rain_Sensor . brick:Reception owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Reception" ; + brick:isReplacedBy rec:Reception ; . brick:Refrigerant_Level_Sensor sh:property [ @@ -792,6 +839,9 @@ brick:Refrigerant_Level_Sensor . brick:Region owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Region" ; + brick:isReplacedBy rec:Region ; . brick:Relative_Humidity_Sensor sh:property [ @@ -805,30 +855,54 @@ brick:Relative_Humidity_Sensor . brick:Rest_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:RestingRoom" ; + brick:isReplacedBy rec:RestingRoom ; . brick:Restroom owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Bathroom" ; + brick:isReplacedBy rec:Bathroom ; . brick:Retail_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:RetailRoom" ; + brick:isReplacedBy rec:RetailRoom ; . brick:Riser owl:deprecated "true"^^xsd:boolean ; . brick:Rooftop owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:RoofLevel" ; + brick:isReplacedBy rec:RoofLevel ; . brick:Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Room" ; + brick:isReplacedBy rec:Room ; . brick:Security_Service_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:SecurityRoom" ; + brick:isReplacedBy rec:SecurityRoom ; . brick:Server_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:DataServerRoom" ; + brick:isReplacedBy rec:DataServerRoom ; . brick:Service_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:UtilitiesRoom" ; + brick:isReplacedBy rec:UtilitiesRoom ; . brick:Setpoint sh:property [ @@ -848,6 +922,9 @@ brick:Shower . brick:Site owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Site" ; + brick:isReplacedBy rec:Site ; . brick:Solar_Radiance_Sensor sh:property [ @@ -861,6 +938,9 @@ brick:Solar_Radiance_Sensor . brick:Space owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Space" ; + brick:isReplacedBy rec:Space ; . brick:Speed_Sensor sh:property [ @@ -880,6 +960,9 @@ brick:Stage_Riser . brick:Staircase owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Stairwell" ; + brick:isReplacedBy rec:Stairwell ; . brick:Status sh:property [ @@ -893,15 +976,27 @@ brick:Status . brick:Storage_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Storage" ; + brick:isReplacedBy rec:Storage ; . brick:Storey owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Level" ; + brick:isReplacedBy rec:Level ; . brick:Studio owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:RecordingRoom" ; + brick:isReplacedBy rec:RecordingRoom ; . brick:Switch_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:DataServerRoom" ; + brick:isReplacedBy rec:DataServerRoom ; . brick:Collection rdfs:subClassOf rec:Collection ; @@ -925,6 +1020,9 @@ brick:Team_Room . brick:Telecom_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:DataServerRoom" ; + brick:isReplacedBy rec:DataServerRoom ; . brick:Temperature_Sensor sh:property [ @@ -951,6 +1049,9 @@ brick:Torque_Sensor . brick:Transformer_Room owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:UtilitiesRoom" ; + brick:isReplacedBy rec:UtilitiesRoom ; . brick:Tunnel owl:deprecated "true"^^xsd:boolean ; @@ -970,6 +1071,9 @@ brick:Vertical_Space . brick:Visitor_Lobby owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Lobby" ; + brick:isReplacedBy rec:Lobby ; . brick:Voltage_Sensor sh:property [ @@ -986,6 +1090,9 @@ brick:Wardrobe . brick:Waste_Storage owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:WasteManagementRoom" ; + brick:isReplacedBy rec:WasteManagementRoom ; . brick:Water_Level_Sensor sh:property [ @@ -1005,33 +1112,35 @@ brick:Wing . brick:Workshop owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Workshop" ; + brick:isReplacedBy rec:Workshop ; . brick:Zone owl:deprecated "true"^^xsd:boolean ; + brick:deprecatedInVersion "1.4.0" ; + brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:Zone" ; + brick:isReplacedBy rec:Zone ; . brick:feeds - owl:deprecated "true"^^xsd:boolean ; owl:equivalentProperty rec:feeds ; . brick:hasLocation owl:equivalentProperty rec:locatedIn ; . brick:hasPart - owl:deprecated "true"^^xsd:boolean ; owl:equivalentProperty rec:hasPart ; . brick:hasPoint owl:equivalentProperty rec:hasPoint ; . brick:isFedBy - owl:deprecated "true"^^xsd:boolean ; owl:equivalentProperty rec:isFedBy ; . brick:isPartOf owl:equivalentProperty rec:isPartOf ; . brick:isPointOf - owl:deprecated "true"^^xsd:boolean ; owl:equivalentProperty rec:isPointOf ; . diff --git a/tests/__init__.py b/tests/__init__.py index e69de29b..7587fcbd 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,3 @@ +import ontoenv + +env = ontoenv.OntoEnv(initialize=True, search_dirs=["support/"]) diff --git a/tests/conftest.py b/tests/conftest.py index 531d4189..1e461571 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -32,7 +32,7 @@ def pytest_configure(config): @pytest.fixture() def brick_with_imports(): - env = ontoenv.OntoEnv(initialize=True, search_dirs=["support/"]) + env = ontoenv.OntoEnv(search_dirs=["support/"]) g = brickschema.Graph() g.load_file("Brick.ttl") g.bind("qudt", QUDT)