urbanopt-scenario 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/urbanopt/scenario/scenario_post_processor_default.rb +19 -1
- data/lib/urbanopt/scenario/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8cb63dabcc5a248580c0f5941030e985d95aa03f5cf6e9ecaeead96b5879d3a
|
4
|
+
data.tar.gz: ba1fba337a0c9daf1ef6f699bb44864fc663a604bc2d6806919b44947326d7c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81d7ecde2901d1f8cef37c69ab4052cad2a70e9e87654724d09374cb6646eb9ef61393451e0215ac784534dde74647ca2719d1cb943306a7bf0d45fb1d0d16bf
|
7
|
+
data.tar.gz: d9c810fb5d2bda25f6b9910b4e49e6ab7c9a1c065e3570319e85a4d58cd4f047f7d30e1a651bf7c4a6ed867b3f418255d5c7dd1aa4cf342c11a3c369680ed8fb
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# URBANopt Scenario Gem
|
2
2
|
|
3
|
+
## Version 0.4.1
|
4
|
+
Date Range: 09/22/20 - 09/28/20
|
5
|
+
|
6
|
+
- Fixed [#156] (https://github.com/urbanopt/urbanopt-scenario-gem/issues/156), Ignore non-datapoint directories in scenario dir when creating scenario sqlite file
|
7
|
+
|
3
8
|
## Version 0.4.0
|
4
9
|
Date Range: 06/05/20 - 09/21/20
|
5
10
|
|
@@ -47,7 +47,7 @@ module URBANopt
|
|
47
47
|
def initialize(scenario_base)
|
48
48
|
super(scenario_base)
|
49
49
|
|
50
|
-
@initialization_hash = { directory_name: scenario_base.run_dir, name: scenario_base.name, id: scenario_base.name }
|
50
|
+
@initialization_hash = { directory_name: scenario_base.run_dir, name: scenario_base.name, id: scenario_base.name, root_dir: scenario_base.root_dir }
|
51
51
|
@scenario_result = URBANopt::Reporting::DefaultReports::ScenarioReport.new(@initialization_hash)
|
52
52
|
@default_save_name = 'default_scenario_report'
|
53
53
|
|
@@ -97,6 +97,24 @@ module URBANopt
|
|
97
97
|
|
98
98
|
values_arr = []
|
99
99
|
feature_list = Pathname.new(@initialization_hash[:directory_name]).children.select(&:directory?) # Folders in the run/scenario directory
|
100
|
+
|
101
|
+
# get scenario CSV
|
102
|
+
scenario_csv = File.join(@initialization_hash[:root_dir], @initialization_hash[:name] + '.csv')
|
103
|
+
if File.exist?(scenario_csv)
|
104
|
+
# csv found
|
105
|
+
feature_ids = CSV.read(scenario_csv, :headers => true)
|
106
|
+
feature_list = []
|
107
|
+
# loop through building feature ids from scenario csv
|
108
|
+
feature_ids["Feature Id"].each do |feature|
|
109
|
+
if Dir.exist?(File.join(@initialization_hash[:directory_name], feature))
|
110
|
+
feature_list << File.join(@initialization_hash[:directory_name], feature)
|
111
|
+
else
|
112
|
+
puts "warning: did not find a directory for datapoint #{feature}...skipping"
|
113
|
+
end
|
114
|
+
end
|
115
|
+
else
|
116
|
+
raise "Couldn't find scenario CSV: #{scenario_csv}"
|
117
|
+
end
|
100
118
|
feature_1_name = File.basename(feature_list[0]) # Get name of first feature, so we can read eplusout.sql from there
|
101
119
|
uo_output_sql_file = File.join(@initialization_hash[:directory_name], feature_1_name, 'eplusout.sql')
|
102
120
|
feature_list.each do |feature| # Loop through each feature in the scenario
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: urbanopt-scenario
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rawad El Kontar
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-09-
|
12
|
+
date: 2020-09-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|