urbanopt-rnm-us 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 07dfa016051b9b8499a11ba5d8066a73c06131d628af10adb2dfc8c9848e7c30
4
- data.tar.gz: a6e9f7af3ee4e92951d9225caa5eddfb8f97b20b0e1a5d95898a3f4a132405e3
3
+ metadata.gz: 78e5fa9802676b79db0cfaf9c6184581dafc1d5499c51dcf6c32070974baa221
4
+ data.tar.gz: f77669a0f5fa76cff7cf76b58d0fc67bc7671d8cbf964b6b9faec90ba2343a65
5
5
  SHA512:
6
- metadata.gz: b25a77720880cc85ed29adabb35280a8e308692004183ef7da0a70ae0f4dd4e56c18d5299697490e8ed98e62e8007465ec31f80279c505595df23b144cbf16e5
7
- data.tar.gz: e6a40b39b6f1f20f96df5379bf02c73205e00981e60bdf25dccaadb8780dd24522e18dcf423f3497fa7c03f6dd180cdc54531bd150666f2a33612b3a2b40c883
6
+ metadata.gz: 16e51e2d9b1c0aa9fbcb15f9e946a0feb65ab66133d1c43ab0c91ae6cab4afd0ff0746ef142a5bec279aec48be8812c37e845322800dc846e09a294916823ec7
7
+ data.tar.gz: 282ddcc5091620663891c2bd1637dd77fdb19097af21049b0d1f8992ac8a45bd9d68058bd1f61c201596dbfad0ccbb6872d0b2e90a85df26938aa540e71502a8
@@ -0,0 +1,46 @@
1
+
2
+ name: ci
3
+
4
+ on:
5
+ # push:
6
+ schedule:
7
+ # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
8
+ # 5:23 am UTC (11:23pm MDT the day before) every weekday night in MDT
9
+ - cron: '23 5 * * 2-6'
10
+
11
+ env:
12
+ # This env var should enforce develop branch of all dependencies
13
+ FAVOR_LOCAL_GEMS: true
14
+ GEM_DEVELOPER_KEY: ${{ secrets.GEM_DEVELOPER_KEY }}
15
+
16
+ jobs:
17
+ weeknight-tests:
18
+ runs-on: ubuntu-latest
19
+ container:
20
+ image: docker://nrel/openstudio:3.5.1
21
+ steps:
22
+ - uses: actions/checkout@v3
23
+ - name: Update gems
24
+ run: |
25
+ ruby --version
26
+ bundle update
27
+ bundle exec certified-update
28
+ - name: Run Rspec
29
+ continue-on-error: true
30
+ # Continue to upload step even if a test fails, so we can troubleshoot
31
+ run: bundle exec rspec
32
+ - name: Upload artifacts
33
+ uses: actions/upload-artifact@v3
34
+ if: failure() # Only upload if rspec fails
35
+ with:
36
+ name: rspec_results
37
+ path: |
38
+ spec/test*/**
39
+ # coverage/
40
+ retention-days: 7 # save for 1 week before deleting
41
+ # coveralls action docs: https://github.com/marketplace/actions/coveralls-github-action
42
+ - name: Coveralls
43
+ uses: coverallsapp/github-action@master
44
+ with:
45
+ github-token: ${{ secrets.GITHUB_TOKEN }}
46
+ path-to-lcov: "./coverage/lcov/urbanopt-rnm-us-gem.lcov"
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 0.5.1
4
+ Date Range 12/9/22 - 6/7/23
5
+
6
+ - Fix to handle buildings with courtyard without creating additional erroneous buildings
7
+
3
8
  ## Version 0.5.0
4
9
  Date Range 9/30/22 - 12/8/22
5
10
 
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- URBANopt (tm), Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
1
+ URBANopt (tm), Copyright (c) 2019-2023, Alliance for Sustainable Energy, LLC, and other
2
2
  contributors. All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification,
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
+ [![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)
2
+
1
3
  # URBANopt RNM-US Gem
2
4
 
3
- The URBANopt<sup>&trade;</sup> RNM-US Gem includes functionalities to interface the URBANopt SDK to the RNM-US Gem for the development of a synthetic optimum distribution network in the considered district, given data related to the buildings energy consumption/DER energy generation and location, modeled by the other URBANopt modules.
5
+ The URBANopt<sup>&trade;</sup> RNM-US Gem includes functionalities to interface the URBANopt SDK to the RNM-US Gem for the development of a synthetic optimum distribution network in the considered district, given data related to the buildings energy consumption/DER energy generation and location, modeled by the other URBANopt modules.
4
6
  The RNM-US Gem is used to collect required data for the execution of RNM-US, which has been modeled in the other URBANopt modules, translating information provided
5
7
  in .json and .csv format into .txt files
6
8
 
@@ -15,7 +17,7 @@ The OpenDSS format presents results for power system analysis and simulations.
15
17
  The current functionalities of the RNM-US Gem include the creation of a streetmap text file, the substation txt file and multiple txt files related to the consumers peak loads and profiles and DERs peak generation and profiles.
16
18
  The streetmap text file is developed from coordinates information provided by geoJSON feature file input. The customers and generators text files, which define all the network consumers and DG included in the project, are created from their peak electricity demand/generation, and building location, provided by csv and json feature_report files modeled by the URBANopt Scenario Gem.
17
19
  The profiles txt files are divided among the consumers hourly profiles of active and reactive power and the DG hourly profiles of active and reactive power for the 2 most "extreme" days of maximum net demand and maximum net generation for the district .
18
- Finally, the extended profiles txt files provide the active and reactive profiles for each consumer/DG for the whole year.
20
+ Finally, the extended profiles txt files provide the active and reactive profiles for each consumer/DG for the whole year.
19
21
 
20
22
 
21
23
  ## Generate input files
@@ -67,4 +69,4 @@ The validation and results visualization functionality is written in python. Fol
67
69
 
68
70
  ```bash
69
71
  bundle exec rspec
70
- ```
72
+ ```
@@ -210,7 +210,11 @@ module URBANopt
210
210
  street_coordinates[street_number] = each_street
211
211
  street_number += 1
212
212
  elsif street['geometry']['type'] == 'Polygon' && street['properties']['type'] == 'Building' && scenario_features.include?(street['properties']['id'])
213
- for k in 0..street['geometry']['coordinates'].length - 1
213
+ puts "------ processing Building #{ street['properties']['name']} --------"
214
+ # this loop goes through each polygon and assign it a building and is not correct for buildings with
215
+ # inner courtyards (it would create 2 buildings)
216
+ # This assumes the outward footprint is the first polygon -- we only process the first one here
217
+ for k in 0..0
214
218
  h = 0 # index representing number of nodes for each single building
215
219
  building = [] # array containing every building node coordinates and id of 1 building
216
220
  for j in 0..street['geometry']['coordinates'][k].length - 1
@@ -40,6 +40,6 @@
40
40
 
41
41
  module URBANopt
42
42
  module RNM
43
- VERSION = '0.5.0'.freeze
43
+ VERSION = '0.5.1'.freeze
44
44
  end
45
45
  end
@@ -35,4 +35,6 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency 'rubocop', '~> 1.15.0'
36
36
  spec.add_development_dependency 'rubocop-checkstyle_formatter', '~> 0.4.0'
37
37
  spec.add_development_dependency 'rubocop-performance', '~> 1.11.3'
38
+ spec.add_development_dependency 'simplecov', '~> 0.18.2'
39
+ spec.add_development_dependency 'simplecov-lcov', '~> 0.8.0'
38
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: urbanopt-rnm-us
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katherine Fleming
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-12-13 00:00:00.000000000 Z
12
+ date: 2023-06-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: certified
@@ -165,6 +165,34 @@ dependencies:
165
165
  - - "~>"
166
166
  - !ruby/object:Gem::Version
167
167
  version: 1.11.3
168
+ - !ruby/object:Gem::Dependency
169
+ name: simplecov
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - "~>"
173
+ - !ruby/object:Gem::Version
174
+ version: 0.18.2
175
+ type: :development
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - "~>"
180
+ - !ruby/object:Gem::Version
181
+ version: 0.18.2
182
+ - !ruby/object:Gem::Dependency
183
+ name: simplecov-lcov
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - "~>"
187
+ - !ruby/object:Gem::Version
188
+ version: 0.8.0
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - "~>"
194
+ - !ruby/object:Gem::Version
195
+ version: 0.8.0
168
196
  description: Library to create input files for RNM-US
169
197
  email:
170
198
  - katherine.fleming@nrel.gov
@@ -173,6 +201,7 @@ executables: []
173
201
  extensions: []
174
202
  extra_rdoc_files: []
175
203
  files:
204
+ - ".github/workflows/ci.yml"
176
205
  - ".gitignore"
177
206
  - ".rubocop.yml"
178
207
  - CHANGELOG.md