urbanopt-rnm-us 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt (tm), Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt (tm), Copyright (c) 2019-2022, 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,
@@ -54,23 +54,23 @@ module URBANopt
54
54
  conductor.each do |k, v|
55
55
  if k.include? '(mm)'
56
56
  # new_key = "#{k.sub('(mm)', '')}(ft)"
57
- new_key = "#{k.sub(' (mm)', '').gsub(' ','_')}"
57
+ new_key = k.sub(' (mm)', '').gsub(' ', '_').to_s
58
58
  hash[new_key] = v
59
59
  elsif k.include? '(A)'
60
- new_key = "#{k.sub(' (A)', '').gsub(' ','_')}"
60
+ new_key = k.sub(' (A)', '').gsub(' ', '_').to_s
61
61
  hash[new_key] = v
62
62
  elsif k.include? '#'
63
- new_key = "#{k.sub('#', 'num').gsub(' ', '_')}"
63
+ new_key = k.sub('#', 'num').gsub(' ', '_').to_s
64
64
  hash[new_key] = v
65
65
  elsif k.include? '(ohm/km)'
66
66
  # new_key = "#{k.sub('(ohm/km)', '')}(ohm/mi)"
67
- new_key = "#{k.sub(' (ohm/km)', '').gsub(' ','_')}"
67
+ new_key = k.sub(' (ohm/km)', '').gsub(' ', '_').to_s
68
68
  hash[new_key] = v
69
69
  elsif k != 'voltage level' && k != 'type'
70
- new_key = "#{k.gsub(' ', '_')}"
70
+ new_key = k.gsub(' ', '_').to_s
71
71
  hash[new_key] = v
72
72
  else
73
- new_key = "#{k.gsub(' ', '_')}"
73
+ new_key = k.gsub(' ', '_').to_s
74
74
  hash[new_key] = v
75
75
  end
76
76
  end
@@ -82,7 +82,7 @@ module URBANopt
82
82
  elsif k.include? '(m)'
83
83
  hash.delete(k)
84
84
  k = k.split(' ')[0]
85
- new_key = "#{k.sub(' ', '_')}"
85
+ new_key = k.sub(' ', '_').to_s
86
86
  hash[new_key] = v
87
87
  end
88
88
  end
data/lib/urbanopt/rnm.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt (tm), Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt (tm), Copyright (c) 2019-2022, 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,
@@ -57,3 +57,4 @@ require 'urbanopt/rnm/input_files'
57
57
  require 'urbanopt/rnm/runner'
58
58
  require 'urbanopt/rnm/api_client'
59
59
  require 'urbanopt/rnm/post_processor'
60
+ require 'urbanopt/rnm/validation'
data/lib/urbanopt-rnm.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt (tm), Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt (tm), Copyright (c) 2019-2022, 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,