Skip to content

Commit

Permalink
V1.2.1 release (#309)
Browse files Browse the repository at this point in the history
* added radiant system temperature sensor classes

* added radiant system temperature setpoints

* deleted property from embedded temp sensor

* starting v1.2.1 release

* branch stuff

* added diff temp points and water temp setpoints (#277)

Co-authored-by: Gabe Fierro <[email protected]>

* Added Differential Pressure Points (#276)

* added and restructured diff pressure points

* added a more specific tag for diff pressure to resolve over infer

Co-authored-by: Gabe Fierro <[email protected]>

* use more generic differential pressure quantity for sensors

* more stuff

* working on versions, directions

* fix transmittence typo

* make sure we do not add duplicate RDFS labels (#307)

* remove controls (#310)

* Allow Entity Properties to have generic numeric values (#311)

* add list to help entity properties have generic numeric values

* minor refactor

* update shacl tag test

* adjusting implementation of radiant temp sensors

* fix misplaced tags

* load local extenstion files

* Expand ApplicableUnits annotations (#306)

* update QUDT, use skos:broader hierarchy traversals

* switch to CelsiusTemperature

* try out Temperature

* use narrower, not broader

* traverse up, not down the skos hierarchy

* removing skos:narrower traversal

* derive units from the quantity

Co-authored-by: Gabe Fierro <[email protected]>

* fix bad merge

* first draft of release notes

Co-authored-by: Carlos Duarte <[email protected]>
Co-authored-by: Gabe Fierro <[email protected]>
Co-authored-by: Jason B. Koh <[email protected]>
  • Loading branch information
4 people authored Aug 13, 2021
1 parent cfdded8 commit b452b00
Show file tree
Hide file tree
Showing 20 changed files with 1,875 additions and 1,106 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
.PHONY: format

Brick.ttl: bricksrc/*.py bricksrc/definitions.csv generate_brick.py
Brick.ttl: bricksrc/*.py bricksrc/*.ttl bricksrc/definitions.csv generate_brick.py
mkdir -p extensions
python generate_brick.py
cd shacl && python generate_shacl.py

shacl/BrickShape.ttl: bricksrc/*.py generate_brick.py shacl/generate_shacl.py
cd shacl && python generate_shacl.py

clean:
rm Brick.ttl Brick+extensions.ttl

format:
black generate_brick.py
black shacl/
Expand Down
61 changes: 61 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Release Notes

This document contains the items that need to be done to prepare Brick for a release.

## Version Number

Change the version number in `bricksrc/version.py`; this will usually involve changing either the **patch** version or the **minor** version.

## Branch

Create a new branch to centralize the final changes for the release; something like `v1.2.1` or `v1.2.1-release` is appropriate. Push this branch to GitHub and use it as the merge target for any outstanding PRs.

When the branch is finished and the release is ready, merge it into the `master` branch on GitHub.

## Release Notes

Now the release notes can be prepared.

Use the output of the `tools/compare_versions` tool to generate a list of what has changed since the last release of Brick. This *can* be a URL, and in fact this is the easist way of comparing the current build with the previous build: specifically, what classes/concepts are added or removed. Take a look at the bottom of https://github.com/BrickSchema/Brick/releases/tag/v1.2.0 as an example for what this should look like in the release.

Due to a limitation of the `compare_versions` tool, it is currently necessary to download all Brick.ttl files that will be compared and to manually adjust the namespaces so that they are versioned, e.g. `https://brickschema.org/schema/Brick#` becomes `https://brickschema.org/schema/1.2.1/Brick#`.

After this is done, the tool can be run as follows

```bash
$ make # generate Brick
$ python tools/compare_versions/compare_versions.py --oldbrick 1.2.0 Brick120.ttl --newbrick 1.2.1 Brick.ttl
```

This will generate a `history/` directory containing files with the added and removed class lists.

Put together the release notes. This should summarize the changes to Brick since the last release. Be sure to thank all contributors since the previous release. This can be computed by the following git command:

```
git shortlog <last version>..HEAD -n -s
```

for example, using the git tag for the `v1.2.0` release:

```
git shortlog v1.2.0..HEAD -n -s
```

Include the added/removed classes at the bottom of the release notes. Be sure to tag the release following the usual naming schema `vMAJOR.MINOR.PATCH`.

## Update `brickschema`

Checkout the [brickschema repository](https://github.com/BrickSchema/py-brickschema). Edit `tools/update_auxiliary.sh` to identify the internal folder where the copy of Brick should go. Usually this will just involve changing the version number at the end.

Then, run `update_auxiliary.sh` from the root directory of the repository:

```bash
$ ./tools/update_auxiliary.sh
```

Update the version number of the package (`poetry version <new version>`), build and publish.


## Update Website

Instructions coming soon...
38 changes: 30 additions & 8 deletions bricksrc/definitions.csv

Large diffs are not rendered by default.

45 changes: 24 additions & 21 deletions bricksrc/entity_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Entity property definitions
"""
from rdflib import Literal
from .namespaces import BRICK, RDFS, SKOS, UNIT, XSD, SH
from .namespaces import BRICK, RDFS, SKOS, UNIT, XSD, SH, BSH, QUDT

# these are the "relationship"/predicates/OWL properties that
# relate a Brick entity to a structured value.
Expand Down Expand Up @@ -143,18 +143,18 @@
RDFS.range: BRICK.YearBuiltShape,
RDFS.seeAlso: Literal("https://project-haystack.org/tag/yearBuilt"),
},
BRICK.thermalTransmittence: {
BRICK.thermalTransmittance: {
SKOS.definition: Literal(
"The area-weighted average heat transfer coefficient (commonly referred to as a U-value)"
),
RDFS.range: BRICK.ThermalTransmittenceShape,
RDFS.range: BRICK.ThermalTransmittanceShape,
RDFS.seeAlso: Literal(
"https://www.iso.org/obp/ui/#iso:std:iso:13789:ed-3:v1:en"
),
"subproperties": {
BRICK.buildingThermalTransmittence: {
BRICK.buildingThermalTransmittance: {
RDFS.domain: BRICK.Building,
RDFS.range: BRICK.ThermalTransmittenceShape,
RDFS.range: BRICK.ThermalTransmittanceShape,
SKOS.definition: Literal(
"The area-weighted average heat transfer coefficient (commonly referred to as a U-value) for a building envelope"
),
Expand Down Expand Up @@ -265,8 +265,8 @@

# These are the shapes that govern what values of Entity Properties should look like
shape_properties = {
BRICK.AreaShape: {"units": [UNIT.FT2, UNIT.M2], "datatype": XSD.double},
BRICK.VolumeShape: {"units": [UNIT.FT3, UNIT.M3], "datatype": XSD.double},
BRICK.AreaShape: {"units": [UNIT.FT2, UNIT.M2], "datatype": BSH.NumericValue},
BRICK.VolumeShape: {"units": [UNIT.FT3, UNIT.M3], "datatype": BSH.NumericValue},
BRICK.PowerComplexityShape: {"values": ["real", "reactive", "apparent"]},
BRICK.PowerFlowShape: {"values": ["import", "export", "net", "absolute"]},
BRICK.PhasesShape: {"values": ["A", "B", "C", "AB", "BC", "AC", "ABC"]},
Expand All @@ -276,31 +276,34 @@
BRICK.BuildingPrimaryFunctionShape: {"values": building_primary_function_values},
BRICK.CoordinateShape: {
"properties": {
BRICK.latitude: {"datatype": XSD.double},
BRICK.longitude: {"datatype": XSD.double},
BRICK.latitude: {"datatype": BSH.NumericValue},
BRICK.longitude: {"datatype": BSH.NumericValue},
},
},
BRICK.TiltShape: {"units": [UNIT.DEG], "datatype": XSD.double},
BRICK.TemperatureShape: {"units": [UNIT.DEG_C, UNIT.DEG_F], "datatype": XSD.double},
BRICK.TiltShape: {"unitsFromQuantity": BRICK.Angle, "datatype": BSH.NumericValue},
BRICK.TemperatureShape: {
"unitsFromQuantity": BRICK.Temperature,
"datatype": BSH.NumericValue,
},
BRICK.TemperatureCoefficientPerDegreeCelsiusShape: {
"units": [UNIT.PERCENT],
"datatype": XSD.double,
"datatype": BSH.NumericValue,
},
BRICK.AzimuthShape: {
"units": [UNIT.DEG],
"datatype": XSD.double,
"unitsFromQuantity": BRICK.Angle,
"datatype": BSH.NumericValue,
"rotationalDirection": {"values": ["clockwise", "counterclockwise"]},
"referenceDirection": {"values": ["North", "South", "East", "West"]},
"range": {"minInclusive": 0, "maxInclusive": 360},
},
BRICK.YearBuiltShape: {"datatype": XSD.integer},
BRICK.ThermalTransmittenceShape: {
"datatype": XSD.double,
BRICK.YearBuiltShape: {"datatype": XSD.nonNegativeInteger},
BRICK.ThermalTransmittanceShape: {
"datatype": BSH.NumericValue,
"units": [UNIT.BTU_IT, UNIT["W-PER-M2-K"]],
},
BRICK.PowerOutputShape: {
"datatype": XSD.double,
"units": [UNIT.KiloW, UNIT.W, UNIT.MegaW],
"datatype": BSH.NumericValue,
"unitsFromQuantity": BRICK.Power,
"properties": {
BRICK.ambientTemperatureOfMeasurement: {
"optional": True,
Expand All @@ -312,12 +315,12 @@
},
},
BRICK.EfficiencyShape: {
"datatype": XSD.decimal,
"datatype": BSH.NumericValue,
"units": [UNIT.PERCENT],
"range": {"minInclusive": 0},
},
BRICK.CoolingCapacityShape: {
"datatype": XSD.double,
"datatype": BSH.NumericValue,
"units": [UNIT.TON_FG, UNIT["BTU_IT-PER-HR"], UNIT["BTU_TH-PER-HR"], UNIT.W],
},
BRICK.AggregationShape: {
Expand Down
3 changes: 2 additions & 1 deletion bricksrc/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"subclasses": {
"Majlis": {
"tags": [
TAG.Majlis,
TAG.Lounge,
TAG.Common,
TAG.Space,
Expand Down Expand Up @@ -219,7 +220,7 @@
"tags": [TAG.Massage, TAG.Room, TAG.Space, TAG.Location]
},
"Media_Room": {
"tags": [TAG.Massage, TAG.Room, TAG.Space, TAG.Location],
"tags": [TAG.Media, TAG.Room, TAG.Space, TAG.Location],
"subclasses": {
"Broadcast_Room": {
"tags": [
Expand Down
8 changes: 0 additions & 8 deletions bricksrc/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@
A: [OWL.AsymmetricProperty, OWL.IrreflexiveProperty],
RDFS.range: BRICK.Substance,
},
"controls": {
A: [OWL.AsymmetricProperty, OWL.IrreflexiveProperty],
OWL.inverseOf: BRICK["isControlledBy"],
},
"isControlledBy": {
A: [OWL.AsymmetricProperty, OWL.IrreflexiveProperty],
OWL.inverseOf: BRICK["controls"],
},
"feeds": {
A: [OWL.AsymmetricProperty, OWL.IrreflexiveProperty],
OWL.inverseOf: BRICK["isFedBy"],
Expand Down
31 changes: 25 additions & 6 deletions bricksrc/quantities.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,19 @@ def get_units(qudt_quantity):
BRICK.hasQUDTReference: QUDTQK["AtmosphericPressure"]
},
"Dynamic_Pressure": {},
"Differential_Pressure": {
QUDT.isDeltaQuantity: Literal(True),
SKOS.narrower: {
"Differential_Static_Pressure": {
BRICK.hasQUDTReference: QUDTQK["StaticPressure"],
QUDT.isDeltaQuantity: Literal(True),
},
"Differential_Dynamic_Pressure": {
BRICK.hasQUDTReference: QUDTQK["DynamicPressure"],
QUDT.isDeltaQuantity: Literal(True),
},
},
},
"Static_Pressure": {
BRICK.hasQUDTReference: QUDTQK["StaticPressure"],
SKOS.narrower: {
Expand All @@ -593,6 +606,12 @@ def get_units(qudt_quantity):
QUDTQK["DynamicPressure"],
BRICK["Dynamic_Pressure"],
],
SKOS.narrower: {
"Differential_Dynamic_Pressure": {
BRICK.hasQUDTReference: QUDTQK["DynamicPressure"],
QUDT.isDeltaQuantity: Literal(True),
},
}
},
},
},
Expand Down Expand Up @@ -636,10 +655,10 @@ def get_units(qudt_quantity):
},
},
"Temperature": {
BRICK.hasQUDTReference: QUDTQK["ThermodynamicTemperature"],
BRICK.hasQUDTReference: QUDTQK["Temperature"],
SKOS.narrower: {
"Differential_Temperature": {
BRICK.hasQUDTReference: QUDTQK["ThermodynamicTemperature"],
BRICK.hasQUDTReference: QUDTQK["Temperature"],
QUDT.isDeltaQuantity: Literal(True),
},
"Operative_Temperature": {
Expand All @@ -650,7 +669,7 @@ def get_units(qudt_quantity):
QUDT.hasDimensionVector: QUDTDV["A0E0L0I0M0H1T0D0"],
RDFS.isDefinedBy: URIRef(str(BRICK).strip("#")),
RDFS.label: Literal("Operative_Temperature"),
SKOS.broader: QUDTQK.ThermodynamicTemperature,
SKOS.broader: QUDTQK.Temperature,
},
"Radiant_Temperature": {
QUDT.applicableUnit: [UNIT["DEG_F"], UNIT["DEG_C"], UNIT["K"]],
Expand All @@ -660,7 +679,7 @@ def get_units(qudt_quantity):
QUDT.hasDimensionVector: QUDTDV["A0E0L0I0M0H1T0D0"],
RDFS.isDefinedBy: URIRef(str(BRICK).strip("#")),
RDFS.label: Literal("Radiant_Temperature"),
SKOS.broader: QUDTQK.ThermodynamicTemperature,
SKOS.broader: QUDTQK.Temperature,
},
"Dry_Bulb_Temperature": {
QUDT.applicableUnit: [UNIT["DEG_F"], UNIT["DEG_C"], UNIT["K"]],
Expand All @@ -670,7 +689,7 @@ def get_units(qudt_quantity):
QUDT.hasDimensionVector: QUDTDV["A0E0L0I0M0H1T0D0"],
RDFS.isDefinedBy: URIRef(str(BRICK).strip("#")),
RDFS.label: Literal("Dry_Bulb_Temperature"),
SKOS.broader: QUDTQK.ThermodynamicTemperature,
SKOS.broader: QUDTQK.Temperature,
SKOS.narrower: {
"Differential_Dry_Bulb_Temperature": {
BRICK.hasQUDTReference: QUDTQK["Dry_Bulb_Temperature"],
Expand All @@ -686,7 +705,7 @@ def get_units(qudt_quantity):
QUDT.hasDimensionVector: QUDTDV["A0E0L0I0M0H1T0D0"],
RDFS.isDefinedBy: URIRef(str(BRICK).strip("#")),
RDFS.label: Literal("Wet_Bulb_Temperature"),
SKOS.broader: QUDTQK.ThermodynamicTemperature,
SKOS.broader: QUDTQK.Temperature,
},
},
},
Expand Down
Loading

0 comments on commit b452b00

Please sign in to comment.