Skip to content

Commit

Permalink
Merge pull request #418 from urbanopt/develop
Browse files Browse the repository at this point in the history
prep 0.9.2 release
  • Loading branch information
kflemin authored Apr 12, 2023
2 parents 5bfdfd3 + 06be3df commit c552862
Show file tree
Hide file tree
Showing 23 changed files with 681 additions and 463 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/nightly_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: nightly_build

on:
# push:
schedule:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
# 5:24 am UTC (11:24pm MDT the day before) every weekday night in MDT
- cron: '24 5 * * 2-6'

env:
# Favor_Local_Gems enforces develop branch of all Ruby dependencies
# This is our canary in the coal mine! If any simulation tests fail, comment this and retry.
# If CI is then successful, we have a breaking change in a dependency somewhere.
FAVOR_LOCAL_GEMS: true
GEM_DEVELOPER_KEY: ${{ secrets.GEM_DEVELOPER_KEY }}
UO_NUM_PARALLEL: 2
# GHA machines only have 2 cores. Trying to run more than that is even slower.
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources

jobs:
weeknight-tests:
# ubuntu-latest works since https://github.com/rbenv/ruby-build/releases/tag/v20220710 (July 10, 2022)
# https://github.com/rbenv/ruby-build/discussions/1940
runs-on: ubuntu-latest
container:
image: docker://nrel/openstudio:3.5.1
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
# Disco needs python 3.10
python-version: '3.10'
- name: Install Ruby dependencies
run: |
ruby --version
bundle update
bundle exec certified-update
- name: Install python dependencies
run: bundle exec uo install_python
- name: Run Rspec
continue-on-error: true
# Continue to upload step even if a test fails, so we can troubleshoot
run: bundle exec rspec
- name: Upload artifacts
# Save results for examination - useful for debugging
uses: actions/upload-artifact@v3
if: failure() # Only upload if rspec fails
with:
name: rspec_results
path: |
spec/test_directory**/run/
# coverage/
retention-days: 7 # save for 1 week before deleting
# coveralls action docs: https://github.com/marketplace/actions/coveralls-github-action
# - name: Coveralls
# uses: coverallsapp/[email protected]
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-lcov: "./coverage/lcov/urbanopt-cli.lcov"
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Version 0.9.2
Date Range: 01/06/23 - 04/11/23:

- Fixed [#417]( https://github.com/urbanopt/urbanopt-cli/pull/417 ), pin addressable dependency to resolve unicode_normalize error
- Fixed [#397]( https://github.com/urbanopt/urbanopt-cli/pull/397 ), New tests for GEB mappers

## Version 0.9.1
Date Range: 12/14/22 - 01/05/23:

Expand Down
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.10.2)
cmake_policy(SET CMP0048 NEW)

project(URBANoptCLI VERSION 0.8.3)
project(URBANoptCLI VERSION 0.9.1)

include(FindOpenStudioSDK.cmake)

Expand Down Expand Up @@ -89,16 +89,16 @@ option(BUILD_PACKAGE "Build package" OFF)
# need to update the MD5sum for each platform and url below
if(UNIX)
if(APPLE)
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20221011-darwin.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "9eee6fb77b168d1b2211e1888f733c63")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20230111-darwin.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "dfb4d2d28d6ff25b42d8e375b4435be2")
else()
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20221011-linux.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "5d10dc28cca00bbaed4df8ba0a930868")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20230111-linux.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "2edb06d97ea496a3b3929a780404bb05")
endif()
elseif(WIN32)
if(CMAKE_CL_64)
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20221011-windows.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "9c9dff191bc91379ce60923bfe6cfa4a")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20230111-windows.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "ecbad071c3aba2223e9ad5803c8004d8")
endif()
endif()

Expand Down Expand Up @@ -211,7 +211,7 @@ elseif(UNIX)
# set(CPACK_DEBIAN_PACKAGE_DEBUG ON)

# These two will set the .deb install path correctly
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqdbm14,sqlite3,libgomp1")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqdbm14,sqlite3,libgomp1,libncurses5")
set(CPACK_SET_DESTDIR ON)
set(CPACK_INSTALL_PREFIX /usr/local/urbanopt-cli-${URBANOPT_CLI_VERSION})

Expand Down
20 changes: 10 additions & 10 deletions FindOpenStudioSDK.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(OPENSTUDIO_VERSION_MAJOR 3)
set(OPENSTUDIO_VERSION_MINOR 4)
set(OPENSTUDIO_VERSION_PATCH 0)
set(OPENSTUDIO_VERSION_MINOR 5)
set(OPENSTUDIO_VERSION_PATCH 1)
set(OPENSTUDIO_VERSION "${OPENSTUDIO_VERSION_MAJOR}.${OPENSTUDIO_VERSION_MINOR}.${OPENSTUDIO_VERSION_PATCH}")

find_package(openstudio "${OPENSTUDIO_VERSION}" CONFIG)
Expand All @@ -16,23 +16,23 @@ else()
set(OPENSTUDIO_BASELINK "https://openstudio-builds.s3.amazonaws.com/${OPENSTUDIO_VERSION}"
CACHE STRING "Base link to where the openstudio archives are hosted" FORCE)

set(OPENSTUDIO_VERSION_SHA "+4bd816f785")
set(OPENSTUDIO_VERSION_SHA "+22e1db7be5")

