Skip to content

Commit e8ec604

Browse files
authored
Merge pull request #160 from NREL/develop
Release 0.12.1
2 parents a0628dc + 56a8a69 commit e8ec604

File tree

99 files changed

+319
-193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+319
-193
lines changed
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Test with OpenStudio container
2+
name: test_with_openstudio
3+
on: push
4+
5+
jobs:
6+
test-gems-latest:
7+
runs-on: ubuntu-latest
8+
env:
9+
BRANCH_NAME: ${{ github.ref_name }}
10+
BUILD_NUMBER: ${{ github.run_number }}
11+
DEPLOY_PATH: ${{ github.repository }}/${{ github.ref_name }}/${{ github.run_number }} # Path for S3 deployment
12+
S3_BUCKET: ext-gem-dashboard
13+
14+
container: # Define the Docker container for the job. All subsequent steps run inside it.
15+
image: nrel/openstudio:3.10.0
16+
options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally
17+
18+
steps:
19+
- name: Checkout Repository
20+
# The repository will be checked out inside the 'nrel/openstudio:3.10.0' container
21+
uses: actions/checkout@v4 # Use v4 for better security and features
22+
with:
23+
submodules: true # Set to true if your repository uses Git submodules
24+
25+
- name: Install Node.js and AWS CLI
26+
# Install required dependencies for AWS actions to work in the OpenStudio container
27+
shell: bash
28+
run: |
29+
echo "Installing Node.js and AWS CLI..."
30+
31+
# Update package list
32+
apt-get update
33+
34+
# Install curl and other dependencies
35+
apt-get install -y curl unzip
36+
37+
# Install Node.js (using NodeSource repository for latest LTS)
38+
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
39+
apt-get install -y nodejs
40+
41+
# Install AWS CLI v2
42+
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
43+
unzip awscliv2.zip
44+
./aws/install
45+
46+
# Verify installations
47+
echo "Node.js version: $(node --version)"
48+
echo "npm version: $(npm --version)"
49+
echo "AWS CLI version: $(aws --version)"
50+
51+
# Clean up
52+
rm -rf awscliv2.zip aws/
53+
54+
- name: Verify Environment and Run Measures
55+
# All 'run' commands in this job now execute inside the specified Docker container.
56+
shell: bash # Specify the shell if needed, though bash is default for Ubuntu runners
57+
run: |
58+
# Fix git ownership issue in container
59+
git config --global --add safe.directory /__w/openstudio-load-flexibility-measures-gem/openstudio-load-flexibility-measures-gem
60+
61+
echo "OpenStudio Version: $(openstudio --version)"
62+
echo "Ruby Version: $(ruby -v)"
63+
echo "Listing OpenStudio Gems: $(openstudio gem_list)"
64+
65+
# Install dependencies before running tests
66+
echo "Installing gem dependencies..."
67+
bundle install
68+
69+
echo "Running spec tests..."
70+
rake spec
71+
echo "Running measures with verbose output:"
72+
# This command will execute within the container.
73+
# Ensure that './lib/measures' is the correct path relative to the checkout.
74+
openstudio --verbose measure -r ./lib/measures
75+
76+
# The output for 'test' should now be generated directly into the workspace
77+
# within the container, which is mounted from the host.
78+
# No 'docker cp' is needed as the workspace is shared.
79+
ls -al ./test # Verify the output directory exists and contains files
80+
81+
- name: Configure AWS Credentials
82+
# This step is crucial for authenticating with AWS S3
83+
uses: aws-actions/configure-aws-credentials@v4 # Use v4 for updated features
84+
with:
85+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
86+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} # Assuming this is your secret name
87+
aws-region: ${{ secrets.AWS_DEFAULT_REGION }} # Replace with your AWS region, e.g., us-east-1
88+
89+
- name: Sync files to S3 with branch and build in path
90+
shell: bash
91+
run: |
92+
echo "Deploying to s3://${{ env.S3_BUCKET }}/${{ env.DEPLOY_PATH }}/"
93+
# Ensure './test_results' is the correct source directory for the files to upload to S3.
94+
dir_name=$(find -type d -name "test_results")
95+
# It must match the output directory from the 'Run Measures' step.
96+
aws s3 sync $dir_name s3://${{ env.S3_BUCKET }}/${{ env.DEPLOY_PATH }}/ \
97+
--delete \
98+
--acl public-read \
99+
--cache-control "max-age=0, no-cache, no-store, must-revalidate"
100+
echo "S3 sync complete."
101+
echo "https://${{ env.S3_BUCKET }}.s3.amazonaws.com/${{ env.DEPLOY_PATH }}/dashboard/index.html"
102+
echo dir_name=$dir_name >> $GITHUB_ENV # Save the directory name to an environment variable for later use
103+
104+
- name: Archive static site as artifact
105+
uses: actions/upload-artifact@v4
106+
with:
107+
name: static-html-artifact
108+
path: ${{ env.dir_name }} # Path should be relative to the GitHub workspace, which is shared with the container

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# OpenStudio Model Articulation Gems
22

3+
## Version 0.12.1
4+
* Updated measure XML files for metadata consistency
5+
* Minor updates to README and license templates
6+
* Maintenance and compatibility improvements
7+
* Version and gemspec updates in preparation for release
8+
9+
## Version 0.12.0
10+
* Support for OpenStudio 3.10 (upgrade to standards gem 0.8.2, extension gem 0.9.1)
11+
* todo add log after finalize bug fixes for this release
12+
313
## Version 0.11.1
414
* Update 'story_multiplier' argument to 'story_multiplier_method' for create_bar_from_building_type_ratios measure
515
* Update dependencies for 3.9

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/NREL/cbci_jenkins_libs
22

