coderunner 0.11.11 → 0.11.12
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/coderunner.gemspec +2 -2
- data/lib/coderunner/class_methods.rb +3 -0
- data/lib/coderunner/fortran_namelist.rb +3 -0
- data/lib/coderunner/instance_methods.rb +1 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.12
|
data/coderunner.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "coderunner"
|
8
|
-
s.version = "0.11.
|
8
|
+
s.version = "0.11.12"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Edmund Highcock"]
|
12
|
-
s.date = "2012-11-
|
12
|
+
s.date = "2012-11-23"
|
13
13
|
s.description = "CodeRunner is a framework for the automated running and analysis of simulations. It automatically generates any necessary input files, organises the output data and analyses it. Because it is a modular system, it can easily be customised to work with any system and any simulation code. One of its greatest strengths is that it is independent of any one simulation code; thus it can easily plot and compare the data from different codes."
|
14
14
|
s.email = "edmundhighcock@sourceforge.net"
|
15
15
|
s.executables = ["coderunner"]
|
@@ -331,10 +331,13 @@ EOF
|
|
331
331
|
unless copts[:C]
|
332
332
|
if FileTest.exist? file=Dir.pwd + '/.code_runner_script_defaults.rb'
|
333
333
|
copts[:C] = eval(File.read(file))[:code]
|
334
|
+
copts[:m] = eval(File.read(file))[:modlet]
|
334
335
|
elsif self.runner
|
335
336
|
copts[:C] = self.runner.code
|
337
|
+
copts[:m] = self.runner.modlet
|
336
338
|
end
|
337
339
|
end
|
340
|
+
#ep ['code', 'modlet is', copts[:C], copts[:m]]
|
338
341
|
|
339
342
|
run_class = setup_run_class(copts[:C], modlet: copts[:m])
|
340
343
|
run_class.class_eval(string)
|
@@ -546,6 +546,7 @@ def self.parse_input_file(input_file, strict=true)
|
|
546
546
|
hash = namelist_hash[namelist] = {}
|
547
547
|
#p $~
|
548
548
|
scan_text_for_variables($~.to_s).each do |var, val|
|
549
|
+
#ep ['Varval', var, val]
|
549
550
|
add_code_variable_to_namelist(namelist, var, val) if @strict
|
550
551
|
hash[var] = val
|
551
552
|
end
|
@@ -761,12 +762,14 @@ def self.defaults_file_text_from_input_file(input_file)
|
|
761
762
|
|
762
763
|
hash = parse_input_file(input_file)
|
763
764
|
#pp hash; exit
|
765
|
+
#ep ['class', self.to_s, 'namelists', rcp.namelists.keys, 'code_long', rcp.code_long, 'namelist_hashes', rcp.namelists.values.map{|v| v.class}]
|
764
766
|
rcp.namelists.each do |namelist, namelist_hash|
|
765
767
|
#ep namelist
|
766
768
|
if namelist_hash[:enumerator] # ie. This is an indexed namelist
|
767
769
|
#p namelist_hash[:enumerator]
|
768
770
|
enumerator = namelist_hash[:enumerator][:name]
|
769
771
|
enum_hash = hash.find{|nml, nmlh| nmlh[enumerator]}
|
772
|
+
next unless enum_hash
|
770
773
|
#pp enum_hash
|
771
774
|
enum = enum_hash[1][enumerator]
|
772
775
|
enum.times{|i| string << namelist_defaults_text(hash, namelist, namelist_hash, i+1)}
|
@@ -432,6 +432,7 @@ class CodeRunner
|
|
432
432
|
# ep run_class_names
|
433
433
|
|
434
434
|
modlet_file = "#{code}crmod/#{modlet}.rb"
|
435
|
+
#ep ['requiring modlet file']
|
435
436
|
require modlet_file
|
436
437
|
run_class = recursive_const_get(run_class_name)
|
437
438
|
run_class.instance_variable_set(:@modlet, modlet)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coderunner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: graphkit
|