openstudio-workflow 1.3.1 → 1.3.2
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.
- checksums.yaml +4 -4
- data/lib/openstudio/workflow/util/measure.rb +53 -36
- data/lib/openstudio/workflow/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c2fb37683cd9406a57cc473d90812987900bda9
|
4
|
+
data.tar.gz: 5c452453f70acf650da05e3632322e743dc9b858
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9b318fef0c727d9c53174e6604eb93fd36b01a1162339b2d807bd1b32bbde519c285f01a0f32b7cc0e0bcd34e8d1e90610aa4279f4de2ddc91e0436238a163b
|
7
|
+
data.tar.gz: d78e837fca16cf879ecd1034a36b831095d11a34f68aadb443c6bfbf86d8427f5a2fe5ce5e0be38c81feb2efc4a54eefb5bdeb6c1acadcfef917a8a240fd195a
|
@@ -337,53 +337,70 @@ module OpenStudio
|
|
337
337
|
# Set argument values if they exist
|
338
338
|
logger.debug "Iterating over arguments for workflow item '#{measure_dir_name}'"
|
339
339
|
if step.arguments
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
340
|
+
|
341
|
+
# handle skip first
|
342
|
+
argument_value = step.arguments['__SKIP__']
|
343
|
+
if !argument_value.nil?
|
344
|
+
|
345
|
+
if registry[:openstudio_2]
|
346
|
+
variant_type = argument_value.variantType
|
347
|
+
if variant_type == "String".to_VariantType
|
348
|
+
argument_value = argument_value.valueAsString
|
349
|
+
elsif variant_type == "Double".to_VariantType
|
350
|
+
argument_value = argument_value.valueAsDouble
|
351
|
+
elsif variant_type == "Integer".to_VariantType
|
352
|
+
argument_value = argument_value.valueAsInteger
|
353
|
+
elsif variant_type == "Boolean".to_VariantType
|
354
|
+
argument_value = argument_value.valueAsBoolean
|
353
355
|
end
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
else
|
360
|
-
skip_measure = true
|
361
|
-
end
|
362
|
-
elsif argument_value.class == Fixnum
|
363
|
-
skip_measure = (argument_value != 0)
|
364
|
-
elsif argument_value.class == Float
|
365
|
-
skip_measure = (argument_value != 0.0)
|
366
|
-
elsif argument_value.class == FalseClass
|
356
|
+
end
|
357
|
+
|
358
|
+
if argument_value.class == String
|
359
|
+
argument_value = argument_value.downcase
|
360
|
+
if argument_value == "false"
|
367
361
|
skip_measure = false
|
368
|
-
|
362
|
+
else
|
369
363
|
skip_measure = true
|
370
|
-
elsif argument_value.class == NilClass
|
371
|
-
skip_measure = false
|
372
364
|
end
|
365
|
+
elsif argument_value.class == Fixnum
|
366
|
+
skip_measure = (argument_value != 0)
|
367
|
+
elsif argument_value.class == Float
|
368
|
+
skip_measure = (argument_value != 0.0)
|
369
|
+
elsif argument_value.class == FalseClass
|
370
|
+
skip_measure = false
|
371
|
+
elsif argument_value.class == TrueClass
|
372
|
+
skip_measure = true
|
373
|
+
elsif argument_value.class == NilClass
|
374
|
+
skip_measure = false
|
375
|
+
end
|
376
|
+
end
|
377
|
+
|
378
|
+
# process other arguments
|
379
|
+
step.arguments.each do |argument_name, argument_value|
|
380
|
+
|
381
|
+
# don't validate choices if measure is being skipped
|
382
|
+
next if skip_measure
|
383
|
+
|
384
|
+
# already handled skip
|
385
|
+
next if argument_name.to_s == '__SKIP__'
|
386
|
+
|
387
|
+
# regular argument
|
388
|
+
if registry[:openstudio_2]
|
389
|
+
success = apply_arguments_2(argument_map, argument_name, argument_value, logger)
|
373
390
|
else
|
374
|
-
|
375
|
-
if registry[:openstudio_2]
|
376
|
-
success = apply_arguments_2(argument_map, argument_name, argument_value, logger)
|
377
|
-
else
|
378
|
-
success = apply_arguments(argument_map, argument_name, argument_value, logger)
|
379
|
-
end
|
380
|
-
fail 'Could not set arguments' unless success
|
391
|
+
success = apply_arguments(argument_map, argument_name, argument_value, logger)
|
381
392
|
end
|
393
|
+
fail 'Could not set arguments' unless success
|
382
394
|
end
|
395
|
+
|
383
396
|
end
|
384
397
|
|
385
398
|
# map any choice display names to choice values, in either set values or defaults
|
386
399
|
argument_map.each_key do |argument_name|
|
400
|
+
|
401
|
+
# don't validate choices if measure is being skipped
|
402
|
+
next if skip_measure
|
403
|
+
|
387
404
|
v = argument_map[argument_name]
|
388
405
|
choice_values = v.choiceValues
|
389
406
|
if !choice_values.empty?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstudio-workflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Long
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-02-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|