Skip to content

Commit

Permalink
add resolution property (#683)
Browse files Browse the repository at this point in the history
* add resolution property

* improve resolution property

* to fix workflow issue

* another fix to solve pr issue

* keep toml same

* going back to old version

* fix v7 to solve pr issue
  • Loading branch information
metesaka authored Feb 4, 2025
1 parent 890a064 commit 804ee49
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
name: Build

permissions:
pull-requests: write
issues: write

on:
push:
branches:
- master
- v1.*
pull_request:
pull_request_target:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -67,7 +62,7 @@ jobs:
extensions.zip
- name: comment artifact
# if the trigger is on a pull request
if: ${{ github.event_name == 'pull_request' && matrix.python-version == env.RELEASE_PYTHON_VERSION }}
if: ${{ github.event_name == 'pull_request' && matrix.python-version == env.RELEASE_PYTHON_VERSION && github.event.pull_request.head.repo.full_name == 'BrickSchema/Brick' }}
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.number }}
Expand Down
16 changes: 14 additions & 2 deletions bricksrc/entity_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@
RDFS.label: Literal("Coordinates", lang="en"),
"property_of": [BRICK.Equipment, BRICK.Location],
},
BRICK.resolution: {
SKOS.definition: Literal(
"The resolution of the entity specifing the smallest measurable or controllable increment"
),
SH.node: BSH.ResolutionShape,
RDFS.label: Literal("Resolution", lang="en"),
"property_of": BRICK.Point,
},
# electrical properties
BRICK.electricalComplexPower: {
SKOS.definition: Literal("Associated electrical complexity with the entity"),
Expand Down Expand Up @@ -272,7 +280,7 @@
},
BRICK.operationalStageCount: {
SKOS.definition: Literal(
"The number of operational stages supported by this eqiupment"
"The number of operational stages supported by this equipment"
),
"property_of": BRICK.Equipment,
SH.node: BSH.StageShape,
Expand Down Expand Up @@ -333,7 +341,7 @@
# special stuff
BRICK.aggregate: {
SKOS.definition: Literal(
"Description of how the dta for this point is aggregated"
"Description of how the data for this point is aggregated"
),
"property_of": BRICK.Point,
SH.node: BSH.AggregationShape,
Expand Down Expand Up @@ -514,6 +522,10 @@
"units": [UNIT.PERCENT],
"range": {"minInclusive": 0},
},
BSH.ResolutionShape: {
"datatype": BSH.NumericValue,
"range": {"minExclusive": 0},
},
BSH.CoolingCapacityShape: {
"datatype": BSH.NumericValue,
"units": [UNIT.TON_FG, UNIT["BTU_IT-PER-HR"], UNIT["BTU_TH-PER-HR"], UNIT.W],
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ managed = true
dev-dependencies = []

[tool.hatch.metadata]
allow-direct-references = true
allow-direct-references = true

0 comments on commit 804ee49

Please sign in to comment.