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

V1.4.0 Release Candidate 1 #613

Merged
merged 17 commits into from
Jan 24, 2024
Merged

V1.4.0 Release Candidate 1 #613

merged 17 commits into from
Jan 24, 2024

Conversation

gtfierro
Copy link
Member

No description provided.

…ations.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.
… 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.
@gtfierro gtfierro added this to the 1.4.0 Pre-Release milestone Jan 17, 2024
@gtfierro gtfierro self-assigned this Jan 17, 2024
@steveraysteveray
Copy link
Collaborator

@gtfierro, I was going to test this branch, but found some errors running generate_brick.py (I believe during the validation phase):

2024-01-18:10:09:46,199 ERROR   [__init__.py:350] Could not resolve https://brickschema.org/schema/1.3/Brick (No definition for https://brickschema.org/schema/1.3/Brick: https://brickschema.org/schema/1.3/Brick:1:0: not well-formed (invalid token))

This seems odd because the base uri is https://brickschema.org/schema/1.4-rc1/Brick. Not sure how this reference crept in.

Moving on, it did create brick.ttl, so I loaded it in TBC. However, TBC would not execute the reasoner because it complained that rdf:type had an undefined prefix (presumably inside a SPARQLRule, but I checked them all manually and they seem good).

I should note that the master branch does run in TBC, albeit it creates many new triples in the bacnet namespace... all due to this rule:

bsh:RDFSRangeRule a sh:NodeShape ;
    sh:rule [ a sh:SPARQLRule ;
            sh:construct """
CONSTRUCT {
    ?val a ?shape .
} WHERE {
    $this rdfs:range ?shape .
    ?shape a sh:NodeShape .
    ?ent $this ?val .
}""" ;
            sh:prefixes <https://brickschema.org/schema/1.4-rc1/Brick> ] ;
    sh:targetSubjectsOf rdfs:range .

It has been a while...

@gtfierro
Copy link
Member Author

Thanks! I'll take a closer look at that rule and see if I can determine why that other issue with the namespace is showing up

@gtfierro gtfierro merged commit 12deea6 into master Jan 24, 2024
4 checks passed
@gtfierro gtfierro deleted the v1.4.0-rc1 branch January 24, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants