Skip to content

Commit

Permalink
Merge pull request #447 from urbanopt/develop
Browse files Browse the repository at this point in the history
Version 0.11.0
  • Loading branch information
kflemin committed Jan 26, 2024
2 parents 1aa3bce + f270c71 commit 6d39156
Show file tree
Hide file tree
Showing 714 changed files with 360,717 additions and 231,605 deletions.
24 changes: 24 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuration-options

changelog:
exclude:
labels:
- ignore-for-release
- DO NOT MERGE
- invalid
- dependencies
- tests
authors:
- octocat
- dependabot
categories:
- title: Breaking Changes 🛠
labels:
- breaking-change
- title: Exciting New Features 🎉
labels:
- enhancement
- Feature
- title: Other Changes
labels:
- "*"
68 changes: 39 additions & 29 deletions .github/workflows/nightly_ci_build.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,71 @@
name: nightly_build
name: CLI CI

on:
# Run on weeknights, and also whenever a push is made
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'
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'
# pull_request:
# types: [review_requested]

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

UO_NUM_PARALLEL: 4
# GHA machines have 4 cores. Trying to run more concurrently will slow everything down.
# https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/
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
strategy:
matrix:
# os: container operations in GHA only work on Ubuntu
simulation-type: [basic, GEB, residential, electric]
# python-version: No need to test more than 1 python-version
runs-on: ubuntu-latest
container:
image: docker://nrel/openstudio:3.6.1
image: docker://nrel/openstudio:3.7.0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Change Owner of Container Working Directory
# working dir permissions workaround from https://github.com/actions/runner-images/issues/6775#issuecomment-1377299658
run: chown root:root .
- name: Set up Python
uses: actions/setup-python@v4
if: ${{ matrix.simulation-type == 'electric' }}
uses: actions/setup-python@v5
with:
# Disco needs python 3.10
# 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
if: ${{ matrix.simulation-type == 'electric' || matrix.simulation-type == 'basic' }}
run: bundle exec rspec -e 'Install python dependencies'
- name: Test project setup
# We only need to run these tests once, not every matrix iteration.
if: ${{ matrix.simulation-type == 'basic' }}
run: |
bundle exec rspec -e 'Admin'
bundle exec rspec -e 'Create project'
bundle exec rspec -e 'Make and manipulate ScenarioFiles'
bundle exec rspec -e 'Update project directory'
- name: Test simulations
run: bundle exec rspec -e 'Run and work with a small ${{ matrix.simulation-type }} simulation'
- name: Upload artifacts
# Save results for examination - useful for debugging
uses: actions/upload-artifact@v3
# Only upload if rspec fails
# Using v4 would mean we have to change our path design, and/or the test dir names
# Only upload if a previous step fails
if: failure()
with:
name: rspec_results
path: |
spec/test_directory**/run/
# coverage/
spec/test_directory**/
retention-days: 7 # save for 1 week before deleting
# coveralls action docs: https://github.com/marketplace/actions/coveralls-github-action
# - name: Coveralls
# uses: coverallsapp/github-action@1.1.3
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-lcov: "./coverage/lcov/urbanopt-cli.lcov"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ Gemfile.lock
example_files/python_deps/Miniconda*
example_files/python_deps/python_config.json
example_files/python_deps/python
example_files/python_deps/python-3.10
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## Version 0.11.0
Date Range: 07/20/23 - 01/26/24

### Exciting New Features 🎉
* error handling for non-US weatherfiles by @vtnate in https://github.com/urbanopt/urbanopt-cli/pull/443
* Ground Heat Exchanger Workflow by @tanushree04 in https://github.com/urbanopt/urbanopt-cli/pull/426
* Initial implementation of geometry orientation and aspect ratio by @rawadelkontar in https://github.com/urbanopt/urbanopt-cli/pull/444
### Other Changes
* Update installer 0.10.0 by @tijcolem in https://github.com/urbanopt/urbanopt-cli/pull/433
* Remove jenkins by @vtnate in https://github.com/urbanopt/urbanopt-cli/pull/432
* Coverage badges by @vtnate in https://github.com/urbanopt/urbanopt-cli/pull/434
* Update README.md by @vtnate in https://github.com/urbanopt/urbanopt-cli/pull/435
* Categorize tests to parallelize CI by @vtnate in https://github.com/urbanopt/urbanopt-cli/pull/442
* use unsecured http as default rubygems source in project_dir by @vtnate in https://github.com/urbanopt/urbanopt-cli/pull/445

**Full Changelog**: https://github.com/urbanopt/urbanopt-cli/compare/v0.10.0...v0.11.0

## Version 0.10.0
Date Range: 06/14/22 - 7/20/23

Expand Down
14 changes: 7 additions & 7 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.9.3)
project(URBANoptCLI VERSION 0.10.0)

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-20230616-darwin.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "0e1a97892eec849f469afd1a8f115321")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20230731-darwin.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "6dcaeb17c6567d5e5242c470b0ff2eb0")
else()
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20230616-linux.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "8d0ca0d83c184a4b4a9c389ca79ffe8b")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20230731-linux.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "ff67d59a162288cb7e5d4632e970e53d")
endif()
elseif(WIN32)
if(CMAKE_CL_64)
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20230616-windows.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "97ec22034dd6585a6356c01ba7a66c29")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20230801-windows.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "2293f9f07643d110a84afaa0c1049c03")
endif()
endif()

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

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 "+22e1db7be5")
set(OPENSTUDIO_VERSION_SHA "+bb9481519e")

if(APPLE)
set(OPENSTUDIO_EXPECTED_HASH f21b03a44aa9ac3e52a4bdfa20009171)
set(OPENSTUDIO_EXPECTED_HASH ba881908f683ec695c209399f261b299)
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 6e5c93002f0cfb445dcdcdb1270261a4)
set(OPENSTUDIO_PLATFORM "Ubuntu-20.04")
set(OPENSTUDIO_EXPECTED_HASH 5e67958249d99f96149b4d5576c3d0ef)
set(OPENSTUDIO_PLATFORM "Ubuntu-20.04-x86_64")
else() # Assumes 20.04
set(OPENSTUDIO_EXPECTED_HASH 6e5c93002f0cfb445dcdcdb1270261a4)
set(OPENSTUDIO_PLATFORM "Ubuntu-20.04")
set(OPENSTUDIO_EXPECTED_HASH 5e67958249d99f96149b4d5576c3d0ef)
set(OPENSTUDIO_PLATFORM "Ubuntu-20.04-x86_64")
endif()
set(OPENSTUDIO_EXT "tar.gz")
elseif(WIN32)
set(OPENSTUDIO_EXPECTED_HASH bc83efcb140d20f8f9758559a58c4347)
set(OPENSTUDIO_EXPECTED_HASH 802f8cffeac24f011e636baf1e6ffd40)
set(OPENSTUDIO_PLATFORM "Windows")
set(OPENSTUDIO_EXT "tar.gz")
endif()
Expand Down
10 changes: 0 additions & 10 deletions Jenkinsfile

This file was deleted.

43 changes: 8 additions & 35 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,15 @@
URBANopt (tm), Copyright (c) 2019-2023, Alliance for Sustainable Energy, LLC, and other
contributors. All rights reserved.
URBANopt (tm), Copyright (c) 2019-2024, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.

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

Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the copyright holder nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

Redistribution of this software, without modification, must refer to the software
by the same designation. Redistribution of a modified version of this software
(i) may not refer to the modified version by the same designation, or by any
confusingly similar designation, and (ii) must refer to the underlying software
originally provided by Alliance as "URBANopt". Except to comply with the foregoing,
the term "URBANopt", or any confusingly similar designation may not be used to
refer to any modified version of this software or any modified version of the
underlying software originally provided by Alliance without the prior written
consent of Alliance.
Redistribution of this software, without modification, must refer to the software by the same designation. Redistribution of a modified version of this software (i) may not refer to the modified version by the same designation, or by any confusingly similar designation, and (ii) must refer to the underlying software originally provided by Alliance as “URBANopt”. Except to comply with the foregoing, the term “URBANopt”, or any confusingly similar designation may not be used to refer to any modified version of this software or any modified version of the underlying software originally provided by Alliance without the prior written consent of Alliance.