3-
@Library('cbci_shared_libs@developExtension') _
3+
@Library('cbci_shared_libs') _
44

55
// Build for PR to develop branch only.
66
if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { // check if set

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
OpenStudio(R), Copyright (c) 2008, 2024 Alliance for Sustainable Energy, LLC.
1+
OpenStudio(R), Copyright (c) 2008, 2025 Alliance for Sustainable Energy, LLC.
22

33
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
44

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ bundle exec rake openstudio:test_with_openstudio
5151

5252
|OpenStudio Model Articulation Gem|OpenStudio|Ruby|
5353
|:--------------:|:----------:|:--------:|
54+
| 0.12.1 | 3.10 | 3.2.2 |
55+
| 0.12.0 | 3.10 | 3.2.2 |
56+
| 0.11.1 | 3.9 | 3.2.2 |
5457
| 0.11.0 | 3.9 | 3.2.2 |
5558
| 0.10.0 | 3.8 | 3.2.2 |
5659
| 0.9.0 | 3.7 | 2.7 |

doc_templates/LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
OpenStudio(R), Copyright (c) 2008, 2023 Alliance for Sustainable Energy, LLC.
1+
OpenStudio(R), Copyright (c) 2008, 2025 Alliance for Sustainable Energy, LLC.
22

33
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
44

lib/measures/AssignConstructionSetToBuilding/LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
OpenStudio(R), Copyright (c) 2008, 2024 Alliance for Sustainable Energy, LLC.
1+
OpenStudio(R), Copyright (c) 2008, 2025 Alliance for Sustainable Energy, LLC.
22

33
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
44

lib/measures/AssignConstructionSetToBuilding/measure.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>assign_construction_set_to_building</name>
55
<uid>6e68ddea-2cff-47a3-9daf-f2189e4cf132</uid>
6-
<version_id>454bef55-1773-438b-bdad-c12d6f50070f</version_id>
7-
<version_modified>2024-11-16T23:56:31Z</version_modified>
6+
<version_id>8c850fd3-2cee-408d-9406-edccc599cb38</version_id>
7+
<version_modified>2025-08-01T14:58:30Z</version_modified>
88
<xml_checksum>1E963D9C</xml_checksum>
99
<class_name>AssignConstructionSetToBuilding</class_name>
1010
<display_name>AssignConstructionSetToBuilding</display_name>
@@ -17,10 +17,10 @@
1717
<type>Choice</type>
1818
<required>true</required>
1919
<model_dependent>false</model_dependent>
20-
<default_value>{125b021d-d9ad-4dd9-a041-cddef79641bc}</default_value>
20+
<default_value>{2ac6b06b-e158-4220-bae9-a2110789d808}</default_value>
2121
<choices>
2222
<choice>
23-
<value>{125b021d-d9ad-4dd9-a041-cddef79641bc}</value>
23+
<value>{2ac6b06b-e158-4220-bae9-a2110789d808}</value>
2424
<display_name>&lt;clear field&gt;</display_name>
2525
</choice>
2626
</choices>
@@ -48,7 +48,7 @@
4848
<filename>LICENSE.md</filename>
4949
<filetype>md</filetype>
5050
<usage_type>license</usage_type>
51-
<checksum>8696A072</checksum>
51+
<checksum>CBFF29F5</checksum>
5252
</file>
5353
<file>
5454
<filename>README.md</filename>

lib/measures/AssignSpaceTypeBySpaceName/LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
OpenStudio(R), Copyright (c) 2008, 2024 Alliance for Sustainable Energy, LLC.
1+
OpenStudio(R), Copyright (c) 2008, 2025 Alliance for Sustainable Energy, LLC.
22

33
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
44

lib/measures/AssignSpaceTypeBySpaceName/measure.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>assign_space_type_by_space_name</name>
55
<uid>69ad41bb-cdfe-4a4c-a385-9efaf35b7c27</uid>
6-
<version_id>b93cb317-a6aa-4bde-a89e-d2768b8a99df</version_id>
7-
<version_modified>2024-11-16T23:56:37Z</version_modified>
6+
<version_id>0519ad27-85f3-42bd-bd06-2e7ac675d122</version_id>
7+
<version_modified>2025-08-01T14:58:35Z</version_modified>
88
<xml_checksum>057E8D9D</xml_checksum>
99
<class_name>AssignSpaceTypeBySpaceName</class_name>
1010
<display_name>AssignSpaceTypeBySpaceName</display_name>
@@ -24,10 +24,10 @@
2424
<type>Choice</type>
2525
<required>true</required>
2626
<model_dependent>false</model_dependent>
27-
<default_value>{31980ac2-a69b-41f5-929e-7105d11665ad}</default_value>
27+
<default_value>{afe72be4-6225-4fd5-8bc2-86ffc52c6655}</default_value>
2828
<choices>
2929
<choice>
30-
<value>{31980ac2-a69b-41f5-929e-7105d11665ad}</value>
30+
<value>{afe72be4-6225-4fd5-8bc2-86ffc52c6655}</value>
3131
<display_name>&lt;clear field&gt;</display_name>
3232
</choice>
3333
</choices>
@@ -73,7 +73,7 @@
7373
<filename>LICENSE.md</filename>
7474
<filetype>md</filetype>
7575
<usage_type>license</usage_type>
76-
<checksum>8696A072</checksum>
76+
<checksum>CBFF29F5</checksum>
7777
</file>
7878
<file>
7979
<filename>README.md</filename>

0 commit comments

Comments
 (0)