diff --git a/examples/Sample Skyspark VAV Validation With API Request.ipynb b/examples/Sample Skyspark VAV Validation With API Request.ipynb index 6f93f5b..d15715c 100644 --- a/examples/Sample Skyspark VAV Validation With API Request.ipynb +++ b/examples/Sample Skyspark VAV Validation With API Request.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "finnish-status", + "id": "global-recycling", "metadata": {}, "source": [ "# Sample Skyspark VAV Validation" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "smaller-television", + "id": "earned-latitude", "metadata": {}, "source": [ "# 1) Setup" @@ -18,7 +18,7 @@ }, { "cell_type": "markdown", - "id": "dutch-remedy", + "id": "advanced-international", "metadata": {}, "source": [ "## Imports" @@ -26,8 +26,8 @@ }, { "cell_type": "code", - "execution_count": 1, - "id": "expected-bahamas", + "execution_count": null, + "id": "falling-woman", "metadata": { "tags": [] }, @@ -42,6 +42,8 @@ "\n", "from rdflib import Namespace, SH, RDF, BNode, Graph\n", "from pyshacl import validate\n", + "from dotenv import load_dotenv\n", + "load_dotenv()\n", "\n", "from tasty import constants as tc\n", "from tasty import graphs as tg" @@ -49,7 +51,7 @@ }, { "cell_type": "markdown", - "id": "above-graphic", + "id": "elementary-store", "metadata": {}, "source": [ "## Inputs\n", @@ -70,8 +72,8 @@ }, { "cell_type": "code", - "execution_count": 2, - "id": "tested-cookie", + "execution_count": null, + "id": "operational-latin", "metadata": {}, "outputs": [], "source": [ @@ -83,8 +85,8 @@ "SAMPLE = '214466de-7abb28a7'\n", "input_namespace_uri = 'urn:/_#'\n", "\n", - "raw_data_graph_filename = 'tests/files/data/sample_skyspark_vav_raw.ttl'\n", - "data_graph_filename = 'tests/files/data/sample_skyspark_vav_clean.ttl'\n", + "raw_data_graph_filename = 'examples/output/sample_skyspark_vav_raw.ttl'\n", + "data_graph_filename = 'examples/output/sample_skyspark_vav_clean.ttl'\n", "shapes_graph_filename = 'tasty/generated_shapes/haystack_all.ttl'\n", "\n", "output_directory = os.path.join(os.path.abspath(''), 'example_data/output')\n", @@ -94,7 +96,7 @@ }, { "cell_type": "markdown", - "id": "adopted-tennessee", + "id": "trained-accordance", "metadata": {}, "source": [ "## API Request From Skyspark \n", @@ -103,204 +105,22 @@ }, { "cell_type": "code", - "execution_count": 3, - "id": "seeing-relative", + "execution_count": null, + "id": "dependent-savage", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "200 - Sucess\n", - "@prefix rdf: .\n", - "@prefix rdfs: .\n", - "@prefix xsd: .\n", - "@prefix owl: .\n", - "@prefix core: .\n", - "@prefix ph: .\n", - "@prefix phScience: .\n", - "@prefix phIoT: .\n", - "\n", - "ph:hasTag a owl:ObjectProperty ;\n", - " rdfs:range ph:marker .\n", - "\n", - "_:211c90ab-701fa511 a phIoT:his-point ;\n", - " ph:hasTag phScience:air,\n", - " phIoT:his,\n", - " phIoT:point,\n", - " phIoT:sensor,\n", - " phScience:temp,\n", - " phIoT:zone ;\n", - " rdfs:label \"S&TF UFVAV-3 Zone Temp\" ;\n", - " _:bacnetConnRef _:211c8a83-ef5c639d ;\n", - " _:bacnetCur \"AI5\" ;\n", - " _:bacnetDis \"RM TEMP\" ;\n", - " _:bacnetHis \"TL3\" ;\n", - " _:bacnetObjectType \"ANALOG_INPUT\" ;\n", - " _:connRef _:211c8a83-ef5c639d ;\n", - " _:connTuningRef _:1f4a131c-3f1fcc51 ;\n", - " phIoT:curStatus \"unknown\" ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " phIoT:equipRef _:214466de-7abb28a7 ;\n", - " _:hisAppendNA 30 ;\n", - " _:hisEnd 2021-08-04T07:05:55-06:00^^xsd:dateTime ;\n", - " _:hisSize 32833 ;\n", - " _:hisStart 2017-08-03T09:47:00-06:00^^xsd:dateTime ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " ph:kind \"Number\" ;\n", - " core:navName \"Zone Temp\" ;\n", - " phIoT:siteRef _:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef _:2184f1be-29c172a8 ;\n", - " _:sqlConnRef _:24a0194c-adac2f1d ;\n", - " _:sqlTable \"CopperCube_SERF_STF_Area_37034_TL3\" ;\n", - " _:sqlTz \"America/Phoenix\" ;\n", - " ph:tz \"Denver\" ;\n", - " ph:unit \"\\u00b0F\" ;\n", - " _:mod 2021-03-04T22:32:40.67Z^^xsd:dateTime .\n", - "\n", - "_:211c90b6-52117d4d a phIoT:cur-point ;\n", - " ph:hasTag phScience:air,\n", - " phIoT:cur,\n", - " phIoT:his,\n", - " phIoT:point,\n", - " phIoT:sp,\n", - " phScience:temp,\n", - " phIoT:zone ;\n", - " rdfs:label \"S&TF UFVAV-3 Zone Temp Setpt\" ;\n", - " _:bacnetConnRef _:211c8a83-ef5c639d ;\n", - " _:bacnetCur \"AV11\" ;\n", - " _:bacnetDis \"RM TEMP STPT\" ;\n", - " _:bacnetObjectType \"ANALOG_VALUE\" ;\n", - " _:connRef _:211c8a83-ef5c639d ;\n", - " _:connTuningRef _:1f40f395-5a02b62e ;\n", - " phIoT:curStatus \"ok\" ;\n", - " phIoT:curVal 74 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " phIoT:equipRef _:214466de-7abb28a7 ;\n", - " _:hisAppendNA 30 ;\n", - " _:hisCollectInterval 5 ;\n", - " _:hisCollectWriteFreq 15 ;\n", - " _:hisEnd 2021-08-04T11:10:00-06:00^^xsd:dateTime ;\n", - " _:hisSize 415327 ;\n", - " _:hisStart 2017-08-08T09:25:00-06:00^^xsd:dateTime ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " ph:kind \"Number\" ;\n", - " core:navName \"Zone Temp Setpt\" ;\n", - " phIoT:siteRef _:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef _:2184f1be-29c172a8 ;\n", - " ph:tz \"Denver\" ;\n", - " ph:unit \"\\u00b0F\" ;\n", - " _:mod 2021-03-04T22:32:40.67Z^^xsd:dateTime .\n", - "\n", - "_:211c90b6-0da18cd7 a phIoT:cur-point ;\n", - " ph:hasTag phScience:air,\n", - " phIoT:cmd,\n", - " phIoT:cur,\n", - " phIoT:damper,\n", - " phIoT:discharge,\n", - " phIoT:his,\n", - " phIoT:point ;\n", - " rdfs:label \"S&TF UFVAV-3 Damper\" ;\n", - " _:bacnetConnRef _:211c8a83-ef5c639d ;\n", - " _:bacnetCur \"AV7\" ;\n", - " _:bacnetDis \"DMP POS\" ;\n", - " _:bacnetObjectType \"ANALOG_VALUE\" ;\n", - " _:connRef _:211c8a83-ef5c639d ;\n", - " _:connTuningRef _:1f40f395-5a02b62e ;\n", - " phIoT:curStatus \"ok\" ;\n", - " phIoT:curVal 0 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " phIoT:equipRef _:214466de-7abb28a7 ;\n", - " _:hisAppendNA 30 ;\n", - " _:hisCollectInterval 5 ;\n", - " _:hisCollectWriteFreq 15 ;\n", - " _:hisEnd 2021-08-04T11:10:00-06:00^^xsd:dateTime ;\n", - " _:hisSize 415310 ;\n", - " _:hisStart 2017-08-08T09:25:00-06:00^^xsd:dateTime ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " ph:kind \"Number\" ;\n", - " core:navName \"Damper\" ;\n", - " phIoT:siteRef _:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef _:2184f1be-29c172a8 ;\n", - " ph:tz \"Denver\" ;\n", - " ph:unit \"%\" ;\n", - " _:mod 2021-03-04T22:32:40.67Z^^xsd:dateTime .\n", - "\n", - "_:214466de-7abb28a7 a phIoT:vav ;\n", - " ph:hasTag phIoT:equip,\n", - " phIoT:vav ;\n", - " rdfs:label \"S&TF UFVAV-3\" ;\n", - " _:ahuRef _:21164218-5fab5c91 ;\n", - " _:bacnetConnRef _:211c8a83-ef5c639d ;\n", - " _:bacnetDeviceId 37034 ;\n", - " _:connRef _:211c8a83-ef5c639d ;\n", - " core:disMacro \"$siteRef $navName\" ;\n", - " core:navName \"UFVAV-3\" ;\n", - " phIoT:siteRef _:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef _:2184f1be-29c172a8 ;\n", - " _:mod 2020-04-02T16:38:45.356Z^^xsd:dateTime .\n", - "\n", - "_:22f5d821-8e310c3e a phIoT:his-point ;\n", - " ph:hasTag phIoT:his,\n", - " phIoT:occupied,\n", - " phIoT:point,\n", - " phIoT:sensor ;\n", - " rdfs:label \"S&TF UFVAV-3 Schedule\" ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " phIoT:equipRef _:214466de-7abb28a7 ;\n", - " _:hisFunc \"calcMirrorHisPoint(_,_,_,_,@p:stm_campus:r:22f4de28-7e5ea4aa)\" ;\n", - " ph:kind \"Bool\" ;\n", - " core:navName \"Schedule\" ;\n", - " phIoT:siteRef _:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef _:2184f1be-29c172a8 ;\n", - " ph:tz \"Denver\" ;\n", - " _:mod 2019-01-09T16:21:30.397Z^^xsd:dateTime .\n", - "\n", - "_:211c90b7-f2430aa1 a phIoT:cur-point ;\n", - " ph:hasTag phIoT:cur,\n", - " phIoT:his,\n", - " phIoT:point,\n", - " phIoT:sensor,\n", - " phIoT:unocc ;\n", - " rdfs:label \"S&TF UFVAV-3 Unocc Override\" ;\n", - " _:bacnetConnRef _:211c8a83-ef5c639d ;\n", - " _:bacnetCur \"BI6\" ;\n", - " _:bacnetDis \"UNOCC OVRD\" ;\n", - " _:bacnetObjectType \"BINARY_INPUT\" ;\n", - " _:connRef _:211c8a83-ef5c639d ;\n", - " _:connTuningRef _:1f40f395-5a02b62e ;\n", - " phIoT:curStatus \"ok\" ;\n", - " phIoT:curVal false ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " ph:enum \"OFF,ON\" ;\n", - " phIoT:equipRef _:214466de-7abb28a7 ;\n", - " _:hisCollectWriteFreq 15 ;\n", - " _:hisEnd 2021-06-26T07:22:22-06:00^^xsd:dateTime ;\n", - " phIoT:hisMode \"cov\" ;\n", - " _:hisSize 409 ;\n", - " _:hisStart 2017-08-08T09:22:23-06:00^^xsd:dateTime ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " ph:kind \"Bool\" ;\n", - " core:navName \"Unocc Override\" ;\n", - " phIoT:siteRef _:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef _:2184f1be-29c172a8 ;\n", - " ph:tz \"Denver\" ;\n", - " _:mod 2021-03-04T22:32:40.67Z^^xsd:dateTime .\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "import requests\n", "\n", "axon_query_string = '(point and equipRef->navName==\"UFVAV-3\") or (equip and navName==\"UFVAV-3\")'\n", "\n", - "api_url_endpoint = 'https://internal-apis.nrel.gov/intelligentcampus/stm_campus/read'\n", + "# load skyspark URL from .env file\n", + "skyspark_api_url = os.environ.get('API_ENDPOINT')\n", "\n", "response = requests.get(\n", - " api_url_endpoint,\n", + " skyspark_api_url,\n", " params={'filter':axon_query_string},\n", " headers={\n", " 'Accept': 'text/turtle'\n", @@ -321,18 +141,10 @@ }, { "cell_type": "code", - "execution_count": 4, - "id": "annoying-tablet", + "execution_count": null, + "id": "genetic-blind", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "raw instance data saved to 'tests/files/data/sample_skyspark_vav_raw.ttl' \n" - ] - } - ], + "outputs": [], "source": [ "# Save response to file\n", "f = os.path.join(tasty_main_directory, raw_data_graph_filename)\n", @@ -343,7 +155,7 @@ }, { "cell_type": "markdown", - "id": "african-league", + "id": "surface-modern", "metadata": {}, "source": [ "### Pre-Process Raw Input File\n", @@ -357,20 +169,12 @@ }, { "cell_type": "code", - "execution_count": 5, - "id": "emotional-adelaide", + "execution_count": null, + "id": "backed-driving", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "cleaned instance data saved to 'tests/files/data/sample_skyspark_vav_clean.ttl' \n" - ] - } - ], + "outputs": [], "source": [ "# ----------------------------------------\n", "# Pre Process raw skyspark .ttl file \n", @@ -403,7 +207,7 @@ }, { "cell_type": "markdown", - "id": "honey-today", + "id": "dependent-glass", "metadata": {}, "source": [ "# 2) Main Code" @@ -411,7 +215,7 @@ }, { "cell_type": "markdown", - "id": "flying-grave", + "id": "committed-korean", "metadata": {}, "source": [ "## Definitions\n", @@ -420,8 +224,8 @@ }, { "cell_type": "code", - "execution_count": 6, - "id": "competitive-efficiency", + "execution_count": null, + "id": "celtic-thing", "metadata": {}, "outputs": [], "source": [ @@ -435,13 +239,12 @@ "\n", "PHCUSTOM = Namespace(\"https://project-haystack.org/def/custom#\")\n", "POINT = Namespace(\"https://skyfoundry.com/def/point/3.0.27#\")\n", - "BACNET = Namespace(\"https://skyfoundry.com/def/bacnet/3.0.27#\")\n", "\n", "# known_tags = [\"zone\", \"air\", \"temp\", \"sensor\", \"sp\", \"cmd\", \"discharge\", \"damper\", \"humidity\", \"co2\", \"occupied\",\n", "# \"occupancyIndicator\", \"cooling\", \"heating\", \"effective\", \"occ\", \"unocc\", \"standby\", \"operating\", \"mode\", \"request\",\n", "# \"leaving\", \"entering\", \"flow\", \"min\", \"max\", \"pressure\", ] \n", "\n", - "# invalid_tags = [tc.PHIOT_3_9_10[\"point\"], tc.PHIOT_3_9_10[\"his\"], POINT[\"hisCollectCov\"], tc.PHIOT_3_9_10[\"cur\"], BACNET[\"bacnetPoint\"]]\n", + "# invalid_tags = [tc.PHIOT_3_9_10[\"point\"], tc.PHIOT_3_9_10[\"his\"], POINT[\"hisCollectCov\"], tc.PHIOT_3_9_10[\"cur\"]]\n", "\n", "# ----------------------------------------\n", "# Helper Function Definitions\n", @@ -473,7 +276,7 @@ }, { "cell_type": "markdown", - "id": "secondary-commander", + "id": "vertical-nutrition", "metadata": {}, "source": [ "## Generate and Process Graphs" @@ -481,7 +284,7 @@ }, { "cell_type": "markdown", - "id": "secondary-forty", + "id": "organizational-interaction", "metadata": {}, "source": [ "### Create Data, Shapes, and Ontology Graphs \n", @@ -490,22 +293,12 @@ }, { "cell_type": "code", - "execution_count": 7, - "id": "incident-ozone", + "execution_count": null, + "id": "spanish-making", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "...loaded data graph\n", - "...loaded shapes graph\n", - "...loaded ontology graph\n" - ] - } - ], + "outputs": [], "source": [ "# ----------------------------------------\n", "# Generate Graphs\n", @@ -526,7 +319,7 @@ }, { "cell_type": "markdown", - "id": "electronic-bloom", + "id": "metallic-china", "metadata": {}, "source": [ "### Get List of Valid Tags With Namespaces\n", @@ -541,185 +334,12 @@ }, { "cell_type": "code", - "execution_count": 8, - "id": "contemporary-daisy", + "execution_count": null, + "id": "technological-store", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "...generated tag list\n", - "...adding namespaces\n", - "Tag: ac URI: https://project-haystack.org/def/phIoT/3.9.10#ac\n", - "Tag: acoustic URI: https://project-haystack.org/def/custom#acoustic\n", - "Tag: active URI: https://project-haystack.org/def/phIoT/3.9.10#active\n", - "Tag: adjust URI: https://project-haystack.org/def/custom#adjust\n", - "Tag: air URI: https://project-haystack.org/def/phScience/3.9.10#air\n", - "Tag: alarm URI: https://project-haystack.org/def/custom#alarm\n", - "Tag: apparent URI: https://project-haystack.org/def/phScience/3.9.10#apparent\n", - "Tag: avg URI: https://project-haystack.org/def/phScience/3.9.10#avg\n", - "Tag: bandwidth URI: https://project-haystack.org/def/custom#bandwidth\n", - "Tag: building URI: https://project-haystack.org/def/custom#building\n", - "Tag: bypass URI: https://project-haystack.org/def/phIoT/3.9.10#bypass\n", - "Tag: call URI: https://project-haystack.org/def/custom#call\n", - "Tag: car URI: https://project-haystack.org/def/custom#car\n", - "Tag: chilled URI: https://project-haystack.org/def/phIoT/3.9.10#chilled\n", - "Tag: circuit URI: https://project-haystack.org/def/custom#circuit\n", - "Tag: closed URI: https://project-haystack.org/def/custom#closed\n", - "Tag: cmd URI: https://project-haystack.org/def/phIoT/3.9.10#cmd\n", - "Tag: co URI: https://project-haystack.org/def/phScience/3.9.10#co\n", - "Tag: co2 URI: https://project-haystack.org/def/phScience/3.9.10#co2\n", - "Tag: coldDeck URI: https://project-haystack.org/def/phIoT/3.9.10#coldDeck\n", - "Tag: colorTemperature URI: https://project-haystack.org/def/custom#colorTemperature\n", - "Tag: comm URI: https://project-haystack.org/def/custom#comm\n", - "Tag: compressor URI: https://project-haystack.org/def/custom#compressor\n", - "Tag: conc URI: https://project-haystack.org/def/custom#conc\n", - "Tag: condensate URI: https://project-haystack.org/def/phIoT/3.9.10#condensate\n", - "Tag: condenser URI: https://project-haystack.org/def/phIoT/3.9.10#condenser\n", - "Tag: config URI: https://project-haystack.org/def/custom#config\n", - "Tag: cool URI: https://project-haystack.org/def/phIoT/3.9.10#cool\n", - "Tag: cooling URI: https://project-haystack.org/def/phIoT/3.9.10#cooling\n", - "Tag: cpu URI: https://project-haystack.org/def/custom#cpu\n", - "Tag: current URI: https://project-haystack.org/def/phScience/3.9.10#current\n", - "Tag: damper URI: https://project-haystack.org/def/phIoT/3.9.10#damper\n", - "Tag: daylighting URI: https://project-haystack.org/def/custom#daylighting\n", - "Tag: dc URI: https://project-haystack.org/def/phIoT/3.9.10#dc\n", - "Tag: deadband URI: https://project-haystack.org/def/custom#deadband\n", - "Tag: delta URI: https://project-haystack.org/def/phIoT/3.9.10#delta\n", - "Tag: demand URI: https://project-haystack.org/def/phIoT/3.9.10#demand\n", - "Tag: dewPoint URI: https://project-haystack.org/def/phScience/3.9.10#dewPoint\n", - "Tag: direction URI: https://project-haystack.org/def/phScience/3.9.10#direction\n", - "Tag: disable URI: https://project-haystack.org/def/custom#disable\n", - "Tag: discharge URI: https://project-haystack.org/def/phIoT/3.9.10#discharge\n", - "Tag: door URI: https://project-haystack.org/def/custom#door\n", - "Tag: drive URI: https://project-haystack.org/def/phIoT/3.9.10#drive\n", - "Tag: dtManager URI: https://project-haystack.org/def/custom#dtManager\n", - "Tag: dx URI: https://project-haystack.org/def/custom#dx\n", - "Tag: econ URI: https://project-haystack.org/def/custom#econ\n", - "Tag: economizing URI: https://project-haystack.org/def/phIoT/3.9.10#economizing\n", - "Tag: effective URI: https://project-haystack.org/def/phIoT/3.9.10#effective\n", - "Tag: elec URI: https://project-haystack.org/def/phScience/3.9.10#elec\n", - "Tag: enable URI: https://project-haystack.org/def/phIoT/3.9.10#enable\n", - "Tag: energy URI: https://project-haystack.org/def/phScience/3.9.10#energy\n", - "Tag: entering URI: https://project-haystack.org/def/phIoT/3.9.10#entering\n", - "Tag: enthalpy URI: https://project-haystack.org/def/custom#enthalpy\n", - "Tag: error URI: https://project-haystack.org/def/custom#error\n", - "Tag: evap URI: https://project-haystack.org/def/custom#evap\n", - "Tag: evaporator URI: https://project-haystack.org/def/phIoT/3.9.10#evaporator\n", - "Tag: exhaust URI: https://project-haystack.org/def/phIoT/3.9.10#exhaust\n", - "Tag: export URI: https://project-haystack.org/def/phIoT/3.9.10#export\n", - "Tag: faceBypass URI: https://project-haystack.org/def/phIoT/3.9.10#faceBypass\n", - "Tag: fan URI: https://project-haystack.org/def/phIoT/3.9.10#fan\n", - "Tag: filter URI: https://project-haystack.org/def/phIoT/3.9.10#filter\n", - "Tag: flow URI: https://project-haystack.org/def/phScience/3.9.10#flow\n", - "Tag: freezeStat URI: https://project-haystack.org/def/phIoT/3.9.10#freezeStat\n", - "Tag: freq URI: https://project-haystack.org/def/phScience/3.9.10#freq\n", - "Tag: gas URI: https://project-haystack.org/def/phScience/3.9.10#gas\n", - "Tag: glycol URI: https://project-haystack.org/def/custom#glycol\n", - "Tag: group URI: https://project-haystack.org/def/custom#group\n", - "Tag: hcho URI: https://project-haystack.org/def/custom#hcho\n", - "Tag: heap URI: https://project-haystack.org/def/custom#heap\n", - "Tag: heat URI: https://project-haystack.org/def/phIoT/3.9.10#heat\n", - "Tag: heatCool URI: https://project-haystack.org/def/custom#heatCool\n", - "Tag: heatRecovery URI: https://project-haystack.org/def/custom#heatRecovery\n", - "Tag: heatWheel URI: https://project-haystack.org/def/phIoT/3.9.10#heatWheel\n", - "Tag: heating URI: https://project-haystack.org/def/phIoT/3.9.10#heating\n", - "Tag: hot URI: https://project-haystack.org/def/phIoT/3.9.10#hot\n", - "Tag: hotDeck URI: https://project-haystack.org/def/phIoT/3.9.10#hotDeck\n", - "Tag: hotGas URI: https://project-haystack.org/def/custom#hotGas\n", - "Tag: hvacMode URI: https://project-haystack.org/def/custom#hvacMode\n", - "Tag: illuminance URI: https://project-haystack.org/def/phScience/3.9.10#illuminance\n", - "Tag: import URI: https://project-haystack.org/def/phIoT/3.9.10#import\n", - "Tag: inlet URI: https://project-haystack.org/def/phIoT/3.9.10#inlet\n", - "Tag: isolation URI: https://project-haystack.org/def/phIoT/3.9.10#isolation\n", - "Tag: landing URI: https://project-haystack.org/def/custom#landing\n", - "Tag: leak URI: https://project-haystack.org/def/custom#leak\n", - "Tag: leaving URI: https://project-haystack.org/def/phIoT/3.9.10#leaving\n", - "Tag: level URI: https://project-haystack.org/def/phScience/3.9.10#level\n", - "Tag: light URI: https://project-haystack.org/def/phScience/3.9.10#light\n", - "Tag: lighting URI: https://project-haystack.org/def/phIoT/3.9.10#lighting\n", - "Tag: line URI: https://project-haystack.org/def/custom#line\n", - "Tag: load URI: https://project-haystack.org/def/phIoT/3.9.10#load\n", - "Tag: loadshed URI: https://project-haystack.org/def/custom#loadshed\n", - "Tag: magnitude URI: https://project-haystack.org/def/phScience/3.9.10#magnitude\n", - "Tag: max URI: https://project-haystack.org/def/custom#max\n", - "Tag: maxVal URI: https://project-haystack.org/def/ph/3.9.10#maxVal\n", - "Tag: min URI: https://project-haystack.org/def/custom#min\n", - "Tag: mixed URI: https://project-haystack.org/def/phIoT/3.9.10#mixed\n", - "Tag: mode URI: https://project-haystack.org/def/custom#mode\n", - "Tag: naturalGas URI: https://project-haystack.org/def/phIoT/3.9.10#naturalGas\n", - "Tag: net URI: https://project-haystack.org/def/phIoT/3.9.10#net\n", - "Tag: next URI: https://project-haystack.org/def/custom#next\n", - "Tag: nh3 URI: https://project-haystack.org/def/custom#nh3\n", - "Tag: no2 URI: https://project-haystack.org/def/custom#no2\n", - "Tag: number URI: https://project-haystack.org/def/ph/3.9.10#number\n", - "Tag: o3 URI: https://project-haystack.org/def/custom#o3\n", - "Tag: occ URI: https://project-haystack.org/def/phIoT/3.9.10#occ\n", - "Tag: occupancy URI: https://project-haystack.org/def/phIoT/3.9.10#occupancy\n", - "Tag: occupancyIndicator URI: https://project-haystack.org/def/custom#occupancyIndicator\n", - "Tag: occupied URI: https://project-haystack.org/def/phIoT/3.9.10#occupied\n", - "Tag: open URI: https://project-haystack.org/def/custom#open\n", - "Tag: operating URI: https://project-haystack.org/def/custom#operating\n", - "Tag: outside URI: https://project-haystack.org/def/phIoT/3.9.10#outside\n", - "Tag: override URI: https://project-haystack.org/def/custom#override\n", - "Tag: perimeterHeat URI: https://project-haystack.org/def/phIoT/3.9.10#perimeterHeat\n", - "Tag: pf URI: https://project-haystack.org/def/phIoT/3.9.10#pf\n", - "Tag: phase URI: https://project-haystack.org/def/phIoT/3.9.10#phase\n", - "Tag: physicalMemory URI: https://project-haystack.org/def/custom#physicalMemory\n", - "Tag: plenum URI: https://project-haystack.org/def/custom#plenum\n", - "Tag: pm01 URI: https://project-haystack.org/def/custom#pm01\n", - "Tag: pm10 URI: https://project-haystack.org/def/phScience/3.9.10#pm10\n", - "Tag: pm25 URI: https://project-haystack.org/def/phScience/3.9.10#pm25\n", - "Tag: poe URI: https://project-haystack.org/def/custom#poe\n", - "Tag: position URI: https://project-haystack.org/def/custom#position\n", - "Tag: power URI: https://project-haystack.org/def/phScience/3.9.10#power\n", - "Tag: pressure URI: https://project-haystack.org/def/phScience/3.9.10#pressure\n", - "Tag: primaryLoop URI: https://project-haystack.org/def/custom#primaryLoop\n", - "Tag: pump URI: https://project-haystack.org/def/phIoT/3.9.10#pump\n", - "Tag: reactive URI: https://project-haystack.org/def/phIoT/3.9.10#reactive\n", - "Tag: refrig URI: https://project-haystack.org/def/phIoT/3.9.10#refrig\n", - "Tag: reheat URI: https://project-haystack.org/def/phIoT/3.9.10#reheat\n", - "Tag: relative URI: https://project-haystack.org/def/custom#relative\n", - "Tag: relief URI: https://project-haystack.org/def/custom#relief\n", - "Tag: request URI: https://project-haystack.org/def/custom#request\n", - "Tag: resolution URI: https://project-haystack.org/def/custom#resolution\n", - "Tag: return URI: https://project-haystack.org/def/phIoT/3.9.10#return\n", - "Tag: reversing URI: https://project-haystack.org/def/custom#reversing\n", - "Tag: run URI: https://project-haystack.org/def/phIoT/3.9.10#run\n", - "Tag: scene URI: https://project-haystack.org/def/custom#scene\n", - "Tag: schedulePoint URI: https://project-haystack.org/def/custom#schedulePoint\n", - "Tag: secondaryLoop URI: https://project-haystack.org/def/custom#secondaryLoop\n", - "Tag: sensor URI: https://project-haystack.org/def/phIoT/3.9.10#sensor\n", - "Tag: shades URI: https://project-haystack.org/def/custom#shades\n", - "Tag: sixWay URI: https://project-haystack.org/def/custom#sixWay\n", - "Tag: sp URI: https://project-haystack.org/def/phIoT/3.9.10#sp\n", - "Tag: speed URI: https://project-haystack.org/def/phScience/3.9.10#speed\n", - "Tag: stage URI: https://project-haystack.org/def/phIoT/3.9.10#stage\n", - "Tag: standby URI: https://project-haystack.org/def/phIoT/3.9.10#standby\n", - "Tag: state URI: https://project-haystack.org/def/phIoT/3.9.10#state\n", - "Tag: storageDrive URI: https://project-haystack.org/def/custom#storageDrive\n", - "Tag: subcooler URI: https://project-haystack.org/def/custom#subcooler\n", - "Tag: supply URI: https://project-haystack.org/def/custom#supply\n", - "Tag: temp URI: https://project-haystack.org/def/phScience/3.9.10#temp\n", - "Tag: temperature URI: https://project-haystack.org/def/custom#temperature\n", - "Tag: total URI: https://project-haystack.org/def/phScience/3.9.10#total\n", - "Tag: tvoc URI: https://project-haystack.org/def/phScience/3.9.10#tvoc\n", - "Tag: unocc URI: https://project-haystack.org/def/phIoT/3.9.10#unocc\n", - "Tag: valve URI: https://project-haystack.org/def/phIoT/3.9.10#valve\n", - "Tag: vavMode URI: https://project-haystack.org/def/phIoT/3.9.10#vavMode\n", - "Tag: volt URI: https://project-haystack.org/def/phScience/3.9.10#volt\n", - "Tag: volume URI: https://project-haystack.org/def/phScience/3.9.10#volume\n", - "Tag: water URI: https://project-haystack.org/def/phScience/3.9.10#water\n", - "Tag: wetBulb URI: https://project-haystack.org/def/phScience/3.9.10#wetBulb\n", - "Tag: window URI: https://project-haystack.org/def/custom#window\n", - "Tag: zone URI: https://project-haystack.org/def/phIoT/3.9.10#zone\n", - "0\n" - ] - } - ], + "outputs": [], "source": [ "# ----------------------------------------\n", "# Create a List of Valid Tags\n", @@ -775,7 +395,7 @@ }, { "cell_type": "markdown", - "id": "lined-matrix", + "id": "treated-ottawa", "metadata": {}, "source": [ "### Post Process of Data Graph" @@ -783,7 +403,7 @@ }, { "cell_type": "markdown", - "id": "falling-jimmy", + "id": "tribal-research", "metadata": { "tags": [] }, @@ -796,8 +416,8 @@ }, { "cell_type": "code", - "execution_count": 9, - "id": "civilian-elevation", + "execution_count": null, + "id": "wireless-surname", "metadata": { "tags": [] }, @@ -813,7 +433,7 @@ }, { "cell_type": "markdown", - "id": "ecological-present", + "id": "established-transfer", "metadata": {}, "source": [ "#### a) Keep Only Valid Tags in Data Graph" @@ -821,24 +441,12 @@ }, { "cell_type": "code", - "execution_count": 10, - "id": "based-thing", + "execution_count": null, + "id": "crucial-harmony", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "...processing node: \turn:/_#211c90b6-52117d4d\n", - "...processing node: \turn:/_#211c90b7-f2430aa1\n", - "...processing node: \turn:/_#22f5d821-8e310c3e\n", - "...processing node: \turn:/_#211c90ab-701fa511\n", - "...processing node: \turn:/_#211c90b6-0da18cd7\n" - ] - } - ], + "outputs": [], "source": [ "# keep only valid tags\n", "for s1, p1, o1 in data_graph.triples((None, tc.PHIOT_3_9_10[\"equipRef\"], target_node)):\n", @@ -850,14 +458,12 @@ }, { "cell_type": "markdown", - "id": "fourth-institution", + "id": "vocational-sellers", "metadata": {}, "source": [ "#### b) Add First Class Point Type\n", "\n", "Had to modify this section - the turtle format that comes back from a get request is slightly different than the one tha comes back from the Skyspark UI
\n", - "from the skyspark UI, all points are of class \"bacnet:bacnetPoint\"
\n", - "for the API response points are either \"phIoT:his-point\" or \"phIoT:cur-point\"
\n", "(as both of these are subclasses of \"point\" there should be a way to access it, but unclear what the RDF triple search critera should look like)
\n", "**Alternatively, we could look for everything with a point tag - but we have to do this before above step where we remove the 'point' tag**
\n", "NOTE: if 'his', 'cur', 'writable', or 'weather' tags are not removed, first class point may not be correct, as it assumes mutual exclusivity " @@ -865,50 +471,12 @@ }, { "cell_type": "code", - "execution_count": 11, - "id": "opponent-price", + "execution_count": null, + "id": "distinct-blackberry", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Point: \turn:/_#22f5d821-8e310c3e\n", - "Tags: \tsensor\n", - "\toccupied\n", - "\t...First Class Entity Type: point\n", - "\n", - "Point: \turn:/_#211c90ab-701fa511\n", - "Tags: \tsensor\n", - "\tzone\n", - "\tair\n", - "\ttemp\n", - "\t...First Class Entity Type: air-temp-sensor\n", - "\n", - "Point: \turn:/_#211c90b6-0da18cd7\n", - "Tags: \tcmd\n", - "\tdamper\n", - "\tdischarge\n", - "\tair\n", - "\t...First Class Entity Type: point\n", - "\n", - "Point: \turn:/_#211c90b7-f2430aa1\n", - "Tags: \tsensor\n", - "\tunocc\n", - "\t...First Class Entity Type: point\n", - "\n", - "Point: \turn:/_#211c90b6-52117d4d\n", - "Tags: \ttemp\n", - "\tsp\n", - "\tzone\n", - "\tair\n", - "\t...First Class Entity Type: air-temp-sp\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "from tasty.skyspark import point_mapper as pm\n", "\n", @@ -946,197 +514,26 @@ "\n", "\n", "\n", - "# Get all bacnet points\n", - "for s, p, o in data_graph.triples((None, RDF.type, BACNET['bacnetPoint'])):\n", - " clean_points(s,p,o)\n", - "# Get all cur points\n", - "for s, p, o in data_graph.triples((None, RDF.type, tc.PHIOT_3_9_10['his-point'])):\n", - " clean_points(s,p,o)\n", - "# Get all his points\n", - "for s, p, o in data_graph.triples((None, RDF.type, tc.PHIOT_3_9_10['cur-point'])):\n", - " clean_points(s,p,o)\n", - "\n", - "# # Get all entities with a \"point\" tag\n", - "# for s, p, o in data_graph.triples((None, tc.PH_3_9_10[\"hasTag\"], tc.PHIOT_3_9_10['point'])):\n", - "# clean_points(s,p,o)\n", - "\n", - " " + "# Get all points with an equipRef\n", + "for s, p, o in data_graph.triples((None, tc.PHIOT_3_9_10[\"equipRef\"], None)):\n", + " clean_points(s,p,o) " ] }, { "cell_type": "code", - "execution_count": 12, - "id": "pleasant-printer", + "execution_count": null, + "id": "directed-devil", "metadata": { - "collapsed": true, - "jupyter": { - "outputs_hidden": true - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "@prefix core: .\n", - "@prefix owl: .\n", - "@prefix p_: .\n", - "@prefix ph: .\n", - "@prefix phIoT: .\n", - "@prefix phScience: .\n", - "@prefix rdfs: .\n", - "@prefix xsd: .\n", - "\n", - "ph:hasTag a owl:ObjectProperty ;\n", - " rdfs:range ph:marker .\n", - "\n", - "p_:211c90ab-701fa511 a phIoT:air-temp-sensor,\n", - " phIoT:his-point ;\n", - " rdfs:label \"S&TF UFVAV-3 Zone Temp\" ;\n", - " ph:hasTag phIoT:zone ;\n", - " ph:kind \"Number\" ;\n", - " ph:tz \"Denver\" ;\n", - " ph:unit \"°F\" ;\n", - " phIoT:curStatus \"unknown\" ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Zone Temp\" ;\n", - " p_:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " p_:bacnetCur \"AI5\" ;\n", - " p_:bacnetDis \"RM TEMP\" ;\n", - " p_:bacnetHis \"TL3\" ;\n", - " p_:bacnetObjectType \"ANALOG_INPUT\" ;\n", - " p_:connRef p_:211c8a83-ef5c639d ;\n", - " p_:connTuningRef p_:1f4a131c-3f1fcc51 ;\n", - " p_:hisAppendNA 30 ;\n", - " p_:hisSize 32833 ;\n", - " p_:sqlConnRef p_:24a0194c-adac2f1d ;\n", - " p_:sqlTable \"CopperCube_SERF_STF_Area_37034_TL3\" ;\n", - " p_:sqlTz \"America/Phoenix\" .\n", - "\n", - "p_:211c90b6-0da18cd7 a phIoT:cur-point,\n", - " phIoT:point ;\n", - " rdfs:label \"S&TF UFVAV-3 Damper\" ;\n", - " ph:hasTag phIoT:cmd,\n", - " phIoT:damper,\n", - " phIoT:discharge,\n", - " phScience:air ;\n", - " ph:kind \"Number\" ;\n", - " ph:tz \"Denver\" ;\n", - " ph:unit \"%\" ;\n", - " phIoT:curStatus \"ok\" ;\n", - " phIoT:curVal 0 ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Damper\" ;\n", - " p_:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " p_:bacnetCur \"AV7\" ;\n", - " p_:bacnetDis \"DMP POS\" ;\n", - " p_:bacnetObjectType \"ANALOG_VALUE\" ;\n", - " p_:connRef p_:211c8a83-ef5c639d ;\n", - " p_:connTuningRef p_:1f40f395-5a02b62e ;\n", - " p_:hisAppendNA 30 ;\n", - " p_:hisCollectInterval 5 ;\n", - " p_:hisCollectWriteFreq 15 ;\n", - " p_:hisSize 415310 .\n", - "\n", - "p_:211c90b6-52117d4d a phIoT:air-temp-sp,\n", - " phIoT:cur-point ;\n", - " rdfs:label \"S&TF UFVAV-3 Zone Temp Setpt\" ;\n", - " ph:hasTag phIoT:zone ;\n", - " ph:kind \"Number\" ;\n", - " ph:tz \"Denver\" ;\n", - " ph:unit \"°F\" ;\n", - " phIoT:curStatus \"ok\" ;\n", - " phIoT:curVal 74 ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Zone Temp Setpt\" ;\n", - " p_:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " p_:bacnetCur \"AV11\" ;\n", - " p_:bacnetDis \"RM TEMP STPT\" ;\n", - " p_:bacnetObjectType \"ANALOG_VALUE\" ;\n", - " p_:connRef p_:211c8a83-ef5c639d ;\n", - " p_:connTuningRef p_:1f40f395-5a02b62e ;\n", - " p_:hisAppendNA 30 ;\n", - " p_:hisCollectInterval 5 ;\n", - " p_:hisCollectWriteFreq 15 ;\n", - " p_:hisSize 415327 .\n", - "\n", - "p_:211c90b7-f2430aa1 a phIoT:cur-point,\n", - " phIoT:point ;\n", - " rdfs:label \"S&TF UFVAV-3 Unocc Override\" ;\n", - " ph:enum \"OFF,ON\" ;\n", - " ph:hasTag phIoT:sensor,\n", - " phIoT:unocc ;\n", - " ph:kind \"Bool\" ;\n", - " ph:tz \"Denver\" ;\n", - " phIoT:curStatus \"ok\" ;\n", - " phIoT:curVal false ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:hisMode \"cov\" ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Unocc Override\" ;\n", - " p_:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " p_:bacnetCur \"BI6\" ;\n", - " p_:bacnetDis \"UNOCC OVRD\" ;\n", - " p_:bacnetObjectType \"BINARY_INPUT\" ;\n", - " p_:connRef p_:211c8a83-ef5c639d ;\n", - " p_:connTuningRef p_:1f40f395-5a02b62e ;\n", - " p_:hisCollectWriteFreq 15 ;\n", - " p_:hisSize 409 .\n", - "\n", - "p_:22f5d821-8e310c3e a phIoT:his-point,\n", - " phIoT:point ;\n", - " rdfs:label \"S&TF UFVAV-3 Schedule\" ;\n", - " ph:hasTag phIoT:occupied,\n", - " phIoT:sensor ;\n", - " ph:kind \"Bool\" ;\n", - " ph:tz \"Denver\" ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Schedule\" ;\n", - " p_:hisFunc \"calcMirrorHisPoint(_,_,_,_,@p:stm_campus:r:22f4de28-7e5ea4aa)\" .\n", - "\n", - "p_:214466de-7abb28a7 a phIoT:vav ;\n", - " rdfs:label \"S&TF UFVAV-3\" ;\n", - " ph:hasTag phIoT:equip,\n", - " phIoT:vav ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " core:disMacro \"$siteRef $navName\" ;\n", - " core:navName \"UFVAV-3\" ;\n", - " p_:ahuRef p_:21164218-5fab5c91 ;\n", - " p_:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " p_:bacnetDeviceId 37034 ;\n", - " p_:connRef p_:211c8a83-ef5c639d .\n", - "\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "print_graph(data_graph)" ] }, { "cell_type": "markdown", - "id": "searching-citizenship", + "id": "indirect-pound", "metadata": {}, "source": [ "### Add Sample Equipment as Target Node" @@ -1144,7 +541,7 @@ }, { "cell_type": "markdown", - "id": "becoming-circulation", + "id": "cross-gibson", "metadata": {}, "source": [ "First we add a triple to the shapes graph:\n", @@ -1157,18 +554,10 @@ }, { "cell_type": "code", - "execution_count": 13, - "id": "abstract-hotel", + "execution_count": null, + "id": "sufficient-floor", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#NREL-VAV-SD-Cooling-Only-Shape\n" - ] - } - ], + "outputs": [], "source": [ "# add Instance Equipment as target node to SHACL Equipment Shape\n", "shapes_graph.add((shape_name, SH.targetNode, target_node))\n", @@ -1177,7 +566,7 @@ }, { "cell_type": "markdown", - "id": "formal-soundtrack", + "id": "atmospheric-poverty", "metadata": {}, "source": [ "Next we iterate over all *nodes* of the SHACL equipment shape using rdflidb's `triples()` function which supports basic triple pattern matching ([see documentation here](https://rdflib.readthedocs.io/en/stable/intro_to_graphs.html)). For each triple with a subject of the SHACL equipment shape and predicate of `sh:node`, we take the object (i.e. all of the functional group shapes which constitute the equipment shape) and add the sample equipment as a target node to these shapes. This is done so that the validation results will identify specific points that fail to validate, rather than simply functional group shapes.
\n", @@ -1191,25 +580,10 @@ }, { "cell_type": "code", - "execution_count": 14, - "id": "exotic-james", + "execution_count": null, + "id": "competent-circulation", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#ZoneThermalComfortSensorsShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#ZoneDemandControlledVentilationShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#AirTemperatureControlShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#VAVAirFlowControlShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#ZoneOccupancySensorsShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#ZoneCoolingSetpointsShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#ZoneHeatingSetpointsShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#ZoneModeControlShape\n" - ] - } - ], + "outputs": [], "source": [ "# add Instance Equipment as target node to SHACL Functional Groups Shapes\n", "for s1, p1, o1 in shapes_graph.triples((shape_name, SH.node, None)):\n", @@ -1219,7 +593,7 @@ }, { "cell_type": "markdown", - "id": "missing-surface", + "id": "baking-major", "metadata": {}, "source": [ "# 3) Validation" @@ -1227,7 +601,7 @@ }, { "cell_type": "markdown", - "id": "entire-mexico", + "id": "subject-yellow", "metadata": {}, "source": [ "## PySHACL Validation" @@ -1235,18 +609,10 @@ }, { "cell_type": "code", - "execution_count": 15, - "id": "protecting-married", + "execution_count": null, + "id": "instant-blackjack", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Conforms: False\n" - ] - } - ], + "outputs": [], "source": [ "# ----------------------------------------\n", "# Run pySCHACL Validation\n", @@ -1259,363 +625,19 @@ }, { "cell_type": "code", - "execution_count": 16, - "id": "dense-barcelona", + "execution_count": null, + "id": "smart-demand", "metadata": { - "collapsed": true, - "jupyter": { - "outputs_hidden": true - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "@prefix nrel: .\n", - "@prefix phIoT: .\n", - "@prefix phShapes: .\n", - "@prefix sh: .\n", - "@prefix xsd: .\n", - "\n", - "[] a sh:ValidationReport ;\n", - " sh:conforms false ;\n", - " sh:result [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureCoolingEffectiveSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:CoolingRequestsShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:OccupancyOverrideCommandShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureHeatingOccupiedSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureCoolingOccupiedSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneRelativeHumidityShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:OccupancyModeStandbyShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:HeatingRequestsShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureHeatingEffectiveSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:MaximumHeatingDischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:MinimumCoolingDischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:DischargeAirFlowShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not have class phIoT:coolingOnly-vav\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:ClassConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureHeatingStandbySetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:DischargeAirDamperFeedbackShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureCoolingStandbySetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:DischargeAirTemperatureShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:OccupancyModeBinaryShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape phShapes:zone-air-co2-sp-shape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape', 'nrel:ZoneThermalComfortSensorsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:MinimumHeatingDischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:BinaryOccupancySensorShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:DischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape phShapes:zone-air-co2-sensor-shape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneEquipmentOperatingStateShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureHeatingUnoccupiedSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:MaximumCoolingDischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureCoolingUnoccupiedSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ] .\n", - "\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "print_graph(results_graph)" ] }, { "cell_type": "markdown", - "id": "solar-effort", + "id": "reverse-valve", "metadata": {}, "source": [ "## Determine Missing Points\n", @@ -1630,61 +652,32 @@ }, { "cell_type": "code", - "execution_count": 17, - "id": "willing-endorsement", + "execution_count": null, + "id": "developmental-merchant", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "26 Missing Points:\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureHeatingStandbySetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureHeatingOccupiedSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureHeatingUnoccupiedSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureHeatingEffectiveSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#DischargeAirFlowShape\n", - "\thttps://project-haystack.org/datashapes/nrel#MaximumCoolingDischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#MaximumHeatingDischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#DischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#DischargeAirDamperFeedbackShape\n", - "\thttps://project-haystack.org/datashapes/nrel#MinimumHeatingDischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#MinimumCoolingDischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#BinaryOccupancySensorShape\n", - "\thttps://project-haystack.org/datashapes/nrel#OccupancyOverrideCommandShape\n", - "\thttps://project-haystack.org/datashapes/nrel#CoolingRequestsShape\n", - "\thttps://project-haystack.org/datashapes/nrel#DischargeAirTemperatureShape\n", - "\thttps://project-haystack.org/datashapes/nrel#HeatingRequestsShape\n", - "\thttps://project-haystack.org/datashapes/nrel#OccupancyModeBinaryShape\n", - "\thttps://project-haystack.org/datashapes/nrel#OccupancyModeStandbyShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneEquipmentOperatingStateShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneRelativeHumidityShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureCoolingEffectiveSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureCoolingStandbySetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureCoolingUnoccupiedSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureCoolingOccupiedSetpointShape\n", - "\thttps://project-haystack.org/datashapes/core#zone-air-co2-sp-shape\n", - "\thttps://project-haystack.org/datashapes/core#zone-air-co2-sensor-shape\n" - ] - } - ], + "outputs": [], "source": [ "missing_points = []\n", + "optional_points = []\n", "\n", "# Find the Validation Results\n", "for subject, predicate, object in results_graph.triples((None, RDF.type, SH.ValidationResult)):\n", "# print(f\"Subject:{subject}\\tPredicate:{predicate}\\tObject:{object}\")\n", - "\n", + " severity = results_graph.value(subject = subject, predicate= SH.resultSeverity)\n", + " \n", " # check if Validation result points to a BNode\n", " for node in results_graph.objects(subject=subject, predicate=SH.sourceShape):\n", "# print(f\"\\tNode:{node}\\t\\tIs BNode:{isinstance(node, BNode)}\")\n", "\n", " if isinstance(node, BNode):\n", " point = results_graph.value(subject=node, predicate=SH.qualifiedValueShape)\n", - " missing_points.append(point)\n", - "\n", + " \n", + " if(severity == SH.Violation):\n", + " missing_points.append(point)\n", + " elif(severity == SH.Warning):\n", + " optional_points.append(point)\n", "if len(missing_points) <= 0:\n", " print(\"No Points Missing\")\n", "else:\n", @@ -1693,12 +686,19 @@ "# for subject, predicate, object in shapes_graph.triples((point, SH.class, None)):\n", "# print(f\"Subject:{subject}\\tPredicate:{predicate}\\tObject:{object}\")\n", " print(f\"\\t{point}\")\n", + " \n", + "if len(optional_points) <= 0:\n", + " print(\"No Optional Points Missing\")\n", + "else:\n", + " print(f\"{len(optional_points)} Missing Optional Points:\")\n", + " for point in optional_points:\n", + " print(f\"\\t{point}\")\n", " " ] }, { "cell_type": "markdown", - "id": "useful-mayor", + "id": "permanent-alert", "metadata": {}, "source": [ "## Print pySHACL Graphs and Results to File (Optional) " @@ -1706,21 +706,12 @@ }, { "cell_type": "code", - "execution_count": 18, - "id": "retired-sitting", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "...printed results\n", - "...printed data graph\n", - "...printed shapes graph\n", - "...printed results graph\n" - ] - } - ], + "execution_count": null, + "id": "based-renaissance", + "metadata": { + "tags": [] + }, + "outputs": [], "source": [ "# ----------------------------------------\n", "# Print Output Files\n", @@ -1743,7 +734,7 @@ }, { "cell_type": "markdown", - "id": "eight-gambling", + "id": "precious-colonial", "metadata": {}, "source": [ "## 3b) Brick Validation (Optional)\n", @@ -1752,18 +743,12 @@ }, { "cell_type": "code", - "execution_count": 19, - "id": "senior-maryland", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Brick Validation - Conforms: True\n" - ] - } - ], + "execution_count": null, + "id": "female-heart", + "metadata": { + "tags": [] + }, + "outputs": [], "source": [ "# ----------------------------------------\n", "# Run BrickSchema Validation\n", @@ -1789,7 +774,7 @@ { "cell_type": "code", "execution_count": null, - "id": "antique-madness", + "id": "supreme-generation", "metadata": {}, "outputs": [], "source": [] diff --git a/examples/Sample Skyspark VAV Validation.ipynb b/examples/Sample Skyspark VAV Validation.ipynb index 3ca554f..e57b2c9 100644 --- a/examples/Sample Skyspark VAV Validation.ipynb +++ b/examples/Sample Skyspark VAV Validation.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "forced-trainer", + "id": "adopted-shift", "metadata": {}, "source": [ "# Sample Skyspark VAV Validation" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "vital-preserve", + "id": "paperback-present", "metadata": {}, "source": [ "# 1) Setup" @@ -18,7 +18,7 @@ }, { "cell_type": "markdown", - "id": "identical-street", + "id": "hybrid-diesel", "metadata": {}, "source": [ "## Imports" @@ -26,8 +26,8 @@ }, { "cell_type": "code", - "execution_count": 1, - "id": "superb-netscape", + "execution_count": null, + "id": "metropolitan-candidate", "metadata": { "tags": [] }, @@ -49,7 +49,7 @@ }, { "cell_type": "markdown", - "id": "verbal-basics", + "id": "surprised-hampshire", "metadata": {}, "source": [ "## Inputs\n", @@ -69,8 +69,8 @@ }, { "cell_type": "code", - "execution_count": 2, - "id": "lined-pierce", + "execution_count": null, + "id": "annoying-hundred", "metadata": {}, "outputs": [], "source": [ @@ -83,7 +83,7 @@ "input_namespace_uri = 'urn:/_#'\n", "\n", "raw_data_graph_filename = 'tests/files/data/sample_skyspark_vav_raw_backup.ttl'\n", - "data_graph_filename = 'tests/files/data/sample_skyspark_vav_clean.ttl'\n", + "data_graph_filename = 'examples/output/sample_skyspark_vav_clean.ttl'\n", "shapes_graph_filename = 'tasty/generated_shapes/haystack_all.ttl'\n", "\n", "output_directory = os.path.join(os.path.abspath(''), 'example_data/output')\n", @@ -93,7 +93,7 @@ }, { "cell_type": "markdown", - "id": "mexican-artist", + "id": "efficient-christian", "metadata": {}, "source": [ "### Pre-Process Raw Input File\n", @@ -107,8 +107,8 @@ }, { "cell_type": "code", - "execution_count": 3, - "id": "olympic-internet", + "execution_count": null, + "id": "musical-laptop", "metadata": { "tags": [] }, @@ -144,7 +144,7 @@ }, { "cell_type": "markdown", - "id": "downtown-yeast", + "id": "centered-rebecca", "metadata": {}, "source": [ "# 2) Main Code" @@ -152,7 +152,7 @@ }, { "cell_type": "markdown", - "id": "roman-flower", + "id": "partial-boulder", "metadata": {}, "source": [ "## Definitions\n", @@ -161,8 +161,8 @@ }, { "cell_type": "code", - "execution_count": 4, - "id": "listed-sheriff", + "execution_count": null, + "id": "complimentary-ballot", "metadata": {}, "outputs": [], "source": [ @@ -176,13 +176,12 @@ "\n", "PHCUSTOM = Namespace(\"https://project-haystack.org/def/custom#\")\n", "POINT = Namespace(\"https://skyfoundry.com/def/point/3.0.27#\")\n", - "BACNET = Namespace(\"https://skyfoundry.com/def/bacnet/3.0.27#\")\n", "\n", "# known_tags = [\"zone\", \"air\", \"temp\", \"sensor\", \"sp\", \"cmd\", \"discharge\", \"damper\", \"humidity\", \"co2\", \"occupied\",\n", "# \"occupancyIndicator\", \"cooling\", \"heating\", \"effective\", \"occ\", \"unocc\", \"standby\", \"operating\", \"mode\", \"request\",\n", "# \"leaving\", \"entering\", \"flow\", \"min\", \"max\", \"pressure\", ] \n", "\n", - "# invalid_tags = [tc.PHIOT_3_9_10[\"point\"], tc.PHIOT_3_9_10[\"his\"], POINT[\"hisCollectCov\"], tc.PHIOT_3_9_10[\"cur\"], BACNET[\"bacnetPoint\"]]\n", + "# invalid_tags = [tc.PHIOT_3_9_10[\"point\"], tc.PHIOT_3_9_10[\"his\"], POINT[\"hisCollectCov\"], tc.PHIOT_3_9_10[\"cur\"]]\n", "\n", "# ----------------------------------------\n", "# Helper Function Definitions\n", @@ -214,7 +213,7 @@ }, { "cell_type": "markdown", - "id": "forced-range", + "id": "judicial-protest", "metadata": {}, "source": [ "## Generate and Process Graphs" @@ -222,7 +221,7 @@ }, { "cell_type": "markdown", - "id": "sharp-command", + "id": "earned-forward", "metadata": {}, "source": [ "### Create Data, Shapes, and Ontology Graphs \n", @@ -231,22 +230,12 @@ }, { "cell_type": "code", - "execution_count": 5, - "id": "fabulous-lotus", + "execution_count": null, + "id": "approximate-tuesday", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "...loaded data graph\n", - "...loaded shapes graph\n", - "...loaded ontology graph\n" - ] - } - ], + "outputs": [], "source": [ "# ----------------------------------------\n", "# Generate Graphs\n", @@ -267,7 +256,7 @@ }, { "cell_type": "markdown", - "id": "third-school", + "id": "micro-carpet", "metadata": {}, "source": [ "### Get List of Valid Tags With Namespaces\n", @@ -276,189 +265,12 @@ }, { "cell_type": "code", - "execution_count": 6, - "id": "associate-cambodia", + "execution_count": null, + "id": "progressive-sauce", "metadata": { - "collapsed": true, - "jupyter": { - "outputs_hidden": true - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "...generated tag list\n", - "...adding namespaces\n", - "Tag: ac URI: https://project-haystack.org/def/phIoT/3.9.10#ac\n", - "Tag: acoustic URI: https://project-haystack.org/def/custom#acoustic\n", - "Tag: active URI: https://project-haystack.org/def/phIoT/3.9.10#active\n", - "Tag: adjust URI: https://project-haystack.org/def/custom#adjust\n", - "Tag: air URI: https://project-haystack.org/def/phScience/3.9.10#air\n", - "Tag: alarm URI: https://project-haystack.org/def/custom#alarm\n", - "Tag: apparent URI: https://project-haystack.org/def/phScience/3.9.10#apparent\n", - "Tag: avg URI: https://project-haystack.org/def/phScience/3.9.10#avg\n", - "Tag: bandwidth URI: https://project-haystack.org/def/custom#bandwidth\n", - "Tag: building URI: https://project-haystack.org/def/custom#building\n", - "Tag: bypass URI: https://project-haystack.org/def/phIoT/3.9.10#bypass\n", - "Tag: call URI: https://project-haystack.org/def/custom#call\n", - "Tag: car URI: https://project-haystack.org/def/custom#car\n", - "Tag: chilled URI: https://project-haystack.org/def/phIoT/3.9.10#chilled\n", - "Tag: circuit URI: https://project-haystack.org/def/custom#circuit\n", - "Tag: closed URI: https://project-haystack.org/def/custom#closed\n", - "Tag: cmd URI: https://project-haystack.org/def/phIoT/3.9.10#cmd\n", - "Tag: co URI: https://project-haystack.org/def/phScience/3.9.10#co\n", - "Tag: co2 URI: https://project-haystack.org/def/phScience/3.9.10#co2\n", - "Tag: coldDeck URI: https://project-haystack.org/def/phIoT/3.9.10#coldDeck\n", - "Tag: colorTemperature URI: https://project-haystack.org/def/custom#colorTemperature\n", - "Tag: comm URI: https://project-haystack.org/def/custom#comm\n", - "Tag: compressor URI: https://project-haystack.org/def/custom#compressor\n", - "Tag: conc URI: https://project-haystack.org/def/custom#conc\n", - "Tag: condensate URI: https://project-haystack.org/def/phIoT/3.9.10#condensate\n", - "Tag: condenser URI: https://project-haystack.org/def/phIoT/3.9.10#condenser\n", - "Tag: config URI: https://project-haystack.org/def/custom#config\n", - "Tag: cool URI: https://project-haystack.org/def/phIoT/3.9.10#cool\n", - "Tag: cooling URI: https://project-haystack.org/def/phIoT/3.9.10#cooling\n", - "Tag: cpu URI: https://project-haystack.org/def/custom#cpu\n", - "Tag: current URI: https://project-haystack.org/def/phScience/3.9.10#current\n", - "Tag: damper URI: https://project-haystack.org/def/phIoT/3.9.10#damper\n", - "Tag: daylighting URI: https://project-haystack.org/def/custom#daylighting\n", - "Tag: dc URI: https://project-haystack.org/def/phIoT/3.9.10#dc\n", - "Tag: deadband URI: https://project-haystack.org/def/custom#deadband\n", - "Tag: delta URI: https://project-haystack.org/def/phIoT/3.9.10#delta\n", - "Tag: demand URI: https://project-haystack.org/def/phIoT/3.9.10#demand\n", - "Tag: dewPoint URI: https://project-haystack.org/def/phScience/3.9.10#dewPoint\n", - "Tag: direction URI: https://project-haystack.org/def/phScience/3.9.10#direction\n", - "Tag: disable URI: https://project-haystack.org/def/custom#disable\n", - "Tag: discharge URI: https://project-haystack.org/def/phIoT/3.9.10#discharge\n", - "Tag: door URI: https://project-haystack.org/def/custom#door\n", - "Tag: drive URI: https://project-haystack.org/def/phIoT/3.9.10#drive\n", - "Tag: dtManager URI: https://project-haystack.org/def/custom#dtManager\n", - "Tag: dx URI: https://project-haystack.org/def/custom#dx\n", - "Tag: econ URI: https://project-haystack.org/def/custom#econ\n", - "Tag: economizing URI: https://project-haystack.org/def/phIoT/3.9.10#economizing\n", - "Tag: effective URI: https://project-haystack.org/def/phIoT/3.9.10#effective\n", - "Tag: elec URI: https://project-haystack.org/def/phScience/3.9.10#elec\n", - "Tag: enable URI: https://project-haystack.org/def/phIoT/3.9.10#enable\n", - "Tag: energy URI: https://project-haystack.org/def/phScience/3.9.10#energy\n", - "Tag: entering URI: https://project-haystack.org/def/phIoT/3.9.10#entering\n", - "Tag: enthalpy URI: https://project-haystack.org/def/custom#enthalpy\n", - "Tag: error URI: https://project-haystack.org/def/custom#error\n", - "Tag: evap URI: https://project-haystack.org/def/custom#evap\n", - "Tag: evaporator URI: https://project-haystack.org/def/phIoT/3.9.10#evaporator\n", - "Tag: exhaust URI: https://project-haystack.org/def/phIoT/3.9.10#exhaust\n", - "Tag: export URI: https://project-haystack.org/def/phIoT/3.9.10#export\n", - "Tag: faceBypass URI: https://project-haystack.org/def/phIoT/3.9.10#faceBypass\n", - "Tag: fan URI: https://project-haystack.org/def/phIoT/3.9.10#fan\n", - "Tag: filter URI: https://project-haystack.org/def/phIoT/3.9.10#filter\n", - "Tag: flow URI: https://project-haystack.org/def/phScience/3.9.10#flow\n", - "Tag: freezeStat URI: https://project-haystack.org/def/phIoT/3.9.10#freezeStat\n", - "Tag: freq URI: https://project-haystack.org/def/phScience/3.9.10#freq\n", - "Tag: gas URI: https://project-haystack.org/def/phScience/3.9.10#gas\n", - "Tag: glycol URI: https://project-haystack.org/def/custom#glycol\n", - "Tag: group URI: https://project-haystack.org/def/custom#group\n", - "Tag: hcho URI: https://project-haystack.org/def/custom#hcho\n", - "Tag: heap URI: https://project-haystack.org/def/custom#heap\n", - "Tag: heat URI: https://project-haystack.org/def/phIoT/3.9.10#heat\n", - "Tag: heatCool URI: https://project-haystack.org/def/custom#heatCool\n", - "Tag: heatRecovery URI: https://project-haystack.org/def/custom#heatRecovery\n", - "Tag: heatWheel URI: https://project-haystack.org/def/phIoT/3.9.10#heatWheel\n", - "Tag: heating URI: https://project-haystack.org/def/phIoT/3.9.10#heating\n", - "Tag: hot URI: https://project-haystack.org/def/phIoT/3.9.10#hot\n", - "Tag: hotDeck URI: https://project-haystack.org/def/phIoT/3.9.10#hotDeck\n", - "Tag: hotGas URI: https://project-haystack.org/def/custom#hotGas\n", - "Tag: hvacMode URI: https://project-haystack.org/def/custom#hvacMode\n", - "Tag: illuminance URI: https://project-haystack.org/def/phScience/3.9.10#illuminance\n", - "Tag: import URI: https://project-haystack.org/def/phIoT/3.9.10#import\n", - "Tag: inlet URI: https://project-haystack.org/def/phIoT/3.9.10#inlet\n", - "Tag: isolation URI: https://project-haystack.org/def/phIoT/3.9.10#isolation\n", - "Tag: landing URI: https://project-haystack.org/def/custom#landing\n", - "Tag: leak URI: https://project-haystack.org/def/custom#leak\n", - "Tag: leaving URI: https://project-haystack.org/def/phIoT/3.9.10#leaving\n", - "Tag: level URI: https://project-haystack.org/def/phScience/3.9.10#level\n", - "Tag: light URI: https://project-haystack.org/def/phScience/3.9.10#light\n", - "Tag: lighting URI: https://project-haystack.org/def/phIoT/3.9.10#lighting\n", - "Tag: line URI: https://project-haystack.org/def/custom#line\n", - "Tag: load URI: https://project-haystack.org/def/phIoT/3.9.10#load\n", - "Tag: loadshed URI: https://project-haystack.org/def/custom#loadshed\n", - "Tag: magnitude URI: https://project-haystack.org/def/phScience/3.9.10#magnitude\n", - "Tag: max URI: https://project-haystack.org/def/custom#max\n", - "Tag: maxVal URI: https://project-haystack.org/def/ph/3.9.10#maxVal\n", - "Tag: min URI: https://project-haystack.org/def/custom#min\n", - "Tag: mixed URI: https://project-haystack.org/def/phIoT/3.9.10#mixed\n", - "Tag: mode URI: https://project-haystack.org/def/custom#mode\n", - "Tag: naturalGas URI: https://project-haystack.org/def/phIoT/3.9.10#naturalGas\n", - "Tag: net URI: https://project-haystack.org/def/phIoT/3.9.10#net\n", - "Tag: next URI: https://project-haystack.org/def/custom#next\n", - "Tag: nh3 URI: https://project-haystack.org/def/custom#nh3\n", - "Tag: no2 URI: https://project-haystack.org/def/custom#no2\n", - "Tag: number URI: https://project-haystack.org/def/ph/3.9.10#number\n", - "Tag: o3 URI: https://project-haystack.org/def/custom#o3\n", - "Tag: occ URI: https://project-haystack.org/def/phIoT/3.9.10#occ\n", - "Tag: occupancy URI: https://project-haystack.org/def/phIoT/3.9.10#occupancy\n", - "Tag: occupancyIndicator URI: https://project-haystack.org/def/custom#occupancyIndicator\n", - "Tag: occupied URI: https://project-haystack.org/def/phIoT/3.9.10#occupied\n", - "Tag: open URI: https://project-haystack.org/def/custom#open\n", - "Tag: operating URI: https://project-haystack.org/def/custom#operating\n", - "Tag: outside URI: https://project-haystack.org/def/phIoT/3.9.10#outside\n", - "Tag: override URI: https://project-haystack.org/def/custom#override\n", - "Tag: perimeterHeat URI: https://project-haystack.org/def/phIoT/3.9.10#perimeterHeat\n", - "Tag: pf URI: https://project-haystack.org/def/phIoT/3.9.10#pf\n", - "Tag: phase URI: https://project-haystack.org/def/phIoT/3.9.10#phase\n", - "Tag: physicalMemory URI: https://project-haystack.org/def/custom#physicalMemory\n", - "Tag: plenum URI: https://project-haystack.org/def/custom#plenum\n", - "Tag: pm01 URI: https://project-haystack.org/def/custom#pm01\n", - "Tag: pm10 URI: https://project-haystack.org/def/phScience/3.9.10#pm10\n", - "Tag: pm25 URI: https://project-haystack.org/def/phScience/3.9.10#pm25\n", - "Tag: poe URI: https://project-haystack.org/def/custom#poe\n", - "Tag: position URI: https://project-haystack.org/def/custom#position\n", - "Tag: power URI: https://project-haystack.org/def/phScience/3.9.10#power\n", - "Tag: pressure URI: https://project-haystack.org/def/phScience/3.9.10#pressure\n", - "Tag: primaryLoop URI: https://project-haystack.org/def/custom#primaryLoop\n", - "Tag: pump URI: https://project-haystack.org/def/phIoT/3.9.10#pump\n", - "Tag: reactive URI: https://project-haystack.org/def/phIoT/3.9.10#reactive\n", - "Tag: refrig URI: https://project-haystack.org/def/phIoT/3.9.10#refrig\n", - "Tag: reheat URI: https://project-haystack.org/def/phIoT/3.9.10#reheat\n", - "Tag: relative URI: https://project-haystack.org/def/custom#relative\n", - "Tag: relief URI: https://project-haystack.org/def/custom#relief\n", - "Tag: request URI: https://project-haystack.org/def/custom#request\n", - "Tag: resolution URI: https://project-haystack.org/def/custom#resolution\n", - "Tag: return URI: https://project-haystack.org/def/phIoT/3.9.10#return\n", - "Tag: reversing URI: https://project-haystack.org/def/custom#reversing\n", - "Tag: run URI: https://project-haystack.org/def/phIoT/3.9.10#run\n", - "Tag: scene URI: https://project-haystack.org/def/custom#scene\n", - "Tag: schedulePoint URI: https://project-haystack.org/def/custom#schedulePoint\n", - "Tag: secondaryLoop URI: https://project-haystack.org/def/custom#secondaryLoop\n", - "Tag: sensor URI: https://project-haystack.org/def/phIoT/3.9.10#sensor\n", - "Tag: shades URI: https://project-haystack.org/def/custom#shades\n", - "Tag: sixWay URI: https://project-haystack.org/def/custom#sixWay\n", - "Tag: sp URI: https://project-haystack.org/def/phIoT/3.9.10#sp\n", - "Tag: speed URI: https://project-haystack.org/def/phScience/3.9.10#speed\n", - "Tag: stage URI: https://project-haystack.org/def/phIoT/3.9.10#stage\n", - "Tag: standby URI: https://project-haystack.org/def/phIoT/3.9.10#standby\n", - "Tag: state URI: https://project-haystack.org/def/phIoT/3.9.10#state\n", - "Tag: storageDrive URI: https://project-haystack.org/def/custom#storageDrive\n", - "Tag: subcooler URI: https://project-haystack.org/def/custom#subcooler\n", - "Tag: supply URI: https://project-haystack.org/def/custom#supply\n", - "Tag: temp URI: https://project-haystack.org/def/phScience/3.9.10#temp\n", - "Tag: temperature URI: https://project-haystack.org/def/custom#temperature\n", - "Tag: total URI: https://project-haystack.org/def/phScience/3.9.10#total\n", - "Tag: tvoc URI: https://project-haystack.org/def/phScience/3.9.10#tvoc\n", - "Tag: unocc URI: https://project-haystack.org/def/phIoT/3.9.10#unocc\n", - "Tag: valve URI: https://project-haystack.org/def/phIoT/3.9.10#valve\n", - "Tag: vavMode URI: https://project-haystack.org/def/phIoT/3.9.10#vavMode\n", - "Tag: volt URI: https://project-haystack.org/def/phScience/3.9.10#volt\n", - "Tag: volume URI: https://project-haystack.org/def/phScience/3.9.10#volume\n", - "Tag: water URI: https://project-haystack.org/def/phScience/3.9.10#water\n", - "Tag: wetBulb URI: https://project-haystack.org/def/phScience/3.9.10#wetBulb\n", - "Tag: window URI: https://project-haystack.org/def/custom#window\n", - "Tag: zone URI: https://project-haystack.org/def/phIoT/3.9.10#zone\n", - "0\n" - ] - } - ], + "outputs": [], "source": [ "# ----------------------------------------\n", "# Create a List of Valid Tags\n", @@ -514,7 +326,7 @@ }, { "cell_type": "markdown", - "id": "illegal-mechanism", + "id": "unnecessary-identity", "metadata": {}, "source": [ "### Post Process of Data Graph" @@ -522,7 +334,7 @@ }, { "cell_type": "markdown", - "id": "nominated-lecture", + "id": "relative-preliminary", "metadata": { "tags": [] }, @@ -535,8 +347,8 @@ }, { "cell_type": "code", - "execution_count": 7, - "id": "higher-robertson", + "execution_count": null, + "id": "dress-beauty", "metadata": { "tags": [] }, @@ -552,7 +364,7 @@ }, { "cell_type": "markdown", - "id": "infectious-voice", + "id": "engaging-anchor", "metadata": {}, "source": [ "#### a) Keep Only Valid Tags in Data Graph" @@ -560,24 +372,12 @@ }, { "cell_type": "code", - "execution_count": 7, - "id": "ranking-husband", + "execution_count": null, + "id": "shaped-julian", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "urn:/_#211c90b7-f2430aa1\n", - "urn:/_#211c90b6-0da18cd7\n", - "urn:/_#211c90b6-52117d4d\n", - "urn:/_#211c90ab-701fa511\n", - "urn:/_#22f5d821-8e310c3e\n" - ] - } - ], + "outputs": [], "source": [ "# keep only valid tags\n", "for s1, p1, o1 in data_graph.triples((None, tc.PHIOT_3_9_10[\"equipRef\"], target_node)):\n", @@ -589,7 +389,7 @@ }, { "cell_type": "markdown", - "id": "immediate-application", + "id": "brave-berkeley", "metadata": {}, "source": [ "#### b) Add First Class Point Type" @@ -597,53 +397,12 @@ }, { "cell_type": "code", - "execution_count": 8, - "id": "handed-excuse", + "execution_count": null, + "id": "downtown-joining", "metadata": { - "collapsed": true, - "jupyter": { - "outputs_hidden": true - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Point: urn:/_#211c90b6-0da18cd7\n", - "Tags: \n", - "\tdischarge\n", - "\tcmd\n", - "\tair\n", - "\tdamper\n", - "\tFirst Class Entity Type: point\n", - "\n", - "Point: urn:/_#211c90b7-f2430aa1\n", - "Tags: \n", - "\tunocc\n", - "\tsensor\n", - "\tFirst Class Entity Type: point\n", - "\n", - "Point: urn:/_#211c90ab-701fa511\n", - "Tags: \n", - "\tsensor\n", - "\tair\n", - "\ttemp\n", - "\tzone\n", - "\tFirst Class Entity Type: air-temp-sensor\n", - "\n", - "Point: urn:/_#211c90b6-52117d4d\n", - "Tags: \n", - "\tsp\n", - "\tzone\n", - "\ttemp\n", - "\tair\n", - "\tFirst Class Entity Type: air-temp-sp\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "from tasty.skyspark import point_mapper as pm\n", "\n", @@ -652,8 +411,8 @@ "pt = pm.PointTree(file, 'point')\n", "root = pt.get_root()\n", "\n", - "# Start by getting all backnet points\n", - "for s, p, o in data_graph.triples((None, RDF.type, BACNET['bacnetPoint'])):\n", + "# Start by getting all points with an equipRef\n", + "for s, p, o in data_graph.triples((None, tc.PHIOT_3_9_10[\"equipRef\"], None)):\n", " print(f\"Point: {s}\")\n", " print(f\"Tags: \")\n", " \n", @@ -683,182 +442,19 @@ }, { "cell_type": "code", - "execution_count": 10, - "id": "valued-finnish", + "execution_count": null, + "id": "postal-bahamas", "metadata": { - "collapsed": true, - "jupyter": { - "outputs_hidden": true - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "@prefix bacnet: .\n", - "@prefix conn: .\n", - "@prefix core: .\n", - "@prefix his: .\n", - "@prefix owl: .\n", - "@prefix p_: .\n", - "@prefix ph: .\n", - "@prefix phIoT: .\n", - "@prefix phScience: .\n", - "@prefix point: .\n", - "@prefix rdfs: .\n", - "@prefix sql: .\n", - "@prefix xsd: .\n", - "\n", - "ph:hasTag a owl:ObjectProperty ;\n", - " rdfs:range ph:marker .\n", - "\n", - "p_:211c90ab-701fa511 a phIoT:air-temp-sensor,\n", - " bacnet:bacnetPoint ;\n", - " rdfs:label \"S&TF UFVAV-3 Zone Temp\" ;\n", - " ph:hasTag phIoT:zone ;\n", - " ph:kind \"Number\" ;\n", - " ph:tz \"Denver\" ;\n", - " ph:unit \"°F\" ;\n", - " phIoT:curStatus \"unknown\" ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " bacnet:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " bacnet:bacnetCur \"AI5\" ;\n", - " bacnet:bacnetHis \"TL3\" ;\n", - " conn:connTuningRef p_:1f4a131c-3f1fcc51 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Zone Temp\" ;\n", - " his:hisAppendNA 30 ;\n", - " his:hisSize 32645 ;\n", - " sql:sqlConnRef p_:24a0194c-adac2f1d ;\n", - " p_:bacnetDis \"RM TEMP\" ;\n", - " p_:bacnetObjectType \"ANALOG_INPUT\" ;\n", - " p_:connRef p_:211c8a83-ef5c639d ;\n", - " p_:sqlTable \"CopperCube_SERF_STF_Area_37034_TL3\" ;\n", - " p_:sqlTz \"America/Phoenix\" .\n", - "\n", - "p_:211c90b6-0da18cd7 a phIoT:point,\n", - " bacnet:bacnetPoint ;\n", - " rdfs:label \"S&TF UFVAV-3 Damper\" ;\n", - " ph:hasTag phIoT:cmd,\n", - " phIoT:damper,\n", - " phIoT:discharge,\n", - " phScience:air ;\n", - " ph:kind \"Number\" ;\n", - " ph:tz \"Denver\" ;\n", - " ph:unit \"%\" ;\n", - " phIoT:curStatus \"ok\" ;\n", - " phIoT:curVal 0 ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " bacnet:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " bacnet:bacnetCur \"AV7\" ;\n", - " conn:connTuningRef p_:1f40f395-5a02b62e ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Damper\" ;\n", - " his:hisAppendNA 30 ;\n", - " his:hisSize 413063 ;\n", - " point:hisCollectInterval 5 ;\n", - " point:hisCollectWriteFreq 15 ;\n", - " p_:bacnetDis \"DMP POS\" ;\n", - " p_:bacnetObjectType \"ANALOG_VALUE\" ;\n", - " p_:connRef p_:211c8a83-ef5c639d .\n", - "\n", - "p_:211c90b6-52117d4d a phIoT:air-temp-sp,\n", - " bacnet:bacnetPoint ;\n", - " rdfs:label \"S&TF UFVAV-3 Zone Temp Setpt\" ;\n", - " ph:hasTag phIoT:zone ;\n", - " ph:kind \"Number\" ;\n", - " ph:tz \"Denver\" ;\n", - " ph:unit \"°F\" ;\n", - " phIoT:curStatus \"ok\" ;\n", - " phIoT:curVal 74 ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " bacnet:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " bacnet:bacnetCur \"AV11\" ;\n", - " conn:connTuningRef p_:1f40f395-5a02b62e ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Zone Temp Setpt\" ;\n", - " his:hisAppendNA 30 ;\n", - " his:hisSize 413080 ;\n", - " point:hisCollectInterval 5 ;\n", - " point:hisCollectWriteFreq 15 ;\n", - " p_:bacnetDis \"RM TEMP STPT\" ;\n", - " p_:bacnetObjectType \"ANALOG_VALUE\" ;\n", - " p_:connRef p_:211c8a83-ef5c639d .\n", - "\n", - "p_:211c90b7-f2430aa1 a phIoT:point,\n", - " bacnet:bacnetPoint ;\n", - " rdfs:label \"S&TF UFVAV-3 Unocc Override\" ;\n", - " ph:enum \"OFF,ON\" ;\n", - " ph:hasTag phIoT:sensor,\n", - " phIoT:unocc ;\n", - " ph:kind \"Bool\" ;\n", - " ph:tz \"Denver\" ;\n", - " phIoT:curStatus \"ok\" ;\n", - " phIoT:curVal false ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:hisMode \"cov\" ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " bacnet:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " bacnet:bacnetCur \"BI6\" ;\n", - " conn:connTuningRef p_:1f40f395-5a02b62e ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Unocc Override\" ;\n", - " his:hisSize 409 ;\n", - " point:hisCollectWriteFreq 15 ;\n", - " p_:bacnetDis \"UNOCC OVRD\" ;\n", - " p_:bacnetObjectType \"BINARY_INPUT\" ;\n", - " p_:connRef p_:211c8a83-ef5c639d .\n", - "\n", - "p_:22f5d821-8e310c3e a phIoT:his-point ;\n", - " rdfs:label \"S&TF UFVAV-3 Schedule\" ;\n", - " ph:hasTag phIoT:occupied,\n", - " phIoT:sensor ;\n", - " ph:kind \"Bool\" ;\n", - " ph:tz \"Denver\" ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Schedule\" ;\n", - " p_:hisFunc \"calcMirrorHisPoint(_,_,_,_,@p:stm_campus:r:22f4de28-7e5ea4aa)\" .\n", - "\n", - "p_:214466de-7abb28a7 a phIoT:vav ;\n", - " rdfs:label \"S&TF UFVAV-3\" ;\n", - " ph:hasTag phIoT:equip,\n", - " phIoT:vav ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " bacnet:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " core:disMacro \"$siteRef $navName\" ;\n", - " core:navName \"UFVAV-3\" ;\n", - " p_:ahuRef p_:21164218-5fab5c91 ;\n", - " p_:bacnetDeviceId 37034 ;\n", - " p_:connRef p_:211c8a83-ef5c639d .\n", - "\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "print_graph(data_graph)" ] }, { "cell_type": "markdown", - "id": "painted-apparatus", + "id": "alternative-hartford", "metadata": {}, "source": [ "### Add Sample Equipment as Target Node" @@ -866,7 +462,7 @@ }, { "cell_type": "markdown", - "id": "nonprofit-greek", + "id": "thousand-reasoning", "metadata": {}, "source": [ "First we add a triple to the shapes graph:\n", @@ -879,18 +475,10 @@ }, { "cell_type": "code", - "execution_count": 11, - "id": "ecological-funeral", + "execution_count": null, + "id": "secondary-arlington", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#NREL-VAV-SD-Cooling-Only-Shape\n" - ] - } - ], + "outputs": [], "source": [ "# add Instance Equipment as target node to SHACL Equipment Shape\n", "shapes_graph.add((shape_name, SH.targetNode, target_node))\n", @@ -899,7 +487,7 @@ }, { "cell_type": "markdown", - "id": "after-spoke", + "id": "second-adrian", "metadata": {}, "source": [ "Next we iterate over all *nodes* of the SHACL equipment shape using rdflidb's `triples()` function which supports basic triple pattern matching ([see documentation here](https://rdflib.readthedocs.io/en/stable/intro_to_graphs.html)). For each triple with a subject of the SHACL equipment shape and predicate of `sh:node`, we take the object (i.e. all of the functional group shapes which constitute the equipment shape) and add the sample equipment as a target node to these shapes. This is done so that the validation results will identify specific points that fail to validate, rather than simply functional group shapes.
\n", @@ -913,25 +501,10 @@ }, { "cell_type": "code", - "execution_count": 12, - "id": "sapphire-herald", + "execution_count": null, + "id": "liked-anger", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#ZoneModeControlShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#ZoneDemandControlledVentilationShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#ZoneHeatingSetpointsShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#AirTemperatureControlShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#ZoneThermalComfortSensorsShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#ZoneOccupancySensorsShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#ZoneCoolingSetpointsShape\n", - "\tadded 'urn:/_#214466de-7abb28a7' as target node to https://project-haystack.org/datashapes/nrel#VAVAirFlowControlShape\n" - ] - } - ], + "outputs": [], "source": [ "# add Instance Equipment as target node to SHACL Functional Groups Shapes\n", "for s1, p1, o1 in shapes_graph.triples((shape_name, SH.node, None)):\n", @@ -941,7 +514,7 @@ }, { "cell_type": "markdown", - "id": "fabulous-owner", + "id": "dominican-contrary", "metadata": {}, "source": [ "# 3) Validation" @@ -949,7 +522,7 @@ }, { "cell_type": "markdown", - "id": "duplicate-voice", + "id": "weighted-portable", "metadata": {}, "source": [ "## PySHACL Validation" @@ -957,18 +530,10 @@ }, { "cell_type": "code", - "execution_count": 13, - "id": "finite-toolbox", + "execution_count": null, + "id": "absent-draft", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Conforms: False\n" - ] - } - ], + "outputs": [], "source": [ "# ----------------------------------------\n", "# Run pySCHACL Validation\n", @@ -981,363 +546,19 @@ }, { "cell_type": "code", - "execution_count": 14, - "id": "facial-cuisine", + "execution_count": null, + "id": "through-sessions", "metadata": { - "collapsed": true, - "jupyter": { - "outputs_hidden": true - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "@prefix nrel: .\n", - "@prefix phIoT: .\n", - "@prefix phShapes: .\n", - "@prefix sh: .\n", - "@prefix xsd: .\n", - "\n", - "[] a sh:ValidationReport ;\n", - " sh:conforms false ;\n", - " sh:result [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:MaximumCoolingDischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureHeatingStandbySetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureCoolingStandbySetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneRelativeHumidityShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureCoolingEffectiveSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:OccupancyOverrideCommandShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:DischargeAirFlowShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not have class phIoT:coolingOnly-vav\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:ClassConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:CoolingRequestsShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureHeatingOccupiedSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureHeatingUnoccupiedSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:MaximumHeatingDischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape phShapes:zone-air-co2-sensor-shape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape phShapes:zone-air-co2-sp-shape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:DischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneEquipmentOperatingStateShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureHeatingEffectiveSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:OccupancyModeStandbyShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:DischargeAirTemperatureShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureCoolingUnoccupiedSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:BinaryOccupancySensorShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:OccupancyModeBinaryShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:MinimumCoolingDischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:HeatingRequestsShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:MinimumHeatingDischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:DischargeAirDamperFeedbackShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureCoolingOccupiedSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ] .\n", - "\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "print_graph(results_graph)" ] }, { "cell_type": "markdown", - "id": "architectural-translator", + "id": "advance-insert", "metadata": {}, "source": [ "## Determine Missing Points\n", @@ -1352,44 +573,10 @@ }, { "cell_type": "code", - "execution_count": 15, - "id": "ideal-essay", + "execution_count": null, + "id": "overhead-quarterly", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "26 Missing Points:\n", - "\thttps://project-haystack.org/datashapes/nrel#DischargeAirTemperatureShape\n", - "\thttps://project-haystack.org/datashapes/nrel#HeatingRequestsShape\n", - "\thttps://project-haystack.org/datashapes/nrel#CoolingRequestsShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureCoolingUnoccupiedSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureCoolingStandbySetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureCoolingOccupiedSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureCoolingEffectiveSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneRelativeHumidityShape\n", - "\thttps://project-haystack.org/datashapes/core#zone-air-co2-sensor-shape\n", - "\thttps://project-haystack.org/datashapes/core#zone-air-co2-sp-shape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureHeatingStandbySetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureHeatingOccupiedSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureHeatingUnoccupiedSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureHeatingEffectiveSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#OccupancyModeStandbyShape\n", - "\thttps://project-haystack.org/datashapes/nrel#OccupancyModeBinaryShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneEquipmentOperatingStateShape\n", - "\thttps://project-haystack.org/datashapes/nrel#DischargeAirFlowShape\n", - "\thttps://project-haystack.org/datashapes/nrel#DischargeAirDamperFeedbackShape\n", - "\thttps://project-haystack.org/datashapes/nrel#MinimumHeatingDischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#DischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#MaximumHeatingDischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#MaximumCoolingDischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#MinimumCoolingDischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#BinaryOccupancySensorShape\n", - "\thttps://project-haystack.org/datashapes/nrel#OccupancyOverrideCommandShape\n" - ] - } - ], + "outputs": [], "source": [ "missing_points = []\n", "\n", @@ -1418,7 +605,7 @@ }, { "cell_type": "markdown", - "id": "familiar-yukon", + "id": "naughty-password", "metadata": {}, "source": [ "## Print pySHACL Graphs and Results to File (Optional) " @@ -1426,21 +613,10 @@ }, { "cell_type": "code", - "execution_count": 16, - "id": "photographic-yorkshire", + "execution_count": null, + "id": "handed-passage", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "...printed results\n", - "...printed data graph\n", - "...printed shapes graph\n", - "...printed results graph\n" - ] - } - ], + "outputs": [], "source": [ "# ----------------------------------------\n", "# Print Output Files\n", @@ -1463,7 +639,7 @@ }, { "cell_type": "markdown", - "id": "common-alexandria", + "id": "played-finish", "metadata": {}, "source": [ "## 3b) Brick Validation (Optional)\n", @@ -1472,18 +648,10 @@ }, { "cell_type": "code", - "execution_count": 17, - "id": "inner-sender", + "execution_count": null, + "id": "trying-contemporary", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Brick Validation - Conforms: True\n" - ] - } - ], + "outputs": [], "source": [ "# ----------------------------------------\n", "# Run BrickSchema Validation\n", @@ -1509,7 +677,7 @@ { "cell_type": "code", "execution_count": null, - "id": "hydraulic-kingdom", + "id": "biological-intake", "metadata": {}, "outputs": [], "source": [] diff --git a/examples/Skyspark Validation Batched.ipynb b/examples/Skyspark Validation Batched.ipynb new file mode 100644 index 0000000..a76431b --- /dev/null +++ b/examples/Skyspark Validation Batched.ipynb @@ -0,0 +1,356 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "electoral-palestinian", + "metadata": {}, + "source": [ + "# Sample Skyspark Batched" + ] + }, + { + "cell_type": "markdown", + "id": "numeric-spelling", + "metadata": {}, + "source": [ + "This is a modified version of the \"Skyspark Validation\" notebook. It allows a user to query for a set of similar equipment and validate each equipemnt in turn." + ] + }, + { + "cell_type": "markdown", + "id": "possible-bidding", + "metadata": {}, + "source": [ + "# 1) Setup" + ] + }, + { + "cell_type": "markdown", + "id": "resident-brook", + "metadata": {}, + "source": [ + "## Imports" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "irish-applicant", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# ----------------------------------------\n", + "# Imports\n", + "# ----------------------------------------\n", + "import os\n", + "import json\n", + "import re\n", + "\n", + "from rdflib import Namespace, SH, RDF, BNode, Graph\n", + "from pyshacl import validate\n", + "from dotenv import load_dotenv\n", + "load_dotenv()\n", + "\n", + "from tasty import constants as tc\n", + "from tasty import graphs as tg\n", + "from tasty.skyspark import client as cl\n", + "from tasty.skyspark import process_graphs as pg\n", + "from tasty.skyspark import helpers" + ] + }, + { + "cell_type": "markdown", + "id": "editorial-consolidation", + "metadata": {}, + "source": [ + "## Inputs\n", + "Define the key variables and input information here\n", + "\n", + "***Items to Change***\n", + "- `equip_tag`: this is the equipment tag to use in the axon query to find the relavent equipment; this can also be an axon query in itself (e.g. 'vav and hotWateHeat')\n", + "- `building`: this is the building name to use in the axon query (should match the building's \"dis\" name in Skyspark)\n", + "- `SHAPE`: this is the name of the SHACL equipment shape against which you would like to validate your sample equipment in the instance data\n", + "- `input_namespace_uri`: this is the namespace uri used for your sample equipment in the instance data\n", + "- `raw_data_graph_filename`: this is the filename/filepath to save the raw instance data (in turtle format) retrieved from the Skyspark API call\n", + "- `data_graph_filename`: this is the filename/filepath to save the cleaned/processed instance data for the data graph to be used for validation\n", + "- `shapes_graph_filename`: this it the filename/filepath of the SHACL shapes data for the shape graph \n", + "***Remaining Items***
\n", + "These items should be okay as is, but can be changed if need be. If you are printing out results, *make sure that the output directory exists in your local file structure*.\n", + "- `output_directory`: this is the directory where output files will be printed to below\n", + "- `tasty_main_directory`: this is the absolute path of the main tasty directory. It should just be the parent directory of the current working directory." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "informative-chassis", + "metadata": {}, + "outputs": [], + "source": [ + "# ----------------------------------------\n", + "# User Defined Variables\n", + "# ----------------------------------------\n", + "\n", + "equip_tag = 'fcu'\n", + "# equip_tag = 'ahu'\n", + "building = 'OTF'\n", + "\n", + "SHAPE = 'NREL-FCU-CS-HW-CHW-Shape'\n", + "# SHAPE = 'NREL-AHU-VAV-MZ-HW-CHW-Evap-Shape'\n", + "input_namespace_uri = 'urn:/_#'\n", + "\n", + "raw_data_graph_filename = 'examples/output/sample_skyspark_vav_raw.ttl'\n", + "data_graph_filename = 'examples/output/sample_skyspark_vav_clean.ttl'\n", + "shapes_graph_filename = 'tasty/generated_shapes/haystack_all.ttl'\n", + "validation_results_output_filename = 'examples/output/OTF_FCU_results.txt'\n", + "\n", + "output_directory = os.path.join(os.path.abspath(''), 'example_data/output')\n", + "tasty_main_directory = os.path.join(os.path.abspath(''), '../')\n", + "# print(tasty_main_directory)\n", + "\n", + "# ----------------------------------------\n", + "# Variables and Constants\n", + "# ----------------------------------------\n", + "skyspark_api_url = os.environ.get('API_ENDPOINT')\n", + "\n", + "NAMESPACE = Namespace(input_namespace_uri)\n", + "shape_name = tc.PH_SHAPES_NREL[SHAPE]\n", + "output_file = os.path.join(tasty_main_directory, validation_results_output_filename)" + ] + }, + { + "cell_type": "markdown", + "id": "married-interpretation", + "metadata": {}, + "source": [ + "## API Request From Skyspark \n", + "NOTE - Must be connected to NREL network to access the api endpoint" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ordinary-gazette", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "client = cl.SkysparkClient(skyspark_api_url)" + ] + }, + { + "cell_type": "markdown", + "id": "artificial-allocation", + "metadata": {}, + "source": [ + "make query for list of equipment with equip_tag (defined above)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "living-mirror", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "from IPython.display import JSON\n", + "\n", + "axon_query_string = client.generate_axon_query_for_equip_type(equip_tag, building)\n", + "print(axon_query_string)\n", + "\n", + "response = client.make_get_request(axon_query_string, 'json')\n", + "\n", + "print(response.status_code, end = \" - \")\n", + "if response.status_code == 200:\n", + " print(\"Sucess\")\n", + "elif response.status_code == 404:\n", + " print(\"Not Found\")\n", + "\n", + "raw_skyspark_data = json.loads(response.text)\n", + "JSON(raw_skyspark_data['rows'], expanded=True)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "valid-gnome", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "equip_list = []\n", + "\n", + "for item in raw_skyspark_data['rows']:\n", + " new_equip = item['navName']\n", + " equip_list.append(new_equip)\n", + "for equip in equip_list:\n", + " print(equip)" + ] + }, + { + "cell_type": "markdown", + "id": "invalid-award", + "metadata": {}, + "source": [ + "### Define the Validate Equip Function" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "coated-astronomy", + "metadata": {}, + "outputs": [], + "source": [ + "def validate_equip(equip_name, building):\n", + " helpers.append_data_to_file(f\"Equipment Name:\\t{equip_name} \\n\", output_file) \n", + " # ----------------------------------------\n", + " # Get Axon Query\n", + " # ----------------------------------------\n", + " axon_query_string = client.generate_axon_query_for_equip(equip_name, building)\n", + " print(\"Generated axon query: \" + axon_query_string)\n", + "\n", + " # ----------------------------------------\n", + " # Perform Request\n", + " # ----------------------------------------\n", + " response = client.make_get_request(axon_query_string, 'turtle')\n", + "\n", + " print(response.status_code, end = \" - \")\n", + " if response.status_code == 200:\n", + " print(\"Sucess\")\n", + " elif response.status_code == 404:\n", + " print(\"Not Found\")\n", + "\n", + " raw_skyspark_data = response.text\n", + " # print(raw_skyspark_data)\n", + "\n", + " # ----------------------------------------\n", + " # save Response to File\n", + " # ----------------------------------------\n", + " f = os.path.join(tasty_main_directory, raw_data_graph_filename)\n", + " helpers.save_data_to_file(raw_skyspark_data, f)\n", + " print(f\"raw instance data saved to '{raw_data_graph_filename}' \")\n", + "\n", + " # ----------------------------------------\n", + " # Get Equip ID\n", + " # ----------------------------------------\n", + " equip_id = client.get_equip_id(equip_name, building)\n", + " print(\"Equipment id: \" + equip_id)\n", + " helpers.append_data_to_file(f\"Equipment ID:\\t{equip_id}\\n\", output_file) \n", + " target_node = NAMESPACE[equip_id]\n", + " # ----------------------------------------\n", + " # Create instance of SkysparkGraphProcessor\n", + " # ----------------------------------------\n", + " schema = tc.HAYSTACK\n", + " version = tc.V3_9_10\n", + " sgp = pg.SkysparkGraphProcessor(input_namespace_uri,schema, version)\n", + "\n", + " # ----------------------------------------\n", + " # Pre Process raw skyspark .ttl file \n", + " # ----------------------------------------\n", + " f1 = os.path.join(tasty_main_directory, raw_data_graph_filename)\n", + " f2 = os.path.join(tasty_main_directory, data_graph_filename)\n", + " sgp.clean_raw_skyspark_turtle(f1,f2)\n", + " print(f\"cleaned instance data saved to '{data_graph_filename}' \")\n", + "\n", + " # ----------------------------------------\n", + " # Generate Graphs\n", + " # ----------------------------------------\n", + "\n", + " # Data Graph\n", + " dg_file = os.path.join(tasty_main_directory, data_graph_filename)\n", + " data_graph = sgp.get_data_graph(dg_file)\n", + " print(\"...loaded data graph\")\n", + "\n", + " # Shapes Graph\n", + " sg_file = os.path.join(tasty_main_directory, shapes_graph_filename)\n", + " shapes_graph = sgp.get_shapes_graph(sg_file, target_node, shape_name)\n", + " print(\"...loaded shapes graph\")\n", + " helpers.append_data_to_file(f\"SHACL Shape:\\t{shape_name}\\n\", output_file) \n", + "\n", + " # Ontology Graph\n", + " ont_graph = sgp.get_ontology_graph()\n", + " print(\"...loaded ontology graph\")\n", + "\n", + " # ----------------------------------------\n", + " # Run pySCHACL Validation\n", + " # ---------------------------------------- \n", + " result = validate(data_graph, shacl_graph=shapes_graph, ont_graph=ont_graph)\n", + " conforms, results_graph, results = result\n", + " \n", + " print(f\"Conforms: {conforms}\")\n", + " helpers.append_data_to_file(f\"Conforms:\\t\\t{conforms}\\n\", output_file) \n", + "\n", + " # ----------------------------------------\n", + " # Determine Missing Points\n", + " # ----------------------------------------\n", + " missing_points = sgp.determine_missing_points(results_graph)\n", + " \n", + " report_string = \"\"\n", + " if len(missing_points['required']) <= 0:\n", + " print(\"No Required Points Missing\")\n", + " report_string += \"No Required Points Missing\\n\"\n", + " else:\n", + " print(f\"{len(missing_points['required'])} Missing Required Points:\")\n", + " report_string += f\"{len(missing_points['required'])} Missing Required Points:\\n\"\n", + " for point in missing_points['required']:\n", + " print(f\"\\t{point}\")\n", + " point_trunc = point[point.rfind('#') + 1:]\n", + " report_string += f\"\\t{point_trunc}\\n\"\n", + "\n", + " if len(missing_points['optional']) <= 0:\n", + " print(\"No Optional Points Missing\")\n", + " report_string += \"No Optional Points Missing\\n\"\n", + " else:\n", + " print(f\"{len(missing_points['optional'])} Missing Optional Points:\")\n", + " report_string += f\"{len(missing_points['optional'])} Missing Optional Points:\\n\"\n", + " for point in missing_points['optional']:\n", + " print(f\"\\t{point}\")\n", + " point_trunc = point[point.rfind('#') + 1:]\n", + " report_string += f\"\\t{point_trunc}\\n\"\n", + " helpers.append_data_to_file(report_string, output_file) " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "elder-farmer", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "helpers.save_data_to_file(\"\", output_file) # clear the output file\n", + "for equip in equip_list:\n", + " validate_equip(equip, building)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.5" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/examples/Skyspark Validation.ipynb b/examples/Skyspark Validation.ipynb index 6325492..f74b9e1 100644 --- a/examples/Skyspark Validation.ipynb +++ b/examples/Skyspark Validation.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "identified-artist", + "id": "solved-replication", "metadata": {}, "source": [ "# Sample Skyspark VAV Validation" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "falling-mayor", + "id": "standard-triumph", "metadata": {}, "source": [ "# 1) Setup" @@ -18,7 +18,7 @@ }, { "cell_type": "markdown", - "id": "signal-stadium", + "id": "continuous-volume", "metadata": {}, "source": [ "## Imports" @@ -26,8 +26,8 @@ }, { "cell_type": "code", - "execution_count": 2, - "id": "prescription-deviation", + "execution_count": null, + "id": "minus-train", "metadata": { "tags": [] }, @@ -42,6 +42,8 @@ "\n", "from rdflib import Namespace, SH, RDF, BNode, Graph\n", "from pyshacl import validate\n", + "from dotenv import load_dotenv\n", + "load_dotenv()\n", "\n", "from tasty import constants as tc\n", "from tasty import graphs as tg\n", @@ -52,7 +54,7 @@ }, { "cell_type": "markdown", - "id": "revised-choice", + "id": "champion-poverty", "metadata": {}, "source": [ "## Inputs\n", @@ -73,20 +75,24 @@ }, { "cell_type": "code", - "execution_count": 3, - "id": "sonic-manufacturer", + "execution_count": null, + "id": "sunset-flight", "metadata": {}, "outputs": [], "source": [ "# ----------------------------------------\n", "# User Defined Variables\n", "# ----------------------------------------\n", - "SHAPE = 'NREL-VAV-SD-Cooling-Only-Shape'\n", - "SAMPLE = '214466de-7abb28a7'\n", + "\n", + "equip_name = 'AHU1'\n", + "building = 'TTF'\n", + "\n", + "SHAPE = 'NREL-AHU-VAV-MZ-HW-Evap-Shape'\n", + "SAMPLE = '' # will be populated below\n", "input_namespace_uri = 'urn:/_#'\n", "\n", - "raw_data_graph_filename = 'tests/files/data/sample_skyspark_vav_raw.ttl'\n", - "data_graph_filename = 'tests/files/data/sample_skyspark_vav_clean.ttl'\n", + "raw_data_graph_filename = 'examples/output/sample_skyspark_vav_raw.ttl'\n", + "data_graph_filename = 'examples/output/sample_skyspark_vav_clean.ttl'\n", "shapes_graph_filename = 'tasty/generated_shapes/haystack_all.ttl'\n", "\n", "output_directory = os.path.join(os.path.abspath(''), 'example_data/output')\n", @@ -96,6 +102,7 @@ "# ----------------------------------------\n", "# Variables and Constants\n", "# ----------------------------------------\n", + "skyspark_api_url = os.environ.get('API_ENDPOINT')\n", "\n", "NAMESPACE = Namespace(input_namespace_uri)\n", "shape_name = tc.PH_SHAPES_NREL[SHAPE]\n", @@ -104,7 +111,7 @@ }, { "cell_type": "markdown", - "id": "difficult-religious", + "id": "nutritional-special", "metadata": {}, "source": [ "## API Request From Skyspark \n", @@ -113,27 +120,17 @@ }, { "cell_type": "code", - "execution_count": 4, - "id": "innovative-ideal", + "execution_count": null, + "id": "classified-contamination", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "(point and equipRef->navName==\"UFVAV-3\") or (equip and navName==\"UFVAV-3\")\n", - "200 - Sucess\n" - ] - } - ], + "outputs": [], "source": [ "# axon_query_string = '(point and equipRef->navName==\"UFVAV-3\") or (equip and navName==\"UFVAV-3\")'\n", - "api_url_endpoint = 'https://internal-apis.nrel.gov/intelligentcampus/stm_campus/read'\n", "\n", - "client = cl.SkysparkClient(api_url_endpoint)\n", - "axon_query_string = client.generate_axon_query_for_equip(\"UFVAV-3\")\n", + "client = cl.SkysparkClient(skyspark_api_url)\n", + "axon_query_string = client.generate_axon_query_for_equip(equip_name, building)\n", "print(axon_query_string)\n", "\n", "response = client.make_get_request(axon_query_string, 'turtle')\n", @@ -150,18 +147,10 @@ }, { "cell_type": "code", - "execution_count": 5, - "id": "statewide-suicide", + "execution_count": null, + "id": "polar-sister", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "raw instance data saved to 'tests/files/data/sample_skyspark_vav_raw.ttl' \n" - ] - } - ], + "outputs": [], "source": [ "# Save response to file\n", "f = os.path.join(tasty_main_directory, raw_data_graph_filename)\n", @@ -173,7 +162,26 @@ }, { "cell_type": "markdown", - "id": "deadly-raleigh", + "id": "false-damage", + "metadata": {}, + "source": [ + "#### Get the ID of the Equipment" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "listed-performer", + "metadata": {}, + "outputs": [], + "source": [ + "SAMPLE = client.get_equip_id(equip_name, building)\n", + "print(SAMPLE)" + ] + }, + { + "cell_type": "markdown", + "id": "friendly-soldier", "metadata": {}, "source": [ "# 2) Generate Graphs" @@ -181,7 +189,7 @@ }, { "cell_type": "markdown", - "id": "black-violin", + "id": "better-tumor", "metadata": {}, "source": [ "### Pre-Process Raw Input File" @@ -189,20 +197,12 @@ }, { "cell_type": "code", - "execution_count": 6, - "id": "supported-taylor", + "execution_count": null, + "id": "noted-holder", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "cleaned instance data saved to 'tests/files/data/sample_skyspark_vav_clean.ttl' \n" - ] - } - ], + "outputs": [], "source": [ "# ----------------------------------------\n", "# Create instance of SkysparkGraphProcessor\n", @@ -226,7 +226,7 @@ }, { "cell_type": "markdown", - "id": "thorough-danger", + "id": "vocational-correlation", "metadata": {}, "source": [ "### Create Data, Shapes, and Ontology Graphs" @@ -234,60 +234,12 @@ }, { "cell_type": "code", - "execution_count": 7, - "id": "described-diesel", + "execution_count": null, + "id": "ideal-curtis", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "...generated tag list\n", - "...adding namespaces\n", - "...processing node: \turn:/_#211c90ab-701fa511\n", - "...processing node: \turn:/_#211c90b6-52117d4d\n", - "...processing node: \turn:/_#211c90b6-0da18cd7\n", - "...processing node: \turn:/_#22f5d821-8e310c3e\n", - "...processing node: \turn:/_#211c90b7-f2430aa1\n", - "Point: \turn:/_#211c90ab-701fa511\n", - "Tags: \tzone\n", - "\ttemp\n", - "\tsensor\n", - "\tair\n", - "\t...First Class Entity Type: air-temp-sensor\n", - "\n", - "Point: \turn:/_#211c90b6-52117d4d\n", - "Tags: \tsp\n", - "\tair\n", - "\ttemp\n", - "\tzone\n", - "\t...First Class Entity Type: air-temp-sp\n", - "\n", - "Point: \turn:/_#211c90b6-0da18cd7\n", - "Tags: \tdischarge\n", - "\tair\n", - "\tcmd\n", - "\tdamper\n", - "\t...First Class Entity Type: point\n", - "\n", - "Point: \turn:/_#22f5d821-8e310c3e\n", - "Tags: \toccupied\n", - "\tsensor\n", - "\t...First Class Entity Type: point\n", - "\n", - "Point: \turn:/_#211c90b7-f2430aa1\n", - "Tags: \tsensor\n", - "\tunocc\n", - "\t...First Class Entity Type: point\n", - "\n", - "...loaded data graph\n", - "...loaded shapes graph\n", - "...loaded ontology graph\n" - ] - } - ], + "outputs": [], "source": [ "# ----------------------------------------\n", "# Generate Graphs\n", @@ -310,177 +262,19 @@ }, { "cell_type": "code", - "execution_count": 7, - "id": "angry-vietnamese", + "execution_count": null, + "id": "plain-northeast", "metadata": { - "collapsed": true, - "jupyter": { - "outputs_hidden": true - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "@prefix core: .\n", - "@prefix owl: .\n", - "@prefix p_: .\n", - "@prefix ph: .\n", - "@prefix phIoT: .\n", - "@prefix phScience: .\n", - "@prefix rdfs: .\n", - "@prefix xsd: .\n", - "\n", - "ph:hasTag a owl:ObjectProperty ;\n", - " rdfs:range ph:marker .\n", - "\n", - "p_:211c90ab-701fa511 a phIoT:air-temp-sensor,\n", - " phIoT:his-point ;\n", - " rdfs:label \"S&TF UFVAV-3 Zone Temp\" ;\n", - " ph:hasTag phIoT:zone ;\n", - " ph:kind \"Number\" ;\n", - " ph:tz \"Denver\" ;\n", - " ph:unit \"°F\" ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Zone Temp\" ;\n", - " p_:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " p_:bacnetCur \"AI5\" ;\n", - " p_:bacnetDis \"RM TEMP\" ;\n", - " p_:bacnetHis \"TL3\" ;\n", - " p_:bacnetObjectType \"ANALOG_INPUT\" ;\n", - " p_:connRef p_:211c8a83-ef5c639d ;\n", - " p_:connTuningRef p_:1f4a131c-3f1fcc51 ;\n", - " p_:hisAppendNA 30 ;\n", - " p_:hisSize 32953 ;\n", - " p_:sqlConnRef p_:24a0194c-adac2f1d ;\n", - " p_:sqlTable \"CopperCube_SERF_STF_Area_37034_TL3\" ;\n", - " p_:sqlTz \"America/Phoenix\" .\n", - "\n", - "p_:211c90b6-0da18cd7 a phIoT:cur-point,\n", - " phIoT:point ;\n", - " rdfs:label \"S&TF UFVAV-3 Damper\" ;\n", - " ph:hasTag phIoT:cmd,\n", - " phIoT:damper,\n", - " phIoT:discharge,\n", - " phScience:air ;\n", - " ph:kind \"Number\" ;\n", - " ph:tz \"Denver\" ;\n", - " ph:unit \"%\" ;\n", - " phIoT:curStatus \"ok\" ;\n", - " phIoT:curVal 0 ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Damper\" ;\n", - " p_:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " p_:bacnetCur \"AV7\" ;\n", - " p_:bacnetDis \"DMP POS\" ;\n", - " p_:bacnetObjectType \"ANALOG_VALUE\" ;\n", - " p_:connRef p_:211c8a83-ef5c639d ;\n", - " p_:connTuningRef p_:1f40f395-5a02b62e ;\n", - " p_:hisAppendNA 30 ;\n", - " p_:hisCollectInterval 5 ;\n", - " p_:hisCollectWriteFreq 15 ;\n", - " p_:hisSize 416743 .\n", - "\n", - "p_:211c90b6-52117d4d a phIoT:air-temp-sp,\n", - " phIoT:cur-point ;\n", - " rdfs:label \"S&TF UFVAV-3 Zone Temp Setpt\" ;\n", - " ph:hasTag phIoT:zone ;\n", - " ph:kind \"Number\" ;\n", - " ph:tz \"Denver\" ;\n", - " ph:unit \"°F\" ;\n", - " phIoT:curStatus \"ok\" ;\n", - " phIoT:curVal 74 ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Zone Temp Setpt\" ;\n", - " p_:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " p_:bacnetCur \"AV11\" ;\n", - " p_:bacnetDis \"RM TEMP STPT\" ;\n", - " p_:bacnetObjectType \"ANALOG_VALUE\" ;\n", - " p_:connRef p_:211c8a83-ef5c639d ;\n", - " p_:connTuningRef p_:1f40f395-5a02b62e ;\n", - " p_:hisAppendNA 30 ;\n", - " p_:hisCollectInterval 5 ;\n", - " p_:hisCollectWriteFreq 15 ;\n", - " p_:hisSize 416760 .\n", - "\n", - "p_:211c90b7-f2430aa1 a phIoT:cur-point,\n", - " phIoT:point ;\n", - " rdfs:label \"S&TF UFVAV-3 Unocc Override\" ;\n", - " ph:enum \"OFF,ON\" ;\n", - " ph:hasTag phIoT:sensor,\n", - " phIoT:unocc ;\n", - " ph:kind \"Bool\" ;\n", - " ph:tz \"Denver\" ;\n", - " phIoT:curStatus \"ok\" ;\n", - " phIoT:curVal false ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:hisMode \"cov\" ;\n", - " phIoT:hisStatus \"ok\" ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Unocc Override\" ;\n", - " p_:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " p_:bacnetCur \"BI6\" ;\n", - " p_:bacnetDis \"UNOCC OVRD\" ;\n", - " p_:bacnetObjectType \"BINARY_INPUT\" ;\n", - " p_:connRef p_:211c8a83-ef5c639d ;\n", - " p_:connTuningRef p_:1f40f395-5a02b62e ;\n", - " p_:hisCollectWriteFreq 15 ;\n", - " p_:hisSize 413 .\n", - "\n", - "p_:22f5d821-8e310c3e a phIoT:his-point,\n", - " phIoT:point ;\n", - " rdfs:label \"S&TF UFVAV-3 Schedule\" ;\n", - " ph:hasTag phIoT:occupied,\n", - " phIoT:sensor ;\n", - " ph:kind \"Bool\" ;\n", - " ph:tz \"Denver\" ;\n", - " phIoT:equipRef p_:214466de-7abb28a7 ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " core:disMacro \"$equipRef $navName\" ;\n", - " core:navName \"Schedule\" ;\n", - " p_:hisFunc \"calcMirrorHisPoint(_,_,_,_,@p:stm_campus:r:22f4de28-7e5ea4aa)\" .\n", - "\n", - "p_:214466de-7abb28a7 a phIoT:vav ;\n", - " rdfs:label \"S&TF UFVAV-3\" ;\n", - " ph:hasTag phIoT:equip,\n", - " phIoT:vav ;\n", - " phIoT:siteRef p_:211601cb-e3e5e9b3 ;\n", - " phIoT:spaceRef p_:2184f1be-29c172a8 ;\n", - " core:disMacro \"$siteRef $navName\" ;\n", - " core:navName \"UFVAV-3\" ;\n", - " p_:ahuRef p_:21164218-5fab5c91 ;\n", - " p_:bacnetConnRef p_:211c8a83-ef5c639d ;\n", - " p_:bacnetDeviceId 37034 ;\n", - " p_:connRef p_:211c8a83-ef5c639d .\n", - "\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "helpers.print_graph(data_graph)" ] }, { "cell_type": "markdown", - "id": "moral-tobacco", + "id": "responsible-finland", "metadata": {}, "source": [ "# 3) Validation" @@ -488,7 +282,7 @@ }, { "cell_type": "markdown", - "id": "satisfactory-office", + "id": "dental-casting", "metadata": {}, "source": [ "## PySHACL Validation" @@ -496,18 +290,10 @@ }, { "cell_type": "code", - "execution_count": 8, - "id": "foreign-pottery", + "execution_count": null, + "id": "verified-grounds", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Conforms: False\n" - ] - } - ], + "outputs": [], "source": [ "# ----------------------------------------\n", "# Run pySCHACL Validation\n", @@ -520,363 +306,19 @@ }, { "cell_type": "code", - "execution_count": 9, - "id": "corrected-panama", + "execution_count": null, + "id": "loving-variance", "metadata": { - "collapsed": true, - "jupyter": { - "outputs_hidden": true - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "@prefix nrel: .\n", - "@prefix phIoT: .\n", - "@prefix phShapes: .\n", - "@prefix sh: .\n", - "@prefix xsd: .\n", - "\n", - "[] a sh:ValidationReport ;\n", - " sh:conforms false ;\n", - " sh:result [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureHeatingEffectiveSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not have class phIoT:coolingOnly-vav\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:ClassConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:MinimumHeatingDischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:MaximumHeatingDischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:DischargeAirTemperatureShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureCoolingOccupiedSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:OccupancyOverrideCommandShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureCoolingStandbySetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneRelativeHumidityShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureCoolingEffectiveSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:BinaryOccupancySensorShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:CoolingRequestsShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:DischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureHeatingUnoccupiedSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:DischargeAirFlowShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureHeatingOccupiedSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneEquipmentOperatingStateShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:MinimumCoolingDischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:OccupancyModeBinaryShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape phShapes:zone-air-co2-sp-shape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:MaximumCoolingDischargeAirFlowSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureCoolingUnoccupiedSetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:HeatingRequestsShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape phShapes:zone-air-co2-sensor-shape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:DischargeAirDamperFeedbackShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultMessage \"Value does not conform to every Shape in ('nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape', 'nrel:ZoneCoolingSetpointsShape')\" ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:NodeConstraintComponent ;\n", - " sh:sourceShape nrel:NREL-VAV-SD-Cooling-Only-Shape ;\n", - " sh:value ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:OccupancyModeStandbyShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ],\n", - " [ a sh:ValidationResult ;\n", - " sh:focusNode ;\n", - " sh:resultPath [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:resultSeverity sh:Violation ;\n", - " sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ;\n", - " sh:sourceShape [ sh:path [ sh:inversePath phIoT:equipRef ] ;\n", - " sh:qualifiedMaxCount 1 ;\n", - " sh:qualifiedMinCount 1 ;\n", - " sh:qualifiedValueShape nrel:ZoneTemperatureHeatingStandbySetpointShape ;\n", - " sh:qualifiedValueShapesDisjoint true ] ] .\n", - "\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "helpers.print_graph(results_graph)" ] }, { "cell_type": "markdown", - "id": "commercial-brand", + "id": "adverse-frontier", "metadata": {}, "source": [ "## Determine Missing Points" @@ -884,54 +326,27 @@ }, { "cell_type": "code", - "execution_count": 9, - "id": "precise-service", + "execution_count": null, + "id": "external-sociology", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "26 Missing Points:\n", - "\thttps://project-haystack.org/datashapes/nrel#CoolingRequestsShape\n", - "\thttps://project-haystack.org/datashapes/nrel#HeatingRequestsShape\n", - "\thttps://project-haystack.org/datashapes/nrel#DischargeAirTemperatureShape\n", - "\thttps://project-haystack.org/datashapes/core#zone-air-co2-sensor-shape\n", - "\thttps://project-haystack.org/datashapes/core#zone-air-co2-sp-shape\n", - "\thttps://project-haystack.org/datashapes/nrel#OccupancyModeBinaryShape\n", - "\thttps://project-haystack.org/datashapes/nrel#OccupancyModeStandbyShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneEquipmentOperatingStateShape\n", - "\thttps://project-haystack.org/datashapes/nrel#OccupancyOverrideCommandShape\n", - "\thttps://project-haystack.org/datashapes/nrel#BinaryOccupancySensorShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureCoolingStandbySetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureCoolingUnoccupiedSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureCoolingEffectiveSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureCoolingOccupiedSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureHeatingOccupiedSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureHeatingEffectiveSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureHeatingUnoccupiedSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneTemperatureHeatingStandbySetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#DischargeAirDamperFeedbackShape\n", - "\thttps://project-haystack.org/datashapes/nrel#DischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#MinimumHeatingDischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#DischargeAirFlowShape\n", - "\thttps://project-haystack.org/datashapes/nrel#MinimumCoolingDischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#MaximumCoolingDischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#MaximumHeatingDischargeAirFlowSetpointShape\n", - "\thttps://project-haystack.org/datashapes/nrel#ZoneRelativeHumidityShape\n" - ] - } - ], + "outputs": [], "source": [ "missing_points = sgp.determine_missing_points(results_graph)\n", "\n", - "if len(missing_points) <= 0:\n", - " print(\"No Points Missing\")\n", + "if len(missing_points['required']) <= 0:\n", + " print(\"No Required Points Missing\")\n", + "else:\n", + " print(f\"{len(missing_points['required'])} Missing Required Points:\")\n", + " for point in missing_points['required']:\n", + " print(f\"\\t{point}\")\n", + " \n", + "if len(missing_points['optional']) <= 0:\n", + " print(\"No Optional Points Missing\")\n", "else:\n", - " print(f\"{len(missing_points)} Missing Points:\")\n", - " for point in missing_points:\n", + " print(f\"{len(missing_points['optional'])} Missing Optional Points:\")\n", + " for point in missing_points['optional']:\n", " print(f\"\\t{point}\")\n", " " ] diff --git a/poetry.lock b/poetry.lock index 08f73b3..0cee4ed 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,116 +1,111 @@ [[package]] -category = "dev" -description = "High level compatibility layer for multiple asynchronous event loop implementations" name = "anyio" +version = "2.2.0" +description = "High level compatibility layer for multiple asynchronous event loop implementations" +category = "dev" optional = false python-versions = ">=3.6.2" -version = "2.2.0" [package.dependencies] idna = ">=2.8" sniffio = ">=1.1" - -[package.dependencies.typing-extensions] -python = "<3.8" -version = "*" +typing-extensions = {version = "*", markers = "python_version < \"3.8\""} [package.extras] curio = ["curio (>=1.4)"] doc = ["sphinx-rtd-theme", "sphinx-autodoc-typehints (>=1.2.0)"] -test = ["coverage (>=4.5)", "hypothesis (>=4.0)", "pytest (>=6.0)", "trustme", "uvloop (<0.15)", "uvloop (>=0.15)"] +test = ["coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "pytest (>=6.0)", "trustme", "uvloop (<0.15)", "uvloop (>=0.15)"] trio = ["trio (>=0.16)"] [[package]] -category = "dev" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." name = "appdirs" +version = "1.4.4" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "dev" optional = false python-versions = "*" -version = "1.4.4" [[package]] -category = "dev" -description = "Disable App Nap on macOS >= 10.9" -marker = "sys_platform == \"darwin\" or platform_system == \"Darwin\" or python_version >= \"3.3\" and sys_platform == \"darwin\"" name = "appnope" +version = "0.1.2" +description = "Disable App Nap on macOS >= 10.9" +category = "dev" optional = false python-versions = "*" -version = "0.1.2" [[package]] -category = "dev" -description = "The secure Argon2 password hashing algorithm." name = "argon2-cffi" +version = "20.1.0" +description = "The secure Argon2 password hashing algorithm." +category = "dev" optional = false python-versions = "*" -version = "20.1.0" [package.dependencies] cffi = ">=1.0.0" six = "*" [package.extras] -dev = ["coverage (>=5.0.2)", "hypothesis", "pytest", "sphinx", "wheel", "pre-commit"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pytest", "sphinx", "wheel", "pre-commit"] docs = ["sphinx"] -tests = ["coverage (>=5.0.2)", "hypothesis", "pytest"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pytest"] [[package]] -category = "dev" -description = "Async generators and context managers for Python 3.5+" name = "async-generator" +version = "1.10" +description = "Async generators and context managers for Python 3.5+" +category = "dev" optional = false python-versions = ">=3.5" -version = "1.10" [[package]] -category = "dev" -description = "Atomic file writes." -marker = "sys_platform == \"win32\"" name = "atomicwrites" +version = "1.4.0" +description = "Atomic file writes." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.4.0" [[package]] -category = "main" -description = "Classes Without Boilerplate" name = "attrs" +version = "20.3.0" +description = "Classes Without Boilerplate" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "20.3.0" [package.extras] -dev = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "furo", "sphinx", "pre-commit"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "furo", "sphinx", "pre-commit"] docs = ["furo", "sphinx", "zope.interface"] -tests = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] -tests_no_zope = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six"] [[package]] -category = "dev" -description = "Internationalization utilities" name = "babel" +version = "2.9.0" +description = "Internationalization utilities" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.9.0" [package.dependencies] pytz = ">=2015.7" [[package]] -category = "dev" -description = "Specifications for callback functions passed in to an API" name = "backcall" +version = "0.2.0" +description = "Specifications for callback functions passed in to an API" +category = "dev" optional = false python-versions = "*" -version = "0.2.0" [[package]] -category = "dev" -description = "An easy safelist-based HTML-sanitizing tool." name = "bleach" +version = "3.3.0" +description = "An easy safelist-based HTML-sanitizing tool." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "3.3.0" [package.dependencies] packaging = "*" @@ -118,124 +113,122 @@ six = ">=1.9.0" webencodings = "*" [[package]] -category = "main" -description = "Python package for providing Mozilla's CA Bundle." name = "certifi" +version = "2020.12.5" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" optional = false python-versions = "*" -version = "2020.12.5" [[package]] -category = "dev" -description = "Foreign Function Interface for Python calling C code." name = "cffi" +version = "1.14.5" +description = "Foreign Function Interface for Python calling C code." +category = "dev" optional = false python-versions = "*" -version = "1.14.5" [package.dependencies] pycparser = "*" [[package]] -category = "dev" -description = "Validate configuration and produce human readable error messages." name = "cfgv" +version = "3.2.0" +description = "Validate configuration and produce human readable error messages." +category = "dev" optional = false python-versions = ">=3.6.1" -version = "3.2.0" [[package]] -category = "main" -description = "Universal encoding detector for Python 2 and 3" name = "chardet" +version = "4.0.0" +description = "Universal encoding detector for Python 2 and 3" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "4.0.0" [[package]] -category = "dev" -description = "Cross-platform colored terminal text." -marker = "python_version >= \"3.3\" and sys_platform == \"win32\" or sys_platform == \"win32\"" name = "colorama" +version = "0.4.4" +description = "Cross-platform colored terminal text." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "0.4.4" [[package]] -category = "dev" -description = "Decorators for Humans" name = "decorator" +version = "4.4.2" +description = "Decorators for Humans" +category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*" -version = "4.4.2" [[package]] -category = "dev" -description = "XML bomb protection for Python stdlib modules" name = "defusedxml" +version = "0.7.0" +description = "XML bomb protection for Python stdlib modules" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "0.7.0" [[package]] -category = "dev" -description = "Distribution utilities" name = "distlib" +version = "0.3.1" +description = "Distribution utilities" +category = "dev" optional = false python-versions = "*" -version = "0.3.1" [[package]] -category = "dev" -description = "Discover and load entry points from installed packages." name = "entrypoints" +version = "0.3" +description = "Discover and load entry points from installed packages." +category = "dev" optional = false python-versions = ">=2.7" -version = "0.3" [[package]] -category = "dev" -description = "A platform independent file lock." name = "filelock" +version = "3.0.12" +description = "A platform independent file lock." +category = "dev" optional = false python-versions = "*" -version = "3.0.12" [[package]] -category = "main" -description = "An immutable dictionary" name = "frozendict" +version = "1.2" +description = "An immutable dictionary" +category = "main" optional = false python-versions = "*" -version = "1.2" [[package]] -category = "dev" -description = "File identification library for Python" name = "identify" +version = "2.1.0" +description = "File identification library for Python" +category = "dev" optional = false python-versions = ">=3.6.1" -version = "2.1.0" [package.extras] license = ["editdistance"] [[package]] -category = "main" -description = "Internationalized Domain Names in Applications (IDNA)" name = "idna" +version = "2.10" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.10" [[package]] -category = "main" -description = "Read metadata from Python packages" -marker = "python_version < \"3.8\"" name = "importlib-metadata" +version = "2.1.1" +description = "Read metadata from Python packages" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -version = "2.1.1" [package.dependencies] zipp = ">=0.5" @@ -245,15 +238,15 @@ docs = ["sphinx", "rst.linker"] testing = ["packaging", "pep517", "unittest2", "importlib-resources (>=1.3)"] [[package]] -category = "dev" -description = "IPython Kernel for Jupyter" name = "ipykernel" +version = "5.5.0" +description = "IPython Kernel for Jupyter" +category = "dev" optional = false python-versions = ">=3.5" -version = "5.5.0" [package.dependencies] -appnope = "*" +appnope = {version = "*", markers = "platform_system == \"Darwin\""} ipython = ">=5.0.0" jupyter-client = "*" tornado = ">=4.2" @@ -263,24 +256,23 @@ traitlets = ">=4.1.0" test = ["pytest (!=5.3.4)", "pytest-cov", "flaky", "nose", "jedi (<=0.17.2)"] [[package]] -category = "dev" -description = "IPython: Productive Interactive Computing" name = "ipython" +version = "7.21.0" +description = "IPython: Productive Interactive Computing" +category = "dev" optional = false python-versions = ">=3.7" -version = "7.21.0" [package.dependencies] -appnope = "*" +appnope = {version = "*", markers = "sys_platform == \"darwin\""} backcall = "*" -colorama = "*" +colorama = {version = "*", markers = "sys_platform == \"win32\""} decorator = "*" jedi = ">=0.16" -pexpect = ">4.3" +pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} pickleshare = "*" prompt-toolkit = ">=2.0.0,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.1.0" pygments = "*" -setuptools = ">=18.5" traitlets = ">=4.2" [package.extras] @@ -295,71 +287,65 @@ qtconsole = ["qtconsole"] test = ["nose (>=0.10.1)", "requests", "testpath", "pygments", "nbformat", "ipykernel", "numpy (>=1.14)"] [[package]] -category = "dev" -description = "Vestigial utilities from IPython" name = "ipython-genutils" +version = "0.2.0" +description = "Vestigial utilities from IPython" +category = "dev" optional = false python-versions = "*" -version = "0.2.0" [[package]] -category = "dev" -description = "IPython HTML widgets for Jupyter" name = "ipywidgets" +version = "7.6.3" +description = "IPython HTML widgets for Jupyter" +category = "dev" optional = false python-versions = "*" -version = "7.6.3" [package.dependencies] ipykernel = ">=4.5.1" +ipython = {version = ">=4.0.0", markers = "python_version >= \"3.3\""} +jupyterlab-widgets = {version = ">=1.0.0", markers = "python_version >= \"3.6\""} nbformat = ">=4.2.0" traitlets = ">=4.3.1" widgetsnbextension = ">=3.5.0,<3.6.0" -[package.dependencies.ipython] -python = ">=3.3" -version = ">=4.0.0" - -[package.dependencies.jupyterlab-widgets] -python = ">=3.6" -version = ">=1.0.0" - [package.extras] test = ["pytest (>=3.6.0)", "pytest-cov", "mock"] [[package]] -category = "main" -description = "An ISO 8601 date/time/duration parser and formatter" name = "isodate" +version = "0.6.0" +description = "An ISO 8601 date/time/duration parser and formatter" +category = "main" optional = false python-versions = "*" -version = "0.6.0" [package.dependencies] six = "*" [[package]] -category = "dev" -description = "An autocompletion tool for Python that can be used for text editors." name = "jedi" +version = "0.18.0" +description = "An autocompletion tool for Python that can be used for text editors." +category = "dev" optional = false python-versions = ">=3.6" -version = "0.18.0" [package.dependencies] parso = ">=0.8.0,<0.9.0" [package.extras] -qa = ["flake8 (3.8.3)", "mypy (0.782)"] +qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] testing = ["Django (<3.1)", "colorama", "docopt", "pytest (<6.0.0)"] [[package]] -category = "dev" -description = "A very fast and expressive template engine." name = "jinja2" +version = "2.11.3" +description = "A very fast and expressive template engine." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "2.11.3" [package.dependencies] MarkupSafe = ">=0.23" @@ -368,45 +354,41 @@ MarkupSafe = ">=0.23" i18n = ["Babel (>=0.8)"] [[package]] -category = "dev" -description = "A Python implementation of the JSON5 data format." name = "json5" +version = "0.9.5" +description = "A Python implementation of the JSON5 data format." +category = "dev" optional = false python-versions = "*" -version = "0.9.5" [package.extras] dev = ["hypothesis"] [[package]] -category = "main" -description = "An implementation of JSON Schema validation for Python" name = "jsonschema" +version = "3.2.0" +description = "An implementation of JSON Schema validation for Python" +category = "main" optional = false python-versions = "*" -version = "3.2.0" [package.dependencies] attrs = ">=17.4.0" +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} pyrsistent = ">=0.14.0" -setuptools = "*" six = ">=1.11.0" -[package.dependencies.importlib-metadata] -python = "<3.8" -version = "*" - [package.extras] format = ["idna", "jsonpointer (>1.13)", "rfc3987", "strict-rfc3339", "webcolors"] format_nongpl = ["idna", "jsonpointer (>1.13)", "webcolors", "rfc3986-validator (>0.1.0)", "rfc3339-validator"] [[package]] -category = "dev" -description = "Jupyter metapackage. Install all the Jupyter components in one go." name = "jupyter" +version = "1.0.0" +description = "Jupyter metapackage. Install all the Jupyter components in one go." +category = "dev" optional = false python-versions = "*" -version = "1.0.0" [package.dependencies] ipykernel = "*" @@ -417,12 +399,12 @@ notebook = "*" qtconsole = "*" [[package]] -category = "dev" -description = "Jupyter protocol implementation and client libraries" name = "jupyter-client" +version = "6.1.11" +description = "Jupyter protocol implementation and client libraries" +category = "dev" optional = false python-versions = ">=3.5" -version = "6.1.11" [package.dependencies] jupyter-core = ">=4.6.0" @@ -436,12 +418,12 @@ doc = ["sphinx (>=1.3.6)", "sphinx-rtd-theme", "sphinxcontrib-github-alt"] test = ["jedi (<=0.17.2)", "ipykernel", "ipython", "mock", "pytest", "pytest-asyncio", "async-generator", "pytest-timeout"] [[package]] -category = "dev" -description = "Jupyter terminal console" name = "jupyter-console" +version = "6.2.0" +description = "Jupyter terminal console" +category = "dev" optional = false python-versions = ">=3.6" -version = "6.2.0" [package.dependencies] ipykernel = "*" @@ -454,24 +436,24 @@ pygments = "*" test = ["pexpect"] [[package]] -category = "dev" -description = "Jupyter core package. A base package on which Jupyter projects rely." name = "jupyter-core" +version = "4.7.1" +description = "Jupyter core package. A base package on which Jupyter projects rely." +category = "dev" optional = false python-versions = ">=3.6" -version = "4.7.1" [package.dependencies] -pywin32 = ">=1.0" +pywin32 = {version = ">=1.0", markers = "sys_platform == \"win32\""} traitlets = "*" [[package]] -category = "dev" -description = "Jupyter Packaging Utilities" name = "jupyter-packaging" +version = "0.7.12" +description = "Jupyter Packaging Utilities" +category = "dev" optional = false python-versions = ">=3.6" -version = "0.7.12" [package.dependencies] packaging = "*" @@ -480,15 +462,14 @@ packaging = "*" test = ["pytest"] [[package]] -category = "dev" -description = "The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications." name = "jupyter-server" +version = "1.4.1" +description = "The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications." +category = "dev" optional = false python-versions = ">=3.6" -version = "1.4.1" [package.dependencies] -Send2Trash = "*" anyio = ">=2.0.2" ipython-genutils = "*" jinja2 = "*" @@ -497,8 +478,9 @@ jupyter-core = ">=4.4.0" nbconvert = "*" nbformat = "*" prometheus-client = "*" -pywin32 = ">=1.0" +pywin32 = {version = ">=1.0", markers = "sys_platform == \"win32\""} pyzmq = ">=17" +Send2Trash = "*" terminado = ">=0.8.3" tornado = ">=6.1.0" traitlets = ">=4.2.1" @@ -507,12 +489,12 @@ traitlets = ">=4.2.1" test = ["coverage", "requests", "pytest", "pytest-cov", "pytest-tornasync", "pytest-console-scripts", "ipykernel"] [[package]] -category = "dev" -description = "The JupyterLab server extension." name = "jupyterlab" +version = "3.0.11" +description = "The JupyterLab server extension." +category = "dev" optional = false python-versions = ">=3.6" -version = "3.0.11" [package.dependencies] ipython = "*" @@ -527,26 +509,26 @@ tornado = ">=6.1.0" [package.extras] docs = ["jsx-lexer", "recommonmark", "sphinx", "sphinx-rtd-theme", "sphinx-copybutton"] -test = ["pytest (>=6.0)", "pytest-cov", "pytest-console-scripts", "pytest-check-links", "jupyterlab-server (>=2.0,<3.0)", "requests", "wheel", "virtualenv", "nose-exclude"] +test = ["pytest (>=6.0)", "pytest-cov", "pytest-console-scripts", "pytest-check-links", "jupyterlab-server[test] (>=2.0,<3.0)", "requests", "wheel", "virtualenv", "nose-exclude"] [[package]] -category = "dev" -description = "Pygments theme using JupyterLab CSS variables" name = "jupyterlab-pygments" +version = "0.1.2" +description = "Pygments theme using JupyterLab CSS variables" +category = "dev" optional = false python-versions = "*" -version = "0.1.2" [package.dependencies] pygments = ">=2.4.1,<3" [[package]] -category = "dev" -description = "JupyterLab Server" name = "jupyterlab-server" +version = "2.3.0" +description = "JupyterLab Server" +category = "dev" optional = false python-versions = ">=3.6" -version = "2.3.0" [package.dependencies] babel = "*" @@ -561,45 +543,44 @@ requests = "*" test = ["codecov", "ipykernel", "pytest (>=5.3.2)", "pytest-cov", "jupyter-server", "pytest-console-scripts", "strict-rfc3339", "wheel"] [[package]] -category = "dev" -description = "A JupyterLab extension." -marker = "python_version >= \"3.6\"" name = "jupyterlab-widgets" +version = "1.0.0" +description = "A JupyterLab extension." +category = "dev" optional = false python-versions = ">=3.6" -version = "1.0.0" [[package]] -category = "dev" -description = "Safely add untrusted strings to HTML/XML markup." name = "markupsafe" +version = "1.1.1" +description = "Safely add untrusted strings to HTML/XML markup." +category = "dev" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" -version = "1.1.1" [[package]] -category = "dev" -description = "The fastest markdown parser in pure Python" name = "mistune" +version = "0.8.4" +description = "The fastest markdown parser in pure Python" +category = "dev" optional = false python-versions = "*" -version = "0.8.4" [[package]] -category = "dev" -description = "More routines for operating on iterables, beyond itertools" name = "more-itertools" +version = "8.7.0" +description = "More routines for operating on iterables, beyond itertools" +category = "dev" optional = false python-versions = ">=3.5" -version = "8.7.0" [[package]] -category = "dev" -description = "Jupyter Notebook as a Jupyter Server Extension." name = "nbclassic" +version = "0.2.6" +description = "Jupyter Notebook as a Jupyter Server Extension." +category = "dev" optional = false python-versions = ">=3.6" -version = "0.2.6" [package.dependencies] jupyter-server = ">=1.1,<2.0" @@ -609,12 +590,12 @@ notebook = "<7" test = ["pytest", "pytest-tornasync", "pytest-console-scripts"] [[package]] -category = "dev" -description = "A client library for executing notebooks. Formerly nbconvert's ExecutePreprocessor." name = "nbclient" +version = "0.5.3" +description = "A client library for executing notebooks. Formerly nbconvert's ExecutePreprocessor." +category = "dev" optional = false python-versions = ">=3.6.1" -version = "0.5.3" [package.dependencies] async-generator = "*" @@ -629,12 +610,12 @@ sphinx = ["Sphinx (>=1.7)", "sphinx-book-theme", "mock", "moto", "myst-parser"] test = ["codecov", "coverage", "ipython", "ipykernel", "ipywidgets", "pytest (>=4.1)", "pytest-cov (>=2.6.1)", "check-manifest", "flake8", "mypy", "tox", "bumpversion", "xmltodict", "pip (>=18.1)", "wheel (>=0.31.0)", "setuptools (>=38.6.0)", "twine (>=1.11.0)", "black"] [[package]] -category = "dev" -description = "Converting Jupyter Notebooks" name = "nbconvert" +version = "6.0.7" +description = "Converting Jupyter Notebooks" +category = "dev" optional = false python-versions = ">=3.6" -version = "6.0.7" [package.dependencies] bleach = "*" @@ -652,19 +633,19 @@ testpath = "*" traitlets = ">=4.2" [package.extras] -all = ["pytest", "pytest-cov", "pytest-dependency", "ipykernel", "ipywidgets (>=7)", "pyppeteer (0.2.2)", "tornado (>=4.0)", "sphinx (>=1.5.1)", "sphinx-rtd-theme", "nbsphinx (>=0.2.12)", "ipython"] +all = ["pytest", "pytest-cov", "pytest-dependency", "ipykernel", "ipywidgets (>=7)", "pyppeteer (==0.2.2)", "tornado (>=4.0)", "sphinx (>=1.5.1)", "sphinx-rtd-theme", "nbsphinx (>=0.2.12)", "ipython"] docs = ["sphinx (>=1.5.1)", "sphinx-rtd-theme", "nbsphinx (>=0.2.12)", "ipython"] serve = ["tornado (>=4.0)"] -test = ["pytest", "pytest-cov", "pytest-dependency", "ipykernel", "ipywidgets (>=7)", "pyppeteer (0.2.2)"] -webpdf = ["pyppeteer (0.2.2)"] +test = ["pytest", "pytest-cov", "pytest-dependency", "ipykernel", "ipywidgets (>=7)", "pyppeteer (==0.2.2)"] +webpdf = ["pyppeteer (==0.2.2)"] [[package]] -category = "dev" -description = "The Jupyter Notebook format" name = "nbformat" +version = "5.1.2" +description = "The Jupyter Notebook format" +category = "dev" optional = false python-versions = ">=3.5" -version = "5.1.2" [package.dependencies] ipython-genutils = "*" @@ -677,31 +658,30 @@ fast = ["fastjsonschema"] test = ["check-manifest", "fastjsonschema", "testpath", "pytest", "pytest-cov"] [[package]] -category = "dev" -description = "Patch asyncio to allow nested event loops" name = "nest-asyncio" +version = "1.5.1" +description = "Patch asyncio to allow nested event loops" +category = "dev" optional = false python-versions = ">=3.5" -version = "1.5.1" [[package]] -category = "dev" -description = "Node.js virtual environment builder" name = "nodeenv" +version = "1.5.0" +description = "Node.js virtual environment builder" +category = "dev" optional = false python-versions = "*" -version = "1.5.0" [[package]] -category = "dev" -description = "A web-based notebook environment for interactive computing" name = "notebook" +version = "6.2.0" +description = "A web-based notebook environment for interactive computing" +category = "dev" optional = false python-versions = ">=3.5" -version = "6.2.0" [package.dependencies] -Send2Trash = ">=1.5.0" argon2-cffi = "*" ipykernel = "*" ipython-genutils = "*" @@ -712,6 +692,7 @@ nbconvert = "*" nbformat = "*" prometheus-client = "*" pyzmq = ">=17" +Send2Trash = ">=1.5.0" terminado = ">=0.8.3" tornado = ">=6.1" traitlets = ">=4.2.1" @@ -722,43 +703,43 @@ json-logging = ["json-logging"] test = ["pytest", "coverage", "requests", "nbval", "selenium", "pytest-cov", "requests-unixsocket"] [[package]] -category = "main" -description = "NumPy is the fundamental package for array computing with Python." name = "numpy" +version = "1.20.1" +description = "NumPy is the fundamental package for array computing with Python." +category = "main" optional = false python-versions = ">=3.7" -version = "1.20.1" [[package]] -category = "main" -description = "OWL-RL and RDFS based RDF Closure inferencing for Python" name = "owlrl" +version = "5.2.1" +description = "OWL-RL and RDFS based RDF Closure inferencing for Python" +category = "main" optional = false python-versions = "*" -version = "5.2.1" [package.dependencies] rdflib = ">=4.2.2" rdflib-jsonld = ">=0.4.0" [[package]] -category = "dev" -description = "Core utilities for Python packages" name = "packaging" +version = "20.9" +description = "Core utilities for Python packages" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "20.9" [package.dependencies] pyparsing = ">=2.0.2" [[package]] -category = "main" -description = "Powerful data structures for data analysis, time series, and statistics" name = "pandas" +version = "1.2.3" +description = "Powerful data structures for data analysis, time series, and statistics" +category = "main" optional = false python-versions = ">=3.7.1" -version = "1.2.3" [package.dependencies] numpy = ">=1.16.5" @@ -769,159 +750,152 @@ pytz = ">=2017.3" test = ["pytest (>=5.0.1)", "pytest-xdist", "hypothesis (>=3.58)"] [[package]] -category = "dev" -description = "Utilities for writing pandoc filters in python" name = "pandocfilters" +version = "1.4.3" +description = "Utilities for writing pandoc filters in python" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.4.3" [[package]] -category = "dev" -description = "A Python Parser" name = "parso" +version = "0.8.1" +description = "A Python Parser" +category = "dev" optional = false python-versions = ">=3.6" -version = "0.8.1" [package.extras] -qa = ["flake8 (3.8.3)", "mypy (0.782)"] +qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] testing = ["docopt", "pytest (<6.0.0)"] [[package]] -category = "dev" -description = "Pexpect allows easy control of interactive console applications." -marker = "python_version >= \"3.3\" and sys_platform != \"win32\" or sys_platform != \"win32\"" name = "pexpect" +version = "4.8.0" +description = "Pexpect allows easy control of interactive console applications." +category = "dev" optional = false python-versions = "*" -version = "4.8.0" [package.dependencies] ptyprocess = ">=0.5" [[package]] -category = "dev" -description = "Tiny 'shelve'-like database with concurrency support" name = "pickleshare" +version = "0.7.5" +description = "Tiny 'shelve'-like database with concurrency support" +category = "dev" optional = false python-versions = "*" -version = "0.7.5" [[package]] -category = "dev" -description = "plugin and hook calling mechanisms for python" name = "pluggy" +version = "0.13.1" +description = "plugin and hook calling mechanisms for python" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.13.1" [package.dependencies] -[package.dependencies.importlib-metadata] -python = "<3.8" -version = ">=0.12" +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] dev = ["pre-commit", "tox"] [[package]] -category = "dev" -description = "A framework for managing and maintaining multi-language pre-commit hooks." name = "pre-commit" +version = "2.10.1" +description = "A framework for managing and maintaining multi-language pre-commit hooks." +category = "dev" optional = false python-versions = ">=3.6.1" -version = "2.10.1" [package.dependencies] cfgv = ">=2.0.0" identify = ">=1.0.0" +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} nodeenv = ">=0.11.1" pyyaml = ">=5.1" toml = "*" virtualenv = ">=20.0.8" -[package.dependencies.importlib-metadata] -python = "<3.8" -version = "*" - [[package]] -category = "dev" -description = "Python client for the Prometheus monitoring system." name = "prometheus-client" +version = "0.9.0" +description = "Python client for the Prometheus monitoring system." +category = "dev" optional = false python-versions = "*" -version = "0.9.0" [package.extras] twisted = ["twisted"] [[package]] -category = "dev" -description = "Library for building powerful interactive command lines in Python" name = "prompt-toolkit" +version = "3.0.16" +description = "Library for building powerful interactive command lines in Python" +category = "dev" optional = false python-versions = ">=3.6.1" -version = "3.0.16" [package.dependencies] wcwidth = "*" [[package]] -category = "dev" -description = "Run a subprocess in a pseudo terminal" -marker = "python_version >= \"3.3\" and sys_platform != \"win32\" or sys_platform != \"win32\" or os_name != \"nt\" or python_version >= \"3.3\" and sys_platform != \"win32\" and (python_version >= \"3.3\" and sys_platform != \"win32\" or sys_platform != \"win32\")" name = "ptyprocess" +version = "0.7.0" +description = "Run a subprocess in a pseudo terminal" +category = "dev" optional = false python-versions = "*" -version = "0.7.0" [[package]] -category = "dev" -description = "library with cross-python path, ini-parsing, io, code, log facilities" name = "py" +version = "1.10.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.10.0" [[package]] -category = "dev" -description = "C parser in Python" name = "pycparser" +version = "2.20" +description = "C parser in Python" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.20" [[package]] -category = "dev" -description = "Pygments is a syntax highlighting package written in Python." name = "pygments" +version = "2.8.0" +description = "Pygments is a syntax highlighting package written in Python." +category = "dev" optional = false python-versions = ">=3.5" -version = "2.8.0" [[package]] -category = "main" -description = "Python parsing module" name = "pyparsing" +version = "2.4.7" +description = "Python parsing module" +category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -version = "2.4.7" [[package]] -category = "main" -description = "Persistent/Functional/Immutable data structures" name = "pyrsistent" +version = "0.17.3" +description = "Persistent/Functional/Immutable data structures" +category = "main" optional = false python-versions = ">=3.5" -version = "0.17.3" [[package]] -category = "main" -description = "Python SHACL Validator" name = "pyshacl" +version = "0.14.3" +description = "Python SHACL Validator" +category = "main" optional = false python-versions = ">=3.6,<4.0" -version = "0.14.3" [package.dependencies] owlrl = ">=5.2.1,<6.0.0" @@ -933,95 +907,101 @@ dev-lint = ["black (>=20.8b1,<=21)", "flake8 (>=3.8.0,<4.0.0)", "isort (>=5.7.0, js = ["pyduktape2 (>=0.4.1,<0.5.0)"] [[package]] -category = "dev" -description = "pytest: simple powerful testing with Python" name = "pytest" +version = "5.4.3" +description = "pytest: simple powerful testing with Python" +category = "dev" optional = false python-versions = ">=3.5" -version = "5.4.3" [package.dependencies] -atomicwrites = ">=1.0" +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} attrs = ">=17.4.0" -colorama = "*" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} more-itertools = ">=4.0.0" packaging = "*" pluggy = ">=0.12,<1.0" py = ">=1.5.0" wcwidth = "*" -[package.dependencies.importlib-metadata] -python = "<3.8" -version = ">=0.12" - [package.extras] -checkqa-mypy = ["mypy (v0.761)"] +checkqa-mypy = ["mypy (==v0.761)"] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] -category = "main" -description = "Extensions to the standard Python datetime module" name = "python-dateutil" +version = "2.8.1" +description = "Extensions to the standard Python datetime module" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -version = "2.8.1" [package.dependencies] six = ">=1.5" [[package]] +name = "python-dotenv" +version = "0.19.0" +description = "Read key-value pairs from a .env file and set them as environment variables" category = "main" -description = "World timezone definitions, modern and historical" +optional = false +python-versions = ">=3.5" + +[package.extras] +cli = ["click (>=5.0)"] + +[[package]] name = "pytz" +version = "2021.1" +description = "World timezone definitions, modern and historical" +category = "main" optional = false python-versions = "*" -version = "2021.1" [[package]] -category = "dev" -description = "Python for Window Extensions" -marker = "sys_platform == \"win32\"" name = "pywin32" +version = "300" +description = "Python for Window Extensions" +category = "dev" optional = false python-versions = "*" -version = "300" [[package]] -category = "dev" -description = "Python bindings for the winpty library" -marker = "os_name == \"nt\"" name = "pywinpty" +version = "0.5.7" +description = "Python bindings for the winpty library" +category = "dev" optional = false python-versions = "*" -version = "0.5.7" [[package]] -category = "main" -description = "YAML parser and emitter for Python" name = "pyyaml" +version = "5.4.1" +description = "YAML parser and emitter for Python" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" -version = "5.4.1" [[package]] -category = "dev" -description = "Python bindings for 0MQ" name = "pyzmq" +version = "22.0.3" +description = "Python bindings for 0MQ" +category = "dev" optional = false python-versions = ">=3.6" -version = "22.0.3" [package.dependencies] -cffi = "*" -py = "*" +cffi = {version = "*", markers = "implementation_name == \"pypy\""} +py = {version = "*", markers = "implementation_name == \"pypy\""} [[package]] -category = "dev" -description = "Jupyter Qt console" name = "qtconsole" +version = "5.0.2" +description = "Jupyter Qt console" +category = "dev" optional = false python-versions = ">= 3.6" -version = "5.0.2" [package.dependencies] ipykernel = ">=4.1" @@ -1038,20 +1018,20 @@ doc = ["Sphinx (>=1.3)"] test = ["flaky", "pytest", "pytest-qt"] [[package]] -category = "dev" -description = "Provides an abstraction layer on top of the various Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets." name = "qtpy" +version = "1.9.0" +description = "Provides an abstraction layer on top of the various Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets." +category = "dev" optional = false python-versions = "*" -version = "1.9.0" [[package]] -category = "main" -description = "RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information." name = "rdflib" +version = "5.0.0" +description = "RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information." +category = "main" optional = false python-versions = "*" -version = "5.0.0" [package.dependencies] isodate = "*" @@ -1065,23 +1045,23 @@ sparql = ["requests"] tests = ["html5lib", "networkx", "nose", "doctest-ignore-unicode"] [[package]] -category = "main" -description = "rdflib extension adding JSON-LD parser and serializer" name = "rdflib-jsonld" +version = "0.5.0" +description = "rdflib extension adding JSON-LD parser and serializer" +category = "main" optional = false python-versions = "*" -version = "0.5.0" [package.dependencies] rdflib = ">=4.2.2" [[package]] -category = "main" -description = "Python HTTP for Humans." name = "requests" +version = "2.25.1" +description = "Python HTTP for Humans." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "2.25.1" [package.dependencies] certifi = ">=2017.4.17" @@ -1091,79 +1071,79 @@ urllib3 = ">=1.21.1,<1.27" [package.extras] security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"] -socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"] +socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] [[package]] -category = "dev" -description = "Send file to trash natively under Mac OS X, Windows and Linux." name = "send2trash" +version = "1.5.0" +description = "Send file to trash natively under Mac OS X, Windows and Linux." +category = "dev" optional = false python-versions = "*" -version = "1.5.0" [[package]] -category = "main" -description = "Python 2 and 3 compatibility utilities" name = "six" +version = "1.15.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -version = "1.15.0" [[package]] -category = "dev" -description = "Sniff out which async library your code is running under" name = "sniffio" +version = "1.2.0" +description = "Sniff out which async library your code is running under" +category = "dev" optional = false python-versions = ">=3.5" -version = "1.2.0" [[package]] -category = "dev" -description = "Tornado websocket backend for the Xterm.js Javascript terminal emulator library." name = "terminado" +version = "0.9.2" +description = "Tornado websocket backend for the Xterm.js Javascript terminal emulator library." +category = "dev" optional = false python-versions = ">=3.6" -version = "0.9.2" [package.dependencies] -ptyprocess = "*" -pywinpty = ">=0.5" +ptyprocess = {version = "*", markers = "os_name != \"nt\""} +pywinpty = {version = ">=0.5", markers = "os_name == \"nt\""} tornado = ">=4" [[package]] -category = "dev" -description = "Test utilities for code working with files and commands" name = "testpath" +version = "0.4.4" +description = "Test utilities for code working with files and commands" +category = "dev" optional = false python-versions = "*" -version = "0.4.4" [package.extras] test = ["pathlib2"] [[package]] -category = "dev" -description = "Python Library for Tom's Obvious, Minimal Language" name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -version = "0.10.2" [[package]] -category = "dev" -description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." name = "tornado" +version = "6.1" +description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." +category = "dev" optional = false python-versions = ">= 3.5" -version = "6.1" [[package]] -category = "dev" -description = "Traitlets Python configuration system" name = "traitlets" +version = "5.0.5" +description = "Traitlets Python configuration system" +category = "dev" optional = false python-versions = ">=3.7" -version = "5.0.5" [package.dependencies] ipython-genutils = "*" @@ -1172,93 +1152,88 @@ ipython-genutils = "*" test = ["pytest"] [[package]] -category = "dev" -description = "Backported and Experimental Type Hints for Python 3.5+" -marker = "python_version < \"3.8\"" name = "typing-extensions" +version = "3.7.4.3" +description = "Backported and Experimental Type Hints for Python 3.5+" +category = "dev" optional = false python-versions = "*" -version = "3.7.4.3" [[package]] -category = "main" -description = "HTTP library with thread-safe connection pooling, file post, and more." name = "urllib3" +version = "1.26.3" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" -version = "1.26.3" [package.extras] brotli = ["brotlipy (>=0.6.0)"] secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] -socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] -category = "dev" -description = "Virtual Python Environment builder" name = "virtualenv" +version = "20.4.2" +description = "Virtual Python Environment builder" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -version = "20.4.2" [package.dependencies] appdirs = ">=1.4.3,<2" distlib = ">=0.3.1,<1" filelock = ">=3.0.0,<4" +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} six = ">=1.9.0,<2" -[package.dependencies.importlib-metadata] -python = "<3.8" -version = ">=0.12" - [package.extras] docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=19.9.0rc1)"] testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)", "xonsh (>=0.9.16)"] [[package]] -category = "dev" -description = "Measures the displayed width of unicode strings in a terminal" name = "wcwidth" +version = "0.2.5" +description = "Measures the displayed width of unicode strings in a terminal" +category = "dev" optional = false python-versions = "*" -version = "0.2.5" [[package]] -category = "dev" -description = "Character encoding aliases for legacy web content" name = "webencodings" +version = "0.5.1" +description = "Character encoding aliases for legacy web content" +category = "dev" optional = false python-versions = "*" -version = "0.5.1" [[package]] -category = "dev" -description = "IPython HTML widgets for Jupyter" name = "widgetsnbextension" +version = "3.5.1" +description = "IPython HTML widgets for Jupyter" +category = "dev" optional = false python-versions = "*" -version = "3.5.1" [package.dependencies] notebook = ">=4.4.1" [[package]] -category = "main" -description = "Backport of pathlib-compatible object wrapper for zip files" -marker = "python_version < \"3.8\"" name = "zipp" +version = "3.4.1" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" optional = false python-versions = ">=3.6" -version = "3.4.1" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] [metadata] -content-hash = "5b69dbad77f79c4fba3f5e817ec872846ac677d88692ecb83f34e3c6ac3ca5a1" -lock-version = "1.0" +lock-version = "1.1" python-versions = "^3.7.1" +content-hash = "79a8ae05259a0d2374288348a7223357e2ccaa599c72e3d8f0731e550c8f99a0" [metadata.files] anyio = [ @@ -1292,6 +1267,10 @@ argon2-cffi = [ {file = "argon2_cffi-20.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:9dfd5197852530294ecb5795c97a823839258dfd5eb9420233c7cfedec2058f2"}, {file = "argon2_cffi-20.1.0-cp39-cp39-win32.whl", hash = "sha256:e2db6e85c057c16d0bd3b4d2b04f270a7467c147381e8fd73cbbe5bc719832be"}, {file = "argon2_cffi-20.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:8a84934bd818e14a17943de8099d41160da4a336bcc699bb4c394bbb9b94bd32"}, + {file = "argon2_cffi-20.1.0-pp36-pypy36_pp73-macosx_10_7_x86_64.whl", hash = "sha256:b94042e5dcaa5d08cf104a54bfae614be502c6f44c9c89ad1535b2ebdaacbd4c"}, + {file = "argon2_cffi-20.1.0-pp36-pypy36_pp73-win32.whl", hash = "sha256:8282b84ceb46b5b75c3a882b28856b8cd7e647ac71995e71b6705ec06fc232c3"}, + {file = "argon2_cffi-20.1.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:3aa804c0e52f208973845e8b10c70d8957c9e5a666f702793256242e9167c4e0"}, + {file = "argon2_cffi-20.1.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:36320372133a003374ef4275fbfce78b7ab581440dfca9f9471be3dd9a522428"}, ] async-generator = [ {file = "async_generator-1.10-py3-none-any.whl", hash = "sha256:01c7bf666359b4967d2cda0000cc2e4af16a0ae098cbffcb8472fb9e8ad6585b"}, @@ -1338,24 +1317,36 @@ cffi = [ {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24ec4ff2c5c0c8f9c6b87d5bb53555bf267e1e6f70e52e5a9740d32861d36b6f"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c3f39fa737542161d8b0d680df2ec249334cd70a8f420f71c9304bd83c3cbed"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:681d07b0d1e3c462dd15585ef5e33cb021321588bebd910124ef4f4fb71aef55"}, {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"}, {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"}, {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06d7cd1abac2ffd92e65c0609661866709b4b2d82dd15f611e602b9b188b0b69"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f861a89e0043afec2a51fd177a567005847973be86f709bbb044d7f42fc4e05"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc5a8e069b9ebfa22e26d0e6b97d6f9781302fe7f4f2b8776c3e1daea35f1adc"}, {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"}, {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"}, {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"}, {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:04c468b622ed31d408fea2346bec5bbffba2cc44226302a0de1ade9f5ea3d373"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:06db6321b7a68b2bd6df96d08a5adadc1fa0e8f419226e25b2a5fbf6ccc7350f"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:293e7ea41280cb28c6fcaaa0b1aa1f533b8ce060b9e701d78511e1e6c4a1de76"}, {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"}, {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"}, {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"}, {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bf1ac1984eaa7675ca8d5745a8cb87ef7abecb5592178406e55858d411eadc0"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:df5052c5d867c1ea0b311fb7c3cd28b19df469c056f7fdcfe88c7473aa63e333"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:24a570cd11895b60829e941f2613a4f79df1a27344cbbb82164ef2e0116f09c7"}, {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"}, {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"}, {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"}, @@ -1503,20 +1494,39 @@ markupsafe = [ {file = "MarkupSafe-1.1.1-cp35-cp35m-win32.whl", hash = "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"}, {file = "MarkupSafe-1.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d53bc011414228441014aa71dbec320c66468c1030aae3a6e29778a3382d96e5"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:3b8a6499709d29c2e2399569d96719a1b21dcd94410a586a18526b143ec8470f"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:84dee80c15f1b560d55bcfe6d47b27d070b4681c699c572af2e3c7cc90a3b8e0"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:b1dba4527182c95a0db8b6060cc98ac49b9e2f5e64320e2b56e47cb2831978c7"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-win32.whl", hash = "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bf5aa3cbcfdf57fa2ee9cd1822c862ef23037f5c832ad09cfea57fa846dec193"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:6fffc775d90dcc9aed1b89219549b329a9250d918fd0b8fa8d93d154918422e1"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:a6a744282b7718a2a62d2ed9d993cad6f5f585605ad352c11de459f4108df0a1"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:195d7d2c4fbb0ee8139a6cf67194f3973a6b3042d742ebe0a9ed36d8b6f0c07f"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:acf08ac40292838b3cbbb06cfe9b2cb9ec78fce8baca31ddb87aaac2e2dc3bc2"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:d9be0ba6c527163cbed5e0857c451fcd092ce83947944d6c14bc95441203f032"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:caabedc8323f1e93231b52fc32bdcde6db817623d33e100708d9a68e1f53b26b"}, {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d73a845f227b0bfe8a7455ee623525ee656a9e2e749e4742706d80a6065d5e2c"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:98bae9582248d6cf62321dcb52aaf5d9adf0bad3b40582925ef7c7f0ed85fceb"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:2beec1e0de6924ea551859edb9e7679da6e4870d32cb766240ce17e0a0ba2014"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:7fed13866cf14bba33e7176717346713881f56d9d2bcebab207f7a036f41b850"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:6f1e273a344928347c1290119b493a1f0303c52f5a5eae5f16d74f48c15d4a85"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:feb7b34d6325451ef96bc0e36e1a6c0c1c64bc1fbec4b854f4529e51887b1621"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-win32.whl", hash = "sha256:22c178a091fc6630d0d045bdb5992d2dfe14e3259760e713c490da5323866c39"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7d644ddb4dbd407d31ffb699f1d140bc35478da613b441c582aeb7c43838dd8"}, {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, ] mistune = [ @@ -1673,6 +1683,10 @@ python-dateutil = [ {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, {file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"}, ] +python-dotenv = [ + {file = "python-dotenv-0.19.0.tar.gz", hash = "sha256:f521bc2ac9a8e03c736f62911605c5d83970021e3fa95b37d769e2bbbe9b6172"}, + {file = "python_dotenv-0.19.0-py2.py3-none-any.whl", hash = "sha256:aae25dc1ebe97c420f50b81fb0e5c949659af713f31fdb63c749ca68748f34b1"}, +] pytz = [ {file = "pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"}, {file = "pytz-2021.1.tar.gz", hash = "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da"}, @@ -1708,18 +1722,26 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, diff --git a/pyproject.toml b/pyproject.toml index 71e5b2a..fe6e631 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,7 @@ requests = "^2.24.0" frozendict = "^1.2" pyshacl = "^0.14.2" pandas = "^1.2.3" +python-dotenv = "^0.19.0" [tool.poetry.dev-dependencies] pytest = "^5.2" diff --git a/tasty/shapes_generator.py b/tasty/shapes_generator.py index 7ba8fd8..86f80ae 100644 --- a/tasty/shapes_generator.py +++ b/tasty/shapes_generator.py @@ -174,7 +174,7 @@ def add_predicates(self, namespaced_shape, predicates: list, required=True): for each_path in predicates: path = each_path.get('path') namespaced_path = tg.get_namespaced_term(self.ontology, path) - self.add_shapes_and_types(namespaced_shape, namespaced_path, each_path) + self.add_shapes_and_types(namespaced_shape, namespaced_path, each_path, required) if required: self.add_min_count_for_required_nodes(each_path, namespaced_shape, namespaced_path) diff --git a/tasty/skyspark/client.py b/tasty/skyspark/client.py index bbc761a..cfc8046 100644 --- a/tasty/skyspark/client.py +++ b/tasty/skyspark/client.py @@ -1,3 +1,4 @@ +import json import requests # TODO: @@ -52,12 +53,48 @@ def make_get_request(self, query_string: str, format: str = 'json'): } ) - def generate_axon_query_for_equip(self, nav_name: str): + def generate_axon_query_for_equip(self, nav_name: str, site: str = None): """ - This method generates a query for a given peice of a equipment. Given the equipment's "navName" the query string - will query for the equipment itself and all points that have it as an equipRef. + This method generates a query for a given peice of a equipment. Given the equipment's "navName" and the site's + "dis" (optional), the query string will query for the equipment itself and all points that have it as an equipRef. :nav_name: the navName (from Skyspark) of the equipment for which to generate the query + :site: the siteRef "dis" (from Skyspark) """ - query_string = "(point and equipRef->navName==\"" + nav_name + "\") or (equip and navName==\"" + nav_name + "\")" + query_string = "((point and equipRef->navName==\"" + nav_name + "\") or (equip and navName==\"" + nav_name + "\"))" + if(site is not None): + query_string += " and siteRef->dis==\"" + site + "\"" + + return query_string + + def generate_axon_query_for_equip_type(self, equip_tag: str, site: str = None): + """ + This method generates a query to retreive a list of the given equipment type. Given the equipment type tag and the site's + "dis" (optional), the query string will query for all equipment of this type. + + :equip_tag: the equipment tag (from Skyspark) of the equipment to search for + :site: the siteRef "dis" (from Skyspark) + """ + query_string = equip_tag + if(site is not None): + query_string += " and siteRef->dis==\"" + site + "\"" + return query_string + + def get_equip_id(self, nav_name: str, site: str = None): + """ + This method queries the Skyspark instance for a given peice of a equipment and parses the result to determine the id. + Given the equipment's "navName" and the site's "dis" (optional), this method will return the equipment's id. + + :nav_name: the navName (from Skyspark) of the equipment for which to generate the query' + :site: the siteRef "dis" (from Skyspark) + """ + query_string = "equip and navName==\"" + nav_name + "\"" + if(site is not None): + query_string += " and siteRef->dis==\"" + site + "\"" + + response = self.make_get_request(query_string, 'json') + data = json.loads(response.text) + raw_id = data['rows'][0]['id'] + id = raw_id.split(" ")[0][raw_id.rfind(':') + 1:] + return id diff --git a/tasty/skyspark/helpers.py b/tasty/skyspark/helpers.py index 50d4f2e..7b88a93 100644 --- a/tasty/skyspark/helpers.py +++ b/tasty/skyspark/helpers.py @@ -13,6 +13,18 @@ def save_data_to_file(data, filename): file.write(data) +def append_data_to_file(data, filename): + """ + Save the given data to the given file + + :param data: the data to be saved + :param filename: the filepath/filename in which to save the data + """ + with open(filename, 'a') as file: + file.write(data) + file.close() + + def parse_file_to_graph(filename, schema=tc.HAYSTACK, version=tc.V3_9_10, format_type='turtle'): """ Parse the data from the given file to a graph (rdflib) with the given schema. diff --git a/tasty/skyspark/process_graphs.py b/tasty/skyspark/process_graphs.py index e18997c..d07dce5 100644 --- a/tasty/skyspark/process_graphs.py +++ b/tasty/skyspark/process_graphs.py @@ -246,23 +246,44 @@ def get_shapes_graph(self, shapes_graph_filename, target_node, shape_name): self.add_target_nodes(shapes_graph, target_node, shape_name) return shapes_graph - def determine_missing_points(self, results_graph): + def determine_missing_points(self, results_graph, severity_level="violation"): """ - Given a results_graph generated by pySHACL's validate method, this method returns a list of points that were not validated - (i.e. are missing) from the equipment. + Given a results_graph generated by pySHACL's validate method, this method returns a dict containing a list of required points + that were not validated (i.e. are missing) from the equipment, and a list of optional points that were not validated. :param results_graph: the rdf results graph returned by pySHACL's validate method + :return: a dict containing two lists - 'required' is a list of the missing required points, 'optional' is a list of missing + optional points. + :rtype: a dict with the structure { 'required': [...], 'optional': [...] } """ - missing_points = [] + missing_required_points = [] + missing_optional_points = [] # Find the Validation Results for subject, predicate, object in results_graph.triples((None, RDF.type, SH.ValidationResult)): - # check if Validation result points to a BNode - for node in results_graph.objects(subject=subject, predicate=SH.sourceShape): - # if it points to a BNode wee assume it's a constraint on a functional group has a `sh:qualifiedValueShape` - # which should be a URI of one of the simple shapes - our missing point - if isinstance(node, BNode): - point = results_graph.value(subject=node, predicate=SH.qualifiedValueShape) - missing_points.append(point) - - return missing_points + # get the severity of the failure + severity = results_graph.value(subject=subject, predicate=SH.resultSeverity) + source_constraint_componenet = results_graph.value(subject=subject, predicate=SH.sourceConstraintComponent) + + # continue only if the violation is from a "qualified min count" constraint + if(source_constraint_componenet == SH.QualifiedMinCountConstraintComponent): + # check if Validation result points to a BNode + for node in results_graph.objects(subject=subject, predicate=SH.sourceShape): + # if it points to a BNode wee assume it's a constraint on a functional group has a `sh:qualifiedValueShape` + # which should be a URI of one of the simple shapes - our missing point + if isinstance(node, BNode): + point = results_graph.value(subject=node, predicate=SH.qualifiedValueShape) + + # if the severity is a violation, it's a required point + if(severity == SH.Violation): + missing_required_points.append(point) + # if the severity is a warning, it's an optional point + elif(severity == SH.Warning): + missing_optional_points.append(point) + + missing_point_dict = { + 'required': missing_required_points, + 'optional': missing_optional_points + } + + return missing_point_dict diff --git a/tasty/source_shapes/haystack/nrel.json b/tasty/source_shapes/haystack/nrel.json index cb1cf5b..ac48bb2 100644 --- a/tasty/source_shapes/haystack/nrel.json +++ b/tasty/source_shapes/haystack/nrel.json @@ -1762,6 +1762,43 @@ "sensor" ] }, + { + "name": "FanRunCommandShape", + "types": [ + "point" + ], + "tags": [ + "fan", + "run", + "cmd" + ] + }, + { + "name": "FanRunStatusShape", + "types": [ + "point" + ], + "tags": [ + "fan", + "run", + "sensor" + ] + }, + { + "name": "ZoneTemperatureSetpointUserAdjustmentShape", + "types": [ + "point" + ], + "tags": [ + "zone", + "air", + "temp", + "cmd" + ], + "tags-custom": [ + "adjust" + ] + }, { @@ -2616,6 +2653,60 @@ ] } }, + { + "name": "ConstantSpeedFanShape", + "predicates": { + "requires": [ + { + "path": "equipRef", + "path-type": "inverse", + "shapes": [ + "FanRunCommandShape", + "FanRunStatusShape" + ] + } + ] + } + }, + { + "name": "FCUAirTemperatureControlShape", + "predicates": { + "requires": [ + { + "path": "equipRef", + "path-type": "inverse", + "shapes": [ + "DischargeAirTemperatureShape", + "DischargeAirTemperatureSetpointShape" + ] + } + ] + } + }, + { + "name": "FCUConstantSpeedAirFlowControlShape", + "predicates": { + "requires": [ + { + "path": "equipRef", + "path-type": "inverse", + "shapes": [ + "FanRunCommandShape", + "FanRunStatusShape" + ] + } + ], + "optional": [ + { + "path": "equipRef", + "path-type": "inverse", + "shapes": [ + "DischargeAirFlowShape" + ] + } + ] + } + }, { "name": "NREL-VAV-SD-Cooling-Only-Shape", @@ -2651,6 +2742,25 @@ "HWHeatingCoilShape" ] }, + { + "name": "NREL-VAV-Fan-Powered-HW-Reheat-Shape", + "types": [ + "vav" + ], + "shape-mixins": [ + "ZoneThermalComfortSensorsShape", + "ZoneOccupancySensorsShape", + "ZoneDemandControlledVentilationShape", + "ZoneCoolingSetpointsShape", + "ZoneHeatingSetpointsShape", + "ZoneModeControlShape", + "VAVReheatAirTemperatureControlShape", + "VAVAirFlowControlShape", + "VAVAirFlowReheatShape", + "HWHeatingCoilShape", + "ConstantSpeedFanShape" + ] + }, { "name": "NREL-VAV-SD-Elec-Reheat-Shape", "types": [ @@ -2669,6 +2779,34 @@ "VAVAirFlowReheatShape" ] }, + { + "name": "NREL-FCU-CS-HW-CHW-Shape", + "types": [ + "fcu" + ], + "predicates": { + "requires": [ + { + "path": "equipRef", + "path-type": "inverse", + "shapes": [ + "ZoneTemperatureSetpointUserAdjustmentShape" + ] + } + ] + }, + "shape-mixins": [ + "ZoneThermalComfortSensorsShape", + "ZoneOccupancySensorsShape", + "ZoneCoolingSetpointsShape", + "ZoneHeatingSetpointsShape", + "ZoneModeControlShape", + "FCUAirTemperatureControlShape", + "FCUConstantSpeedAirFlowControlShape", + "HWHeatingCoilShape", + "CHWCoolingCoilShape" + ] + }, { "name": "NREL-AHU-VAV-MZ-Mixed-HW-CHW-Shape", "types": [ @@ -2785,6 +2923,85 @@ "SupplyAirPlenumStaticPressureControlShape", "FaceBypassModulatingDamperControlShape" ] + }, + { + "name": "NREL-AHU-VAV-MZ-HW-Evap-Shape", + "types": [ + "ahu" + ], + "predicates": { + "requires": [ + { + "path": "equipRef", + "path-type": "inverse", + "shapes": [ + "FreezeStatSensorShape" + ] + } + ], + "optional": [ + { + "path": "equipRef", + "path-type": "inverse", + "shapes": [ + "FilterDifferentialPressureSensorShape" + ] + } + ] + }, + "shape-mixins": [ + "OccupancyModeIndicatorShape", + "AHUModeControlShape", + "SupplyAirSectionShape", + "MixedAirSectionShape", + "OutsideAirSectionShape", + "ReturnAirSectionShape", + "SupplyFanShape", + "HWHeatingCoilShape", + "EvaporativeCoolingControlShape", + "SupplyAirPlenumStaticPressureControlShape" + ] + }, + { + "name": "NREL-AHU-VAV-MZ-HW-CHW-Evap-Shape", + "types": [ + "ahu" + ], + "predicates": { + "requires": [ + { + "path": "equipRef", + "path-type": "inverse", + "shapes": [ + "FreezeStatSensorShape" + ] + } + ], + "optional": [ + { + "path": "equipRef", + "path-type": "inverse", + "shapes": [ + "FilterDifferentialPressureSensorShape" + ] + } + ] + }, + "shape-mixins": [ + "OccupancyModeIndicatorShape", + "AHUModeControlShape", + "SupplyAirSectionShape", + "MixedAirSectionShape", + "OutsideAirSectionShape", + "ReturnAirSectionShape", + "SupplyFanShape", + "CHWCoolingCoilShape", + "HWHeatingCoilShape", + "EvaporativeCoolingControlShape", + "SupplyAirPlenumStaticPressureControlShape" + ] } + + ] } diff --git a/tests/files/data/sample_skyspark_vav.ttl b/tests/files/data/sample_skyspark_vav.ttl deleted file mode 100644 index 18da0e6..0000000 --- a/tests/files/data/sample_skyspark_vav.ttl +++ /dev/null @@ -1,179 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix xsd: . -@prefix owl: . -@prefix core: . -@prefix conn: . -@prefix his: . -@prefix ph: . -@prefix bacnet: . -@prefix phScience: . -@prefix phIoT: . -@prefix point: . -@prefix sql: . -@prefix _: . - -ph:hasTag a owl:ObjectProperty ; - rdfs:range ph:marker . - -_:211c90ab-701fa511 a bacnet:bacnetPoint ; - ph:hasTag phScience:air, - bacnet:bacnetPoint, - phIoT:his, - phIoT:point, - phIoT:sensor, - phScience:temp, - phIoT:zone ; - rdfs:label "S&TF UFVAV-3 Zone Temp" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "AI5" ; - _:bacnetDis "RM TEMP" ; - bacnet:bacnetHis "TL3" ; - _:bacnetObjectType "ANALOG_INPUT" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f4a131c-3f1fcc51 ; - phIoT:curStatus "unknown" ; - core:disMacro "$equipRef $navName" ; - phIoT:equipRef _:214466de-7abb28a7 ; - his:hisAppendNA 30 ; - his:hisEnd 2021; - his:hisSize 31997 ; - - phIoT:hisStatus "ok" ; - ph:kind "Number" ; - core:navName "Zone Temp" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - sql:sqlConnRef _:24a0194c-adac2f1d ; - _:sqlTable "CopperCube_SERF_STF_Area_37034_TL3" ; - _:sqlTz "America/Phoenix" ; - ph:tz "Denver" ; - ph:unit "\u00b0F" . - -_:211c90b6-52117d4d a bacnet:bacnetPoint ; - ph:hasTag phScience:air, - bacnet:bacnetPoint, - phIoT:cur, - phIoT:his, - phIoT:point, - phIoT:sp, - phScience:temp, - phIoT:zone ; - rdfs:label "S&TF UFVAV-3 Zone Temp Setpt" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "AV11" ; - _:bacnetDis "RM TEMP STPT" ; - _:bacnetObjectType "ANALOG_VALUE" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f40f395-5a02b62e ; - phIoT:curStatus "ok" ; - phIoT:curVal 74 ; - core:disMacro "$equipRef $navName" ; - phIoT:equipRef _:214466de-7abb28a7 ; - his:hisAppendNA 30 ; - point:hisCollectInterval 5 ; - point:hisCollectWriteFreq 15 ; - - his:hisSize 405276 ; - - phIoT:hisStatus "ok" ; - ph:kind "Number" ; - core:navName "Zone Temp Setpt" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - ph:tz "Denver" ; - ph:unit "\u00b0F" . - -_:211c90b6-0da18cd7 a bacnet:bacnetPoint ; - ph:hasTag phScience:air, - bacnet:bacnetPoint, - phIoT:cmd, - phIoT:cur, - phIoT:damper, - phIoT:discharge, - phIoT:his, - phIoT:point ; - rdfs:label "S&TF UFVAV-3 Damper" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "AV7" ; - _:bacnetDis "DMP POS" ; - _:bacnetObjectType "ANALOG_VALUE" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f40f395-5a02b62e ; - phIoT:curStatus "ok" ; - phIoT:curVal 0 ; - core:disMacro "$equipRef $navName" ; - phIoT:equipRef _:214466de-7abb28a7 ; - his:hisAppendNA 30 ; - point:hisCollectInterval 5 ; - point:hisCollectWriteFreq 15 ; - - his:hisSize 405259 ; - - phIoT:hisStatus "ok" ; - ph:kind "Number" ; - core:navName "Damper" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - ph:tz "Denver" ; - ph:unit "%" . - -_:214466de-7abb28a7 a phIoT:vav ; - ph:hasTag phIoT:equip, - phIoT:vav ; - rdfs:label "S&TF UFVAV-3" ; - _:ahuRef _:21164218-5fab5c91 ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - _:bacnetDeviceId 37034 ; - _:connRef _:211c8a83-ef5c639d ; - core:disMacro "$siteRef $navName" ; - core:navName "UFVAV-3" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 . - -_:22f5d821-8e310c3e a phIoT:his-point ; - ph:hasTag phIoT:his, - phIoT:occupied, - phIoT:point, - phIoT:sensor ; - rdfs:label "S&TF UFVAV-3 Schedule" ; - core:disMacro "$equipRef $navName" ; - phIoT:equipRef _:214466de-7abb28a7 ; - _:hisFunc "calcMirrorHisPoint(_,_,_,_,@p:stm_campus:r:22f4de28-7e5ea4aa)" ; - ph:kind "Bool" ; - core:navName "Schedule" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - ph:tz "Denver" . - -_:211c90b7-f2430aa1 a bacnet:bacnetPoint ; - ph:hasTag bacnet:bacnetPoint, - phIoT:cur, - phIoT:his, - point:hisCollectCov, - phIoT:point, - phIoT:sensor, - phIoT:unocc ; - rdfs:label "S&TF UFVAV-3 Unocc Override" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "BI6" ; - _:bacnetDis "UNOCC OVRD" ; - _:bacnetObjectType "BINARY_INPUT" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f40f395-5a02b62e ; - phIoT:curStatus "ok" ; - phIoT:curVal false ; - core:disMacro "$equipRef $navName" ; - ph:enum "OFF,ON" ; - phIoT:equipRef _:214466de-7abb28a7 ; - point:hisCollectWriteFreq 15 ; - - phIoT:hisMode "cov" ; - his:hisSize 409 ; - - phIoT:hisStatus "ok" ; - ph:kind "Bool" ; - core:navName "Unocc Override" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - ph:tz "Denver" . diff --git a/tests/files/data/sample_skyspark_vav_raw.ttl b/tests/files/data/sample_skyspark_vav_raw.ttl deleted file mode 100644 index aa98fb3..0000000 --- a/tests/files/data/sample_skyspark_vav_raw.ttl +++ /dev/null @@ -1,184 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix xsd: . -@prefix owl: . -@prefix core: . -@prefix conn: . -@prefix his: . -@prefix ph: . -@prefix bacnet: . -@prefix phScience: . -@prefix phIoT: . -@prefix point: . -@prefix sql: . - -ph:hasTag a owl:ObjectProperty ; - rdfs:range ph:marker . - -_:211c90ab-701fa511 a bacnet:bacnetPoint ; - ph:hasTag phScience:air, - bacnet:bacnetPoint, - phIoT:his, - phIoT:point, - phIoT:sensor, - phScience:temp, - phIoT:zone ; - rdfs:label "S&TF UFVAV-3 Zone Temp" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "AI5" ; - _:bacnetDis "RM TEMP" ; - bacnet:bacnetHis "TL3" ; - _:bacnetObjectType "ANALOG_INPUT" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f4a131c-3f1fcc51 ; - phIoT:curStatus "unknown" ; - core:disMacro "$equipRef $navName" ; - phIoT:equipRef _:214466de-7abb28a7 ; - his:hisAppendNA 30 ; - his:hisEnd 2021-07-27T11:06:06-06:00^^xsd:dateTime ; - his:hisSize 32645 ; - his:hisStart 2017-08-03T09:47:00-06:00^^xsd:dateTime ; - phIoT:hisStatus "ok" ; - ph:kind "Number" ; - core:navName "Zone Temp" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - sql:sqlConnRef _:24a0194c-adac2f1d ; - _:sqlTable "CopperCube_SERF_STF_Area_37034_TL3" ; - _:sqlTz "America/Phoenix" ; - ph:tz "Denver" ; - ph:unit "\u00b0F" ; - _:mod 2021-03-04T22:32:40.67Z^^xsd:dateTime . - -_:211c90b6-52117d4d a bacnet:bacnetPoint ; - ph:hasTag phScience:air, - bacnet:bacnetPoint, - phIoT:cur, - phIoT:his, - phIoT:point, - phIoT:sp, - phScience:temp, - phIoT:zone ; - rdfs:label "S&TF UFVAV-3 Zone Temp Setpt" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "AV11" ; - _:bacnetDis "RM TEMP STPT" ; - _:bacnetObjectType "ANALOG_VALUE" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f40f395-5a02b62e ; - phIoT:curStatus "ok" ; - phIoT:curVal 74 ; - core:disMacro "$equipRef $navName" ; - phIoT:equipRef _:214466de-7abb28a7 ; - his:hisAppendNA 30 ; - point:hisCollectInterval 5 ; - point:hisCollectWriteFreq 15 ; - his:hisEnd 2021-07-27T15:55:00-06:00^^xsd:dateTime ; - his:hisSize 413080 ; - his:hisStart 2017-08-08T09:25:00-06:00^^xsd:dateTime ; - phIoT:hisStatus "ok" ; - ph:kind "Number" ; - core:navName "Zone Temp Setpt" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - ph:tz "Denver" ; - ph:unit "\u00b0F" ; - _:mod 2021-03-04T22:32:40.67Z^^xsd:dateTime . - -_:211c90b6-0da18cd7 a bacnet:bacnetPoint ; - ph:hasTag phScience:air, - bacnet:bacnetPoint, - phIoT:cmd, - phIoT:cur, - phIoT:damper, - phIoT:discharge, - phIoT:his, - phIoT:point ; - rdfs:label "S&TF UFVAV-3 Damper" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "AV7" ; - _:bacnetDis "DMP POS" ; - _:bacnetObjectType "ANALOG_VALUE" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f40f395-5a02b62e ; - phIoT:curStatus "ok" ; - phIoT:curVal 0 ; - core:disMacro "$equipRef $navName" ; - phIoT:equipRef _:214466de-7abb28a7 ; - his:hisAppendNA 30 ; - point:hisCollectInterval 5 ; - point:hisCollectWriteFreq 15 ; - his:hisEnd 2021-07-27T15:55:00-06:00^^xsd:dateTime ; - his:hisSize 413063 ; - his:hisStart 2017-08-08T09:25:00-06:00^^xsd:dateTime ; - phIoT:hisStatus "ok" ; - ph:kind "Number" ; - core:navName "Damper" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - ph:tz "Denver" ; - ph:unit "%" ; - _:mod 2021-03-04T22:32:40.67Z^^xsd:dateTime . - -_:214466de-7abb28a7 a phIoT:vav ; - ph:hasTag phIoT:equip, - phIoT:vav ; - rdfs:label "S&TF UFVAV-3" ; - _:ahuRef _:21164218-5fab5c91 ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - _:bacnetDeviceId 37034 ; - _:connRef _:211c8a83-ef5c639d ; - core:disMacro "$siteRef $navName" ; - core:navName "UFVAV-3" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - _:mod 2020-04-02T16:38:45.356Z^^xsd:dateTime . - -_:22f5d821-8e310c3e a phIoT:his-point ; - ph:hasTag phIoT:his, - phIoT:occupied, - phIoT:point, - phIoT:sensor ; - rdfs:label "S&TF UFVAV-3 Schedule" ; - core:disMacro "$equipRef $navName" ; - phIoT:equipRef _:214466de-7abb28a7 ; - _:hisFunc "calcMirrorHisPoint(_,_,_,_,@p:stm_campus:r:22f4de28-7e5ea4aa)" ; - ph:kind "Bool" ; - core:navName "Schedule" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - ph:tz "Denver" ; - _:mod 2019-01-09T16:21:30.397Z^^xsd:dateTime . - -_:211c90b7-f2430aa1 a bacnet:bacnetPoint ; - ph:hasTag bacnet:bacnetPoint, - phIoT:cur, - phIoT:his, - point:hisCollectCov, - phIoT:point, - phIoT:sensor, - phIoT:unocc ; - rdfs:label "S&TF UFVAV-3 Unocc Override" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "BI6" ; - _:bacnetDis "UNOCC OVRD" ; - _:bacnetObjectType "BINARY_INPUT" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f40f395-5a02b62e ; - phIoT:curStatus "ok" ; - phIoT:curVal false ; - core:disMacro "$equipRef $navName" ; - ph:enum "OFF,ON" ; - phIoT:equipRef _:214466de-7abb28a7 ; - point:hisCollectWriteFreq 15 ; - his:hisEnd 2021-06-26T07:22:22-06:00^^xsd:dateTime ; - phIoT:hisMode "cov" ; - his:hisSize 409 ; - his:hisStart 2017-08-08T09:22:23-06:00^^xsd:dateTime ; - phIoT:hisStatus "ok" ; - ph:kind "Bool" ; - core:navName "Unocc Override" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - ph:tz "Denver" ; - _:mod 2021-03-04T22:32:40.67Z^^xsd:dateTime . diff --git a/tests/files/data/sample_skyspark_vav_raw_backup.ttl b/tests/files/data/sample_skyspark_vav_raw_backup.ttl index aa98fb3..385bb15 100644 --- a/tests/files/data/sample_skyspark_vav_raw_backup.ttl +++ b/tests/files/data/sample_skyspark_vav_raw_backup.ttl @@ -3,56 +3,35 @@ @prefix xsd: . @prefix owl: . @prefix core: . -@prefix conn: . @prefix his: . @prefix ph: . -@prefix bacnet: . @prefix phScience: . @prefix phIoT: . @prefix point: . -@prefix sql: . ph:hasTag a owl:ObjectProperty ; rdfs:range ph:marker . -_:211c90ab-701fa511 a bacnet:bacnetPoint ; +_:211c90ab-701fa511 a phIoT:his-point ; ph:hasTag phScience:air, - bacnet:bacnetPoint, phIoT:his, phIoT:point, phIoT:sensor, phScience:temp, phIoT:zone ; rdfs:label "S&TF UFVAV-3 Zone Temp" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "AI5" ; - _:bacnetDis "RM TEMP" ; - bacnet:bacnetHis "TL3" ; - _:bacnetObjectType "ANALOG_INPUT" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f4a131c-3f1fcc51 ; - phIoT:curStatus "unknown" ; core:disMacro "$equipRef $navName" ; phIoT:equipRef _:214466de-7abb28a7 ; - his:hisAppendNA 30 ; - his:hisEnd 2021-07-27T11:06:06-06:00^^xsd:dateTime ; - his:hisSize 32645 ; - his:hisStart 2017-08-03T09:47:00-06:00^^xsd:dateTime ; - phIoT:hisStatus "ok" ; ph:kind "Number" ; core:navName "Zone Temp" ; phIoT:siteRef _:211601cb-e3e5e9b3 ; phIoT:spaceRef _:2184f1be-29c172a8 ; - sql:sqlConnRef _:24a0194c-adac2f1d ; - _:sqlTable "CopperCube_SERF_STF_Area_37034_TL3" ; - _:sqlTz "America/Phoenix" ; ph:tz "Denver" ; ph:unit "\u00b0F" ; _:mod 2021-03-04T22:32:40.67Z^^xsd:dateTime . -_:211c90b6-52117d4d a bacnet:bacnetPoint ; +_:211c90b6-52117d4d a phIoT:his-point ; ph:hasTag phScience:air, - bacnet:bacnetPoint, phIoT:cur, phIoT:his, phIoT:point, @@ -60,23 +39,8 @@ _:211c90b6-52117d4d a bacnet:bacnetPoint ; phScience:temp, phIoT:zone ; rdfs:label "S&TF UFVAV-3 Zone Temp Setpt" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "AV11" ; - _:bacnetDis "RM TEMP STPT" ; - _:bacnetObjectType "ANALOG_VALUE" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f40f395-5a02b62e ; - phIoT:curStatus "ok" ; - phIoT:curVal 74 ; core:disMacro "$equipRef $navName" ; phIoT:equipRef _:214466de-7abb28a7 ; - his:hisAppendNA 30 ; - point:hisCollectInterval 5 ; - point:hisCollectWriteFreq 15 ; - his:hisEnd 2021-07-27T15:55:00-06:00^^xsd:dateTime ; - his:hisSize 413080 ; - his:hisStart 2017-08-08T09:25:00-06:00^^xsd:dateTime ; - phIoT:hisStatus "ok" ; ph:kind "Number" ; core:navName "Zone Temp Setpt" ; phIoT:siteRef _:211601cb-e3e5e9b3 ; @@ -85,9 +49,8 @@ _:211c90b6-52117d4d a bacnet:bacnetPoint ; ph:unit "\u00b0F" ; _:mod 2021-03-04T22:32:40.67Z^^xsd:dateTime . -_:211c90b6-0da18cd7 a bacnet:bacnetPoint ; +_:211c90b6-0da18cd7 a phIoT:his-point ; ph:hasTag phScience:air, - bacnet:bacnetPoint, phIoT:cmd, phIoT:cur, phIoT:damper, @@ -95,23 +58,8 @@ _:211c90b6-0da18cd7 a bacnet:bacnetPoint ; phIoT:his, phIoT:point ; rdfs:label "S&TF UFVAV-3 Damper" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "AV7" ; - _:bacnetDis "DMP POS" ; - _:bacnetObjectType "ANALOG_VALUE" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f40f395-5a02b62e ; - phIoT:curStatus "ok" ; - phIoT:curVal 0 ; core:disMacro "$equipRef $navName" ; phIoT:equipRef _:214466de-7abb28a7 ; - his:hisAppendNA 30 ; - point:hisCollectInterval 5 ; - point:hisCollectWriteFreq 15 ; - his:hisEnd 2021-07-27T15:55:00-06:00^^xsd:dateTime ; - his:hisSize 413063 ; - his:hisStart 2017-08-08T09:25:00-06:00^^xsd:dateTime ; - phIoT:hisStatus "ok" ; ph:kind "Number" ; core:navName "Damper" ; phIoT:siteRef _:211601cb-e3e5e9b3 ; @@ -125,9 +73,6 @@ _:214466de-7abb28a7 a phIoT:vav ; phIoT:vav ; rdfs:label "S&TF UFVAV-3" ; _:ahuRef _:21164218-5fab5c91 ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - _:bacnetDeviceId 37034 ; - _:connRef _:211c8a83-ef5c639d ; core:disMacro "$siteRef $navName" ; core:navName "UFVAV-3" ; phIoT:siteRef _:211601cb-e3e5e9b3 ; @@ -142,7 +87,6 @@ _:22f5d821-8e310c3e a phIoT:his-point ; rdfs:label "S&TF UFVAV-3 Schedule" ; core:disMacro "$equipRef $navName" ; phIoT:equipRef _:214466de-7abb28a7 ; - _:hisFunc "calcMirrorHisPoint(_,_,_,_,@p:stm_campus:r:22f4de28-7e5ea4aa)" ; ph:kind "Bool" ; core:navName "Schedule" ; phIoT:siteRef _:211601cb-e3e5e9b3 ; @@ -150,32 +94,16 @@ _:22f5d821-8e310c3e a phIoT:his-point ; ph:tz "Denver" ; _:mod 2019-01-09T16:21:30.397Z^^xsd:dateTime . -_:211c90b7-f2430aa1 a bacnet:bacnetPoint ; - ph:hasTag bacnet:bacnetPoint, - phIoT:cur, +_:211c90b7-f2430aa1 a phIoT:his-point ; + ph:hasTag phIoT:cur, phIoT:his, - point:hisCollectCov, phIoT:point, phIoT:sensor, phIoT:unocc ; rdfs:label "S&TF UFVAV-3 Unocc Override" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "BI6" ; - _:bacnetDis "UNOCC OVRD" ; - _:bacnetObjectType "BINARY_INPUT" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f40f395-5a02b62e ; - phIoT:curStatus "ok" ; - phIoT:curVal false ; core:disMacro "$equipRef $navName" ; ph:enum "OFF,ON" ; phIoT:equipRef _:214466de-7abb28a7 ; - point:hisCollectWriteFreq 15 ; - his:hisEnd 2021-06-26T07:22:22-06:00^^xsd:dateTime ; - phIoT:hisMode "cov" ; - his:hisSize 409 ; - his:hisStart 2017-08-08T09:22:23-06:00^^xsd:dateTime ; - phIoT:hisStatus "ok" ; ph:kind "Bool" ; core:navName "Unocc Override" ; phIoT:siteRef _:211601cb-e3e5e9b3 ; diff --git a/tests/files/data/sample_skyspark_vav_target.ttl b/tests/files/data/sample_skyspark_vav_target.ttl deleted file mode 100644 index 6af4e31..0000000 --- a/tests/files/data/sample_skyspark_vav_target.ttl +++ /dev/null @@ -1,185 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix xsd: . -@prefix owl: . -@prefix core: . -@prefix conn: . -@prefix his: . -@prefix ph: . -@prefix bacnet: . -@prefix phScience: . -@prefix phIoT: . -@prefix point: . -@prefix sql: . -@prefix _: . - -ph:hasTag a owl:ObjectProperty ; - rdfs:range ph:marker . - -_:211c90ab-701fa511 a bacnet:bacnetPoint ; - a phIoT:air-temp-sensor ; - ph:hasTag - # phScience:air, - # bacnet:bacnetPoint, - # phIoT:his, - # phIoT:point, - # phIoT:sensor, - # phScience:temp, - phIoT:zone ; - rdfs:label "S&TF UFVAV-3 Zone Temp" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "AI5" ; - _:bacnetDis "RM TEMP" ; - bacnet:bacnetHis "TL3" ; - _:bacnetObjectType "ANALOG_INPUT" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f4a131c-3f1fcc51 ; - phIoT:curStatus "unknown" ; - core:disMacro "$equipRef $navName" ; - phIoT:equipRef _:214466de-7abb28a7 ; - his:hisAppendNA 30 ; - - his:hisSize 31997 ; - - phIoT:hisStatus "ok" ; - ph:kind "Number" ; - core:navName "Zone Temp" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - sql:sqlConnRef _:24a0194c-adac2f1d ; - _:sqlTable "CopperCube_SERF_STF_Area_37034_TL3" ; - _:sqlTz "America/Phoenix" ; - ph:tz "Denver" ; - ph:unit "\u00b0F" . - -_:211c90b6-52117d4d a bacnet:bacnetPoint ; - a phIoT:air-temp-sp ; - ph:hasTag - # phScience:air, - # bacnet:bacnetPoint, - # phIoT:cur, - # phIoT:his, - # phIoT:point, - # phIoT:sp, - # phScience:temp, - phIoT:zone ; - rdfs:label "S&TF UFVAV-3 Zone Temp Setpt" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "AV11" ; - _:bacnetDis "RM TEMP STPT" ; - _:bacnetObjectType "ANALOG_VALUE" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f40f395-5a02b62e ; - phIoT:curStatus "ok" ; - phIoT:curVal 74 ; - core:disMacro "$equipRef $navName" ; - phIoT:equipRef _:214466de-7abb28a7 ; - his:hisAppendNA 30 ; - point:hisCollectInterval 5 ; - point:hisCollectWriteFreq 15 ; - - his:hisSize 405276 ; - - phIoT:hisStatus "ok" ; - ph:kind "Number" ; - core:navName "Zone Temp Setpt" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - ph:tz "Denver" ; - ph:unit "\u00b0F" . - -_:211c90b6-0da18cd7 a bacnet:bacnetPoint ; - a phIoT:point ; - ph:hasTag phScience:air, - # bacnet:bacnetPoint, - phIoT:cmd, - # phIoT:cur, - phIoT:damper, - phIoT:discharge ; - # phIoT:his, - # phIoT:point - rdfs:label "S&TF UFVAV-3 Damper" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "AV7" ; - _:bacnetDis "DMP POS" ; - _:bacnetObjectType "ANALOG_VALUE" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f40f395-5a02b62e ; - phIoT:curStatus "ok" ; - phIoT:curVal 0 ; - core:disMacro "$equipRef $navName" ; - phIoT:equipRef _:214466de-7abb28a7 ; - his:hisAppendNA 30 ; - point:hisCollectInterval 5 ; - point:hisCollectWriteFreq 15 ; - - his:hisSize 405259 ; - - phIoT:hisStatus "ok" ; - ph:kind "Number" ; - core:navName "Damper" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - ph:tz "Denver" ; - ph:unit "%" . - -_:214466de-7abb28a7 a phIoT:vav ; - ph:hasTag phIoT:equip, - phIoT:vav ; - rdfs:label "S&TF UFVAV-3" ; - _:ahuRef _:21164218-5fab5c91 ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - _:bacnetDeviceId 37034 ; - _:connRef _:211c8a83-ef5c639d ; - core:disMacro "$siteRef $navName" ; - core:navName "UFVAV-3" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 . - -_:22f5d821-8e310c3e a phIoT:his-point ; - ph:hasTag phIoT:his, - phIoT:occupied, - phIoT:point, - phIoT:sensor ; - rdfs:label "S&TF UFVAV-3 Schedule" ; - core:disMacro "$equipRef $navName" ; - phIoT:equipRef _:214466de-7abb28a7 ; - _:hisFunc "calcMirrorHisPoint(_,_,_,_,@p:stm_campus:r:22f4de28-7e5ea4aa)" ; - ph:kind "Bool" ; - core:navName "Schedule" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - ph:tz "Denver" . - -_:211c90b7-f2430aa1 a bacnet:bacnetPoint ; - ph:hasTag - # bacnet:bacnetPoint, - # phIoT:cur, - # phIoT:his, - # point:hisCollectCov, - # phIoT:point, - phIoT:sensor, - phIoT:unocc ; - rdfs:label "S&TF UFVAV-3 Unocc Override" ; - bacnet:bacnetConnRef _:211c8a83-ef5c639d ; - bacnet:bacnetCur "BI6" ; - _:bacnetDis "UNOCC OVRD" ; - _:bacnetObjectType "BINARY_INPUT" ; - _:connRef _:211c8a83-ef5c639d ; - conn:connTuningRef _:1f40f395-5a02b62e ; - phIoT:curStatus "ok" ; - phIoT:curVal false ; - core:disMacro "$equipRef $navName" ; - ph:enum "OFF,ON" ; - phIoT:equipRef _:214466de-7abb28a7 ; - point:hisCollectWriteFreq 15 ; - - phIoT:hisMode "cov" ; - his:hisSize 409 ; - - phIoT:hisStatus "ok" ; - ph:kind "Bool" ; - core:navName "Unocc Override" ; - phIoT:siteRef _:211601cb-e3e5e9b3 ; - phIoT:spaceRef _:2184f1be-29c172a8 ; - ph:tz "Denver" .