The name of the copyright holder(s), any contributors, the United States Government,
the United States Department of Energy, or any of their employees may not be used to
endorse or promote products derived from this software without specific prior written
permission from the respective party.
The name of the copyright holder(s), any contributors, the United States Government, the United States Department of Energy, or any of their employees may not be used to endorse or promote products derived from this software without specific prior written permission from the respective party.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED STATES
DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
[![Coverage Status](https://coveralls.io/repos/github/urbanopt/urbanopt-cli/badge.svg?branch=develop)](https://coveralls.io/github/urbanopt/urbanopt-cli?branch=develop)
[![nightly_build](https://github.com/urbanopt/urbanopt-cli/actions/workflows/nightly_build.yml/badge.svg)](https://github.com/urbanopt/urbanopt-cli/actions/workflows/nightly_build.yml)
[![CLI build status](https://github.com/urbanopt/urbanopt-cli/actions/workflows/nightly_ci_build.yml/badge.svg)](https://github.com/urbanopt/urbanopt-cli/actions/workflows/nightly_ci_build.yml)<br/>
[![Core-gem](https://github.com/urbanopt/urbanopt-core-gem/actions/workflows/nightly_build.yml/badge.svg)](https://github.com/urbanopt/urbanopt-core-gem/actions/workflows/nightly_build.yml)
[![Coverage Status](https://coveralls.io/repos/github/urbanopt/urbanopt-core-gem/badge.svg?branch=develop)](https://coveralls.io/github/urbanopt/urbanopt-core-gem?branch=develop)<br/>
[![Geojson-gem](https://github.com/urbanopt/urbanopt-geojson-gem/actions/workflows/nightly_build.yml/badge.svg)](https://github.com/urbanopt/urbanopt-geojson-gem/actions/workflows/nightly_build.yml)
[![Coverage Status](https://coveralls.io/repos/github/urbanopt/urbanopt-geojson-gem/badge.svg?branch=develop)](https://coveralls.io/github/urbanopt/urbanopt-geojson-gem?branch=develop)<br/>
[![Reopt-gem](https://github.com/urbanopt/urbanopt-reopt-gem/actions/workflows/nightly_ci_build.yml/badge.svg)](https://github.com/urbanopt/urbanopt-reopt-gem/actions/workflows/nightly_ci_build.yml)
[![Coverage Status](https://coveralls.io/repos/github/urbanopt/urbanopt-reopt-gem/badge.svg?branch=develop)](https://coveralls.io/github/urbanopt/urbanopt-reopt-gem?branch=develop)<br/>
[![Reporting-gem](https://github.com/urbanopt/urbanopt-reporting-gem/actions/workflows/nightly_ci_build.yml/badge.svg)](https://github.com/urbanopt/urbanopt-reporting-gem/actions/workflows/nightly_ci_build.yml)
[![Coverage Status](https://coveralls.io/repos/github/urbanopt/urbanopt-reporting-gem/badge.svg?branch=develop)](https://coveralls.io/github/urbanopt/urbanopt-reporting-gem?branch=develop)<br/>
[![RNM-gem](https://github.com/urbanopt/urbanopt-rnm-us-gem/actions/workflows/nightly_ci_build.yml/badge.svg)](https://github.com/urbanopt/urbanopt-rnm-us-gem/actions/workflows/nightly_ci_build.yml)
[![Coverage Status](https://coveralls.io/repos/github/urbanopt/urbanopt-rnm-us-gem/badge.svg?branch=develop)](https://coveralls.io/github/urbanopt/urbanopt-rnm-us-gem?branch=develop)<br/>
[![Scenario-gem](https://github.com/urbanopt/urbanopt-scenario-gem/actions/workflows/nightly_ci_build.yml/badge.svg)](https://github.com/urbanopt/urbanopt-scenario-gem/actions/workflows/nightly_ci_build.yml)
[![Coverage Status](https://coveralls.io/repos/github/urbanopt/urbanopt-scenario-gem/badge.svg?branch=develop)](https://coveralls.io/github/urbanopt/urbanopt-scenario-gem?branch=develop)<br/>
[![Example-project CI](https://github.com/urbanopt/urbanopt-example-geojson-project/actions/workflows/weekly_build.yml/badge.svg)](https://github.com/urbanopt/urbanopt-example-geojson-project/actions/workflows/weekly_build.yml)
[![Coverage Status](https://coveralls.io/repos/github/urbanopt/urbanopt-example-geojson-project/badge.svg?branch=develop)](https://coveralls.io/github/urbanopt/urbanopt-example-geojson-project?branch=develop)

# URBANopt CLI

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

## Installation (Using Ruby)

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

```ruby
gem 'urbanopt-cli'
Expand All @@ -28,7 +41,7 @@ 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.
The UrbanOpt installer is an alternate way to install the UrbanOpt CLI that also includes Ruby 2.7.2 and the OpenStudio SDK.
Below are installation instructions for each platform.

### Linux (Ubuntu 18.04)
Expand Down Expand Up @@ -65,7 +78,7 @@ The `setup-env.sh` generates env variables and stores them in a file `.env_uo.sh
. ~/.env_uo.sh
```

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

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

Expand Down Expand Up @@ -155,7 +168,7 @@ Post-process simulations for a full scenario:
uo process --<TYPE> --scenario <SCENARIOFILE> --feature <FEATUREFILE>
```

- Valid `TYPE`s are: `default`, `opendss`, `reopt-scenario`, `reopt-feature`
- Valid `TYPE`s are: `default`, `opendss`, `reopt-scenario`, `reopt-feature`, `reopt-resilience`, `disco`

Delete a scenario you have already run:

Expand All @@ -173,10 +186,12 @@ uo --version

Python dependencies are currently versioned as follows:

| Python Package | Version |
| ----------- | ----------- |
| urbanopt-ditto-reader | 0.4.0 |
| NREL-disco | 0.3.4 from https://github.com/NREL/disco.git |
| Python Package | Version |
| --------------------------- | ------- |
| urbanopt-ditto-reader | 0.6.3 |
| NREL-disco | 0.5.0 |
| geojson-modelica-translator | 0.6.0 |
| ThermalNetwork | 0.2.3 |

## Development

Expand Down
Loading

0 comments on commit 6d39156

Please sign in to comment.