if(APPLE)
set(OPENSTUDIO_EXPECTED_HASH 5a1e5fdfc61a879a9d72dcf625a83e65)
set(OPENSTUDIO_PLATFORM "Darwin")
set(OPENSTUDIO_EXPECTED_HASH f21b03a44aa9ac3e52a4bdfa20009171)
set(OPENSTUDIO_PLATFORM "Darwin-x86_64")
set(OPENSTUDIO_EXT "tar.gz")
elseif(UNIX)
if(LSB_RELEASE_VERSION_SHORT MATCHES "20.04")
set(OPENSTUDIO_EXPECTED_HASH 1922de95bb3e196f1c719400ce58871c)
set(OPENSTUDIO_EXPECTED_HASH 6e5c93002f0cfb445dcdcdb1270261a4)
set(OPENSTUDIO_PLATFORM "Ubuntu-20.04")
else() # Assumes 20.04
set(OPENSTUDIO_EXPECTED_HASH 6e5c93002f0cfb445dcdcdb1270261a4)
set(OPENSTUDIO_PLATFORM "Ubuntu-20.04")
else() # Assumes 18.04
set(OPENSTUDIO_EXPECTED_HASH 44a837fa96fe2ce1a883492a3a1cae09)
set(OPENSTUDIO_PLATFORM "Ubuntu-18.04")
endif()
set(OPENSTUDIO_EXT "tar.gz")
elseif(WIN32)
set(OPENSTUDIO_EXPECTED_HASH 9adffb37a62721ec51a33ce97533e956)
set(OPENSTUDIO_EXPECTED_HASH bc83efcb140d20f8f9758559a58c4347)
set(OPENSTUDIO_PLATFORM "Windows")
set(OPENSTUDIO_EXT "tar.gz")
endif()
Expand Down
48 changes: 25 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[![Coverage Status](https://coveralls.io/repos/github/urbanopt/urbanopt-cli/badge.svg?branch=develop)](https://coveralls.io/github/urbanopt/urbanopt-cli?branch=develop)

# URBANopt CLI

This is the command line interface (CLI) for the URBANopt™ SDK.

## Installation (Using Ruby)
## Installation (Using Ruby)

2 ) Using ruby add this line to your application's Gemfile:

Expand All @@ -25,67 +27,67 @@ gem install urbanopt-cli

## Installation (Using Installer)

The UrbanOpt installer is an alternate way to install the UrbanOpt CLI that also includes Ruby 2.5.x and OpenStudio SDK.
Below are installation instructions for each platform.
The UrbanOpt installer is an alternate way to install the UrbanOpt CLI that also includes Ruby 2.5.x and OpenStudio SDK.
Below are installation instructions for each platform.

### Linux (Ubuntu 18.04)

Download the [.deb package](https://docs.urbanopt.net/installation/linux.html#install-with-the-urbanopt-installer).
Download the [.deb package](https://docs.urbanopt.net/installation/linux.html#install-with-the-urbanopt-installer).

```terminal
sudo apt update
sudo apt update
sudo apt install ./UrbanOptCLI-0.3.1.b6f118d506-Linux.deb
```

This will install to `/usr/local/` directory.
e.g.
`/usr/local/urbanopt-cli-0.3.1/`
This will install to `/usr/local/` directory.
e.g.
`/usr/local/urbanopt-cli-0.3.1/`

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.
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.

```terminal
/usr/local/urbanopt-cli-0.3.1/setup-env.sh
/usr/local/urbanopt-cli-0.3.1/setup-env.sh
. ~/.env_uo.sh
```

When launching new shell terminals run `. ~/.env_uo.sh` to setup the environment. 

### Mac OSX (>= 10.12)
### Mac OSX (>= 10.12)

Download the [.dmg package](https://docs.urbanopt.net/installation/mac.html#install-with-the-urbanopt-installer).
Download the [.dmg package](https://docs.urbanopt.net/installation/mac.html#install-with-the-urbanopt-installer).

Use the GUI installer and choose a directory to install. Once installed, open a terminal and run the provided setup script.
The `setup-env.sh` generates env variables and stores them in a file `.env_uo.sh` in your home directory.
Use the GUI installer and choose a directory to install. Once installed, open a terminal and run the provided setup script.
The `setup-env.sh` generates env variables and stores them in a file `.env_uo.sh` in your home directory.

```terminal
/Applications/UrbanOptCLI_0.3.1/setup-env.sh
```terminal
/Applications/UrbanOptCLI_0.3.1/setup-env.sh
. ~/.env_uo.sh
```

When launching new shell terminals run `. ~/.env_uo.s` to setup the environment. 

### Windows (64-bit Windows 7 – 10)

Download the [.exe installer](https://docs.urbanopt.net/installation/windows.html#install-with-the-urbanopt-installer).
Download the [.exe installer](https://docs.urbanopt.net/installation/windows.html#install-with-the-urbanopt-installer).

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).


#### Bash (or GitBash for Windows)
```terminal
c:/urbanopt-cli-0.3.1/setup-env.sh
. ~/.env_uo.sh
c:/urbanopt-cli-0.3.1/setup-env.sh
. ~/.env_uo.sh
```

#### Powershell
```terminal
c:\urbanopt-cli-0.3.1\setup-env.ps1
. ~\.env_uo.ps1
c:\urbanopt-cli-0.3.1\setup-env.ps1
. ~\.env_uo.ps1
```
#### Windows Command Prompt
```terminal
c:\urbanopt-cli-0.3.1\setup-env.bat
%HOMEPATH%\.env_uo.bat
c:\urbanopt-cli-0.3.1\setup-env.bat
%HOMEPATH%\.env_uo.bat
```

When launching new shell terminals run the correct environment config to setup the environment. 
Expand Down
2 changes: 2 additions & 0 deletions example_files/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
# gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
# end

# pin this dependency to avoid unicode_normalize error
gem 'addressable', '2.8.1'

if allow_local && File.exist?('../openstudio-common-measures-gem')
gem 'openstudio-common-measures', path: '../../openstudio-common-measures-gem'
Expand Down
Loading

0 comments on commit c552862

Please sign in to comment.