Skip to content

Commit

Permalink
Update failure check
Browse files Browse the repository at this point in the history
  • Loading branch information
jslane-h committed Dec 20, 2024
1 parent a68e8f5 commit 6bb9302
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 45 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,12 @@ jobs:
- name: Build and run unit test Dockerfile
uses: ./.github/actions/unit-test-action

# - name: Build Docker image
# run: |
# docker build -t python_measure_test .
# docker run --rm python_measure_test

- name: Check for FAILURE in measure_check_output.txt
- name: Check for changes in measure_check_output.txt
run: |
cat test_results/measure_check_output.txt
# cat test_results/pytest_output.txt
# if grep -q 'FAILURE' test_results/pytest_output.txt; then
# exit 1
# fi
if grep -q "Changes detected" test_results/measure_check_output.txt; then
echo "Measure XML update required. Run 'openstudio measure -t ./lib/measures'"
exit 1
fi
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>constrain_supply_air_temperature_reset_verification</name>
<uid>7f59756b-16e7-4bb2-a122-7e7a3a8bfbc6</uid>
<version_id>54f5d1b9-a933-4ecb-96c6-11f954165f26</version_id>
<version_modified>2024-09-30T22:52:39Z</version_modified>
<version_id>c07b4d70-6bd7-47f5-9b25-0d90b6f49bae</version_id>
<version_modified>2024-12-20T19:07:17Z</version_modified>
<xml_checksum>6A20E99B</xml_checksum>
<class_name>ConstrainSupplyAirTemperatureResetVerification</class_name>
<display_name>Supply Air Temperature Reset Verification</display_name>
Expand Down Expand Up @@ -67,7 +67,7 @@
<filename>LICENSE.md</filename>
<filetype>md</filetype>
<usage_type>license</usage_type>
<checksum>00000000</checksum>
<checksum>67DFE812</checksum>
</file>
<file>
<filename>README.md</filename>
Expand All @@ -84,7 +84,7 @@
<filename>measure.py</filename>
<filetype>py</filetype>
<usage_type>script</usage_type>
<checksum>6CDC5A23</checksum>
<checksum>F5C61748</checksum>
</file>
<file>
<filename>__init__.py</filename>
Expand All @@ -108,7 +108,7 @@
<filename>test_measure.py</filename>
<filetype>py</filetype>
<usage_type>test</usage_type>
<checksum>E483C774</checksum>
<checksum>820C8890</checksum>
</file>
</files>
</measure>
30 changes: 11 additions & 19 deletions lib/measures/CreateTypicalBuilding/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>create_typical_building</name>
<uid>fa93dfc5-9f4f-4f8f-9db7-3aa5ccf38e5d</uid>
<version_id>57ae1469-01ed-4d84-9d70-86ae11df35e0</version_id>
<version_modified>2024-06-27T21:00:44Z</version_modified>
<version_id>38af08af-ff25-483e-b4de-50a0d9c9a027</version_id>
<version_modified>2024-12-20T19:07:27Z</version_modified>
<xml_checksum>6CE0A70A</xml_checksum>
<class_name>CreateTypicalBuilding</class_name>
<display_name>Create Typical Building</display_name>
Expand Down Expand Up @@ -221,6 +221,10 @@
<value>Existing HVAC</value>
<display_name>Existing HVAC</display_name>
</choice>
<choice>
<value>Inferred</value>
<display_name>Inferred</display_name>
</choice>
<choice>
<value>JSON specified</value>
<display_name>JSON specified</display_name>
Expand Down Expand Up @@ -902,25 +906,13 @@
<filename>LICENSE.md</filename>
<filetype>md</filetype>
<usage_type>license</usage_type>
<checksum>7C2CADD0</checksum>
<checksum>EAF3EFF6</checksum>
</file>
<file>
<filename>README.md</filename>
<filetype>md</filetype>
<usage_type>readme</usage_type>
<checksum>5208BBA1</checksum>
</file>
<file>
<filename>README.md.erb</filename>
<filetype>erb</filetype>
<usage_type>readmeerb</usage_type>
<checksum>F1C26127</checksum>
</file>
<file>
<filename>.gitkeep</filename>
<filetype>gitkeep</filetype>
<usage_type>doc</usage_type>
<checksum>00000000</checksum>
<checksum>28346E7B</checksum>
</file>
<file>
<version>
Expand All @@ -931,13 +923,13 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>A52F4719</checksum>
<checksum>FC46D139</checksum>
</file>
<file>
<filename>create_typical_resources.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>1E789C5E</checksum>
<checksum>3CBA4D47</checksum>
</file>
<file>
<filename>create_typical_building_test.rb</filename>
Expand All @@ -955,7 +947,7 @@
<filename>source/ASHRAESmallOffice.osm</filename>
<filetype>osm</filetype>
<usage_type>test</usage_type>
<checksum>ECC84F01</checksum>
<checksum>5ECE7EF1</checksum>
</file>
<file>
<filename>source/hvac_mapping_path/hvac_zone_mapping.json</filename>
Expand Down
10 changes: 5 additions & 5 deletions lib/measures/GenerateConStrainReport/measure.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
<measure>
<schema_version>3.1</schema_version>
<error>Failed to infer measure name from '/mnt/c/OSSTD_repos/openstudio-building-energy-standard-measures-gem/./lib/measures/GenerateConStrainReport/measure.py'</error>
<error>Failed to infer measure name from 'C:/Users/slan572/repos/openstudio-building-energy-standard-measures-gem/lib/measures/GenerateConStrainReport/measure.py'</error>
<name>generate_constrain_report</name>
<uid>5cd98b4e-ddfe-44ab-9dca-d9885f57a316</uid>
<version_id>379648d5-0c18-45b2-9fed-3df585a419d8</version_id>
<version_modified>2024-08-29T17:41:59Z</version_modified>
<version_id>beba0f97-3b84-4f19-90e6-a49358e38933</version_id>
<version_modified>2024-12-20T19:11:08Z</version_modified>
<xml_checksum>7C9D3672</xml_checksum>
<class_name>GenerateConStrainReport</class_name>
<display_name>Generate a ConStrain report.</display_name>
Expand Down Expand Up @@ -48,7 +48,7 @@
<filename>LICENSE.md</filename>
<filetype>md</filetype>
<usage_type>license</usage_type>
<checksum>00000000</checksum>
<checksum>1A54BA1E</checksum>
</file>
<file>
<filename>README.md</filename>
Expand Down Expand Up @@ -101,7 +101,7 @@
<filename>test_measure.py</filename>
<filetype>py</filetype>
<usage_type>test</usage_type>
<checksum>EA55421A</checksum>
<checksum>609009C1</checksum>
</file>
</files>
</measure>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0"?>
<measure>
<schema_version>3.1</schema_version>
<error>Failed to infer measure name from 'C:/Users/slan572/repos/openstudio-building-energy-standard-measures-gem/lib/measures/GenerateIPLVChillerElectricEIRPerformanceCurves/measure.py'</error>
<name>generate_iplv_specific_chiller_performance_curves_for_chillers</name>
<uid>5cd98b4e-ddfe-44ab-9dca-d9885f57a216</uid>
<version_id>9eeccbb6-7517-4337-9feb-fcee913c7cf8</version_id>
<version_modified>2024-04-24T19:59:05Z</version_modified>
<version_id>3dc83fc9-b161-4925-b236-6e63e6afc1ec</version_id>
<version_modified>2024-12-20T19:07:28Z</version_modified>
<xml_checksum>905C4D50</xml_checksum>
<class_name>GenerateIPLVChillerElectricEIRPerformanceCurves</class_name>
<display_name>Generate IPLV-specific Chiller Performance Curves for Chillers (Chiller:Electric:EIR).</display_name>
Expand Down
6 changes: 3 additions & 3 deletions lib/measures/PerformanceRatingMethod/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>create_baseline_building</name>
<uid>a984a630-2a41-45fd-80ec-6454777bf253</uid>
<version_id>6d81dd33-9c51-47f5-a1e3-c0fcfac0322f</version_id>
<version_modified>2024-04-30T17:17:19Z</version_modified>
<version_id>0b643cb2-eaed-4217-b163-7cb4d3a94fbf</version_id>
<version_modified>2024-12-20T19:07:28Z</version_modified>
<xml_checksum>8FF2A4FA</xml_checksum>
<class_name>CreateBaselineBuilding</class_name>
<display_name>Create ASHRAE 90.1-2019 PRM Model</display_name>
Expand Down Expand Up @@ -614,7 +614,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>0E314AA6</checksum>
<checksum>C7F8661D</checksum>
</file>
<file>
<filename>ASHRAE9012019PRM_Test.rb</filename>
Expand Down

0 comments on commit 6bb9302

Please sign in to comment.