urbanopt-cli 0.9.0 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/nightly_build.yml +60 -0
- data/CHANGELOG.md +12 -0
- data/CMakeLists.txt +8 -8
- data/FindOpenStudioSDK.cmake +10 -10
- data/LICENSE.md +1 -1
- data/README.md +25 -23
- data/Rakefile +1 -1
- data/example_files/Gemfile +2 -0
- data/example_files/mappers/Baseline.rb +155 -155
- data/example_files/mappers/ClassProject.rb +4 -4
- data/example_files/mappers/CreateBar.rb +1 -1
- data/example_files/mappers/EvCharging.rb +1 -1
- data/example_files/mappers/FlexibleHotWater.rb +1 -1
- data/example_files/mappers/Floorspace.rb +1 -1
- data/example_files/mappers/HighEfficiency.rb +1 -1
- data/example_files/mappers/HighEfficiencyCreateBar.rb +1 -1
- data/example_files/mappers/HighEfficiencyFloorspace.rb +1 -1
- data/example_files/mappers/PeakHoursMelsShedding.rb +1 -1
- data/example_files/mappers/PeakHoursThermostatAdjust.rb +1 -1
- data/example_files/mappers/ThermalStorage.rb +1 -1
- data/example_files/measures/BuildResidentialModel/measure.rb +3 -3
- data/example_files/measures/BuildResidentialModel/measure.xml +3 -3
- data/example_files/measures/BuildResidentialModel/resources/util.rb +45 -45
- data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/measure.rb +7 -0
- data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/measure.xml +18 -10
- data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/resources/schedules.rb +15 -0
- data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/tests/build_residential_schedule_file_test.rb +53 -5
- data/example_files/resources/hpxml-measures/Changelog.md +39 -28
- data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/measure.xml +27 -27
- data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/battery.rb +9 -4
- data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hpxml_defaults.rb +5 -4
- data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/version.rb +2 -2
- data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/waterheater.rb +5 -1
- data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_defaults.rb +28 -10
- data/example_files/resources/hpxml-measures/ReportSimulationOutput/measure.rb +6 -1
- data/example_files/resources/hpxml-measures/ReportSimulationOutput/measure.xml +3 -3
- data/example_files/resources/hpxml-measures/docs/source/usage_instructions.rst +2 -1
- data/example_files/resources/hpxml-measures/docs/source/workflow_inputs.rst +14 -10
- data/example_files/resources/hpxml-measures/docs/source/workflow_outputs.rst +4 -4
- data/example_files/resources/hpxml-measures/workflow/template-run-hpxml-with-stochastic-occupancy-subset.osw +64 -0
- data/example_files/resources/hpxml-measures/workflow/template-run-hpxml-with-stochastic-occupancy.osw +2 -2
- data/example_files/resources/hpxml-measures/workflow/tests/base_results/results.csv +12 -12
- data/example_files/resources/hpxml-measures/workflow/tests/hpxml_translator_test.rb +36 -110
- data/lib/uo_cli/version.rb +2 -2
- data/lib/uo_cli.rb +62 -67
- data/uo_cli.gemspec +3 -1
- metadata +32 -3
- data/requirements.txt +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b8ee2cd09a50121cae55adfc77ef76ea468e1923eb6bfde899e35b193261dd4
|
4
|
+
data.tar.gz: '08b77907722db1cbc4465a8864735545dfe55b8f9820e7da1e93b1348bd3e860'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d078d451cc11e8eff4ea463a2bf5e40d3c28d8ae3551036de31f9c2a4432bd564b67ec03f1753fd64bf2a12ecd4eb088c71f15bd36508af91cdca9dd0e84a849
|
7
|
+
data.tar.gz: f3f2ceb4c12281606e52a5f9a2977cf4eab015dad74c9456cf75c89d655149638686ae8eb9c6778cb8c3e03750ebab2ee34d97d8d60883ae4351c950fe419a2b
|
@@ -0,0 +1,60 @@
|
|
1
|
+
name: nightly_build
|
2
|
+
|
3
|
+
on:
|
4
|
+
# push:
|
5
|
+
schedule:
|
6
|
+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
|
7
|
+
# 5:24 am UTC (11:24pm MDT the day before) every weekday night in MDT
|
8
|
+
- cron: '24 5 * * 2-6'
|
9
|
+
|
10
|
+
env:
|
11
|
+
# Favor_Local_Gems enforces develop branch of all Ruby dependencies
|
12
|
+
# This is our canary in the coal mine! If any simulation tests fail, comment this and retry.
|
13
|
+
# If CI is then successful, we have a breaking change in a dependency somewhere.
|
14
|
+
FAVOR_LOCAL_GEMS: true
|
15
|
+
GEM_DEVELOPER_KEY: ${{ secrets.GEM_DEVELOPER_KEY }}
|
16
|
+
UO_NUM_PARALLEL: 2
|
17
|
+
# GHA machines only have 2 cores. Trying to run more than that is even slower.
|
18
|
+
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
|
19
|
+
|
20
|
+
jobs:
|
21
|
+
weeknight-tests:
|
22
|
+
# ubuntu-latest works since https://github.com/rbenv/ruby-build/releases/tag/v20220710 (July 10, 2022)
|
23
|
+
# https://github.com/rbenv/ruby-build/discussions/1940
|
24
|
+
runs-on: ubuntu-latest
|
25
|
+
container:
|
26
|
+
image: docker://nrel/openstudio:3.5.1
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v3
|
29
|
+
- name: Set up Python
|
30
|
+
uses: actions/setup-python@v4
|
31
|
+
with:
|
32
|
+
# Disco needs python 3.10
|
33
|
+
python-version: '3.10'
|
34
|
+
- name: Install Ruby dependencies
|
35
|
+
run: |
|
36
|
+
ruby --version
|
37
|
+
bundle update
|
38
|
+
bundle exec certified-update
|
39
|
+
- name: Install python dependencies
|
40
|
+
run: bundle exec uo install_python
|
41
|
+
- name: Run Rspec
|
42
|
+
continue-on-error: true
|
43
|
+
# Continue to upload step even if a test fails, so we can troubleshoot
|
44
|
+
run: bundle exec rspec
|
45
|
+
- name: Upload artifacts
|
46
|
+
# Save results for examination - useful for debugging
|
47
|
+
uses: actions/upload-artifact@v3
|
48
|
+
if: failure() # Only upload if rspec fails
|
49
|
+
with:
|
50
|
+
name: rspec_results
|
51
|
+
path: |
|
52
|
+
spec/test_directory**/run/
|
53
|
+
# coverage/
|
54
|
+
retention-days: 7 # save for 1 week before deleting
|
55
|
+
# coveralls action docs: https://github.com/marketplace/actions/coveralls-github-action
|
56
|
+
# - name: Coveralls
|
57
|
+
# uses: coverallsapp/github-action@1.1.3
|
58
|
+
# with:
|
59
|
+
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
60
|
+
# path-to-lcov: "./coverage/lcov/urbanopt-cli.lcov"
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Version 0.9.2
|
4
|
+
Date Range: 01/06/23 - 04/11/23:
|
5
|
+
|
6
|
+
- Fixed [#417]( https://github.com/urbanopt/urbanopt-cli/pull/417 ), pin addressable dependency to resolve unicode_normalize error
|
7
|
+
- Fixed [#397]( https://github.com/urbanopt/urbanopt-cli/pull/397 ), New tests for GEB mappers
|
8
|
+
|
9
|
+
## Version 0.9.1
|
10
|
+
Date Range: 12/14/22 - 01/05/23:
|
11
|
+
|
12
|
+
- Updates to support HPXML to 1.5.1 and OpenStudio 3.5.1
|
13
|
+
- Updated copyrights for 2023
|
14
|
+
|
3
15
|
## Version 0.9.0
|
4
16
|
Date Range: 07/07/22 - 12/13/22:
|
5
17
|
|
data/CMakeLists.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
cmake_minimum_required(VERSION 3.10.2)
|
2
2
|
cmake_policy(SET CMP0048 NEW)
|
3
3
|
|
4
|
-
project(URBANoptCLI VERSION 0.
|
4
|
+
project(URBANoptCLI VERSION 0.9.1)
|
5
5
|
|
6
6
|
include(FindOpenStudioSDK.cmake)
|
7
7
|
|
@@ -89,16 +89,16 @@ option(BUILD_PACKAGE "Build package" OFF)
|
|
89
89
|
# need to update the MD5sum for each platform and url below
|
90
90
|
if(UNIX)
|
91
91
|
if(APPLE)
|
92
|
-
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-
|
93
|
-
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "
|
92
|
+
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20230111-darwin.tar.gz")
|
93
|
+
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "dfb4d2d28d6ff25b42d8e375b4435be2")
|
94
94
|
else()
|
95
|
-
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-
|
96
|
-
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "
|
95
|
+
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20230111-linux.tar.gz")
|
96
|
+
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "2edb06d97ea496a3b3929a780404bb05")
|
97
97
|
endif()
|
98
98
|
elseif(WIN32)
|
99
99
|
if(CMAKE_CL_64)
|
100
|
-
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-
|
101
|
-
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "
|
100
|
+
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20230111-windows.tar.gz")
|
101
|
+
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "ecbad071c3aba2223e9ad5803c8004d8")
|
102
102
|
endif()
|
103
103
|
endif()
|
104
104
|
|
@@ -211,7 +211,7 @@ elseif(UNIX)
|
|
211
211
|
# set(CPACK_DEBIAN_PACKAGE_DEBUG ON)
|
212
212
|
|
213
213
|
# These two will set the .deb install path correctly
|
214
|
-
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqdbm14,sqlite3,libgomp1")
|
214
|
+
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqdbm14,sqlite3,libgomp1,libncurses5")
|
215
215
|
set(CPACK_SET_DESTDIR ON)
|
216
216
|
set(CPACK_INSTALL_PREFIX /usr/local/urbanopt-cli-${URBANOPT_CLI_VERSION})
|
217
217
|
|
data/FindOpenStudioSDK.cmake
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
set(OPENSTUDIO_VERSION_MAJOR 3)
|
2
|
-
set(OPENSTUDIO_VERSION_MINOR
|
3
|
-
set(OPENSTUDIO_VERSION_PATCH
|
2
|
+
set(OPENSTUDIO_VERSION_MINOR 5)
|
3
|
+
set(OPENSTUDIO_VERSION_PATCH 1)
|
4
4
|
set(OPENSTUDIO_VERSION "${OPENSTUDIO_VERSION_MAJOR}.${OPENSTUDIO_VERSION_MINOR}.${OPENSTUDIO_VERSION_PATCH}")
|
5
5
|
|
6
6
|
find_package(openstudio "${OPENSTUDIO_VERSION}" CONFIG)
|
@@ -16,23 +16,23 @@ else()
|
|
16
16
|
set(OPENSTUDIO_BASELINK "https://openstudio-builds.s3.amazonaws.com/${OPENSTUDIO_VERSION}"
|
17
17
|
CACHE STRING "Base link to where the openstudio archives are hosted" FORCE)
|
18
18
|
|
19
|
-
set(OPENSTUDIO_VERSION_SHA "+
|
19
|
+
set(OPENSTUDIO_VERSION_SHA "+22e1db7be5")
|
20
20
|
|
21
21
|
if(APPLE)
|
22
|
-
set(OPENSTUDIO_EXPECTED_HASH
|
23
|
-
set(OPENSTUDIO_PLATFORM "Darwin")
|
22
|
+
set(OPENSTUDIO_EXPECTED_HASH f21b03a44aa9ac3e52a4bdfa20009171)
|
23
|
+
set(OPENSTUDIO_PLATFORM "Darwin-x86_64")
|
24
24
|
set(OPENSTUDIO_EXT "tar.gz")
|
25
25
|
elseif(UNIX)
|
26
26
|
if(LSB_RELEASE_VERSION_SHORT MATCHES "20.04")
|
27
|
-
set(OPENSTUDIO_EXPECTED_HASH
|
27
|
+
set(OPENSTUDIO_EXPECTED_HASH 6e5c93002f0cfb445dcdcdb1270261a4)
|
28
|
+
set(OPENSTUDIO_PLATFORM "Ubuntu-20.04")
|
29
|
+
else() # Assumes 20.04
|
30
|
+
set(OPENSTUDIO_EXPECTED_HASH 6e5c93002f0cfb445dcdcdb1270261a4)
|
28
31
|
set(OPENSTUDIO_PLATFORM "Ubuntu-20.04")
|
29
|
-
else() # Assumes 18.04
|
30
|
-
set(OPENSTUDIO_EXPECTED_HASH 44a837fa96fe2ce1a883492a3a1cae09)
|
31
|
-
set(OPENSTUDIO_PLATFORM "Ubuntu-18.04")
|
32
32
|
endif()
|
33
33
|
set(OPENSTUDIO_EXT "tar.gz")
|
34
34
|
elseif(WIN32)
|
35
|
-
set(OPENSTUDIO_EXPECTED_HASH
|
35
|
+
set(OPENSTUDIO_EXPECTED_HASH bc83efcb140d20f8f9758559a58c4347)
|
36
36
|
set(OPENSTUDIO_PLATFORM "Windows")
|
37
37
|
set(OPENSTUDIO_EXT "tar.gz")
|
38
38
|
endif()
|
data/LICENSE.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# License
|
2
2
|
|
3
|
-
URBANopt™, Copyright (c) 2019-
|
3
|
+
URBANopt™, Copyright (c) 2019-2023, Alliance for Sustainable Energy, LLC, and other
|
4
4
|
contributors. All rights reserved.
|
5
5
|
|
6
6
|
Redistribution and use in source and binary forms, with or without modification,
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
+
[![Coverage Status](https://coveralls.io/repos/github/urbanopt/urbanopt-cli/badge.svg?branch=develop)](https://coveralls.io/github/urbanopt/urbanopt-cli?branch=develop)
|
2
|
+
|
1
3
|
# URBANopt CLI
|
2
4
|
|
3
5
|
This is the command line interface (CLI) for the URBANopt™ SDK.
|
4
6
|
|
5
|
-
## Installation (Using Ruby)
|
7
|
+
## Installation (Using Ruby)
|
6
8
|
|
7
9
|
2 ) Using ruby add this line to your application's Gemfile:
|
8
10
|
|
@@ -25,40 +27,40 @@ gem install urbanopt-cli
|
|
25
27
|
|
26
28
|
## Installation (Using Installer)
|
27
29
|
|
28
|
-
The UrbanOpt installer is an alternate way to install the UrbanOpt CLI that also includes Ruby 2.5.x and OpenStudio SDK.
|
29
|
-
Below are installation instructions for each platform.
|
30
|
+
The UrbanOpt installer is an alternate way to install the UrbanOpt CLI that also includes Ruby 2.5.x and OpenStudio SDK.
|
31
|
+
Below are installation instructions for each platform.
|
30
32
|
|
31
33
|
### Linux (Ubuntu 18.04)
|
32
34
|
|
33
|
-
Download the [.deb package](https://docs.urbanopt.net/installation/linux.html#install-with-the-urbanopt-installer).
|
35
|
+
Download the [.deb package](https://docs.urbanopt.net/installation/linux.html#install-with-the-urbanopt-installer).
|
34
36
|
|
35
37
|
```terminal
|
36
|
-
sudo apt update
|
38
|
+
sudo apt update
|
37
39
|
sudo apt install ./UrbanOptCLI-0.3.1.b6f118d506-Linux.deb
|
38
40
|
```
|
39
41
|
|
40
|
-
This will install to `/usr/local/` directory.
|
41
|
-
e.g.
|
42
|
-
`/usr/local/urbanopt-cli-0.3.1/`
|
42
|
+
This will install to `/usr/local/` directory.
|
43
|
+
e.g.
|
44
|
+
`/usr/local/urbanopt-cli-0.3.1/`
|
43
45
|
|
44
|
-
To run the UrbanOpt CLI, first run the `setup-env.sh` script that generates environmental variables and stores these in `env_uo.sh` in your home directory.
|
46
|
+
To run the UrbanOpt CLI, first run the `setup-env.sh` script that generates environmental variables and stores these in `env_uo.sh` in your home directory.
|
45
47
|
|
46
48
|
```terminal
|
47
|
-
/usr/local/urbanopt-cli-0.3.1/setup-env.sh
|
49
|
+
/usr/local/urbanopt-cli-0.3.1/setup-env.sh
|
48
50
|
. ~/.env_uo.sh
|
49
51
|
```
|
50
52
|
|
51
53
|
When launching new shell terminals run `. ~/.env_uo.sh` to setup the environment.
|
52
54
|
|
53
|
-
### Mac OSX (>= 10.12)
|
55
|
+
### Mac OSX (>= 10.12)
|
54
56
|
|
55
|
-
Download the [.dmg package](https://docs.urbanopt.net/installation/mac.html#install-with-the-urbanopt-installer).
|
57
|
+
Download the [.dmg package](https://docs.urbanopt.net/installation/mac.html#install-with-the-urbanopt-installer).
|
56
58
|
|
57
|
-
Use the GUI installer and choose a directory to install. Once installed, open a terminal and run the provided setup script.
|
58
|
-
The `setup-env.sh` generates env variables and stores them in a file `.env_uo.sh` in your home directory.
|
59
|
+
Use the GUI installer and choose a directory to install. Once installed, open a terminal and run the provided setup script.
|
60
|
+
The `setup-env.sh` generates env variables and stores them in a file `.env_uo.sh` in your home directory.
|
59
61
|
|
60
|
-
```terminal
|
61
|
-
/Applications/UrbanOptCLI_0.3.1/setup-env.sh
|
62
|
+
```terminal
|
63
|
+
/Applications/UrbanOptCLI_0.3.1/setup-env.sh
|
62
64
|
. ~/.env_uo.sh
|
63
65
|
```
|
64
66
|
|
@@ -66,26 +68,26 @@ When launching new shell terminals run `. ~/.env_uo.s` to setup the environment.
|
|
66
68
|
|
67
69
|
### Windows (64-bit Windows 7 – 10)
|
68
70
|
|
69
|
-
Download the [.exe installer](https://docs.urbanopt.net/installation/windows.html#install-with-the-urbanopt-installer).
|
71
|
+
Download the [.exe installer](https://docs.urbanopt.net/installation/windows.html#install-with-the-urbanopt-installer).
|
70
72
|
|
71
73
|
Use the GUI installer and choose a directory to install. Once installed, open a terminal (Powershell, Windows CMD and GitBash are supported) and run the provided setup script for that shell (below are the setup scripts for each respective shell environment).
|
72
74
|
|
73
75
|
|
74
76
|
#### Bash (or GitBash for Windows)
|
75
77
|
```terminal
|
76
|
-
c:/urbanopt-cli-0.3.1/setup-env.sh
|
77
|
-
. ~/.env_uo.sh
|
78
|
+
c:/urbanopt-cli-0.3.1/setup-env.sh
|
79
|
+
. ~/.env_uo.sh
|
78
80
|
```
|
79
81
|
|
80
82
|
#### Powershell
|
81
83
|
```terminal
|
82
|
-
c:\urbanopt-cli-0.3.1\setup-env.ps1
|
83
|
-
. ~\.env_uo.ps1
|
84
|
+
c:\urbanopt-cli-0.3.1\setup-env.ps1
|
85
|
+
. ~\.env_uo.ps1
|
84
86
|
```
|
85
87
|
#### Windows Command Prompt
|
86
88
|
```terminal
|
87
|
-
c:\urbanopt-cli-0.3.1\setup-env.bat
|
88
|
-
%HOMEPATH%\.env_uo.bat
|
89
|
+
c:\urbanopt-cli-0.3.1\setup-env.bat
|
90
|
+
%HOMEPATH%\.env_uo.bat
|
89
91
|
```
|
90
92
|
|
91
93
|
When launching new shell terminals run the correct environment config to setup the environment.
|
data/Rakefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt™, Copyright (c) 2019-
|
2
|
+
# URBANopt™, Copyright (c) 2019-2023, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
4
|
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
data/example_files/Gemfile
CHANGED
@@ -25,6 +25,8 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
25
25
|
# gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
|
26
26
|
# end
|
27
27
|
|
28
|
+
# pin this dependency to avoid unicode_normalize error
|
29
|
+
gem 'addressable', '2.8.1'
|
28
30
|
|
29
31
|
if allow_local && File.exist?('../openstudio-common-measures-gem')
|
30
32
|
gem 'openstudio-common-measures', path: '../../openstudio-common-measures-gem'
|