coderunner 0.14.16 → 0.14.17

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
  SHA1:
3
- metadata.gz: f02342c2ff349901cbd2d361c9619ac0efb03401
4
- data.tar.gz: f040499a52713af1b238bc1683c8738f5870fd32
3
+ metadata.gz: 9ff03c52c882c64aef522a5dd07b5dd28055aa3a
4
+ data.tar.gz: 738466df4ceb7eb4705c165ccc5341a723ead8e4
5
5
  SHA512:
6
- metadata.gz: c820d8b2bea2ac147111a53ac23c4139ca3bf9ec12b6e8e21f9490a2fb5ab3d24e5a81f79d8153041825b5aa4df44ab582307ccb9efc2144935f878854477ed7
7
- data.tar.gz: 1851d04d417e52c92b645ebeacec35706d9fd8915fa2a589a8b441ddfb7d1ae2e86f72b867b60687e4743b198abec6fa67604337cde1eda8d24c8190caa1657c
6
+ metadata.gz: 131c06a3e00adbd565a95842a8e4993034ab558fda5eac89a40f89a9e14a184e63fba90e80b4297af307db312e908f2c59f0dddc017a54b33fb321c3ceed3b78
7
+ data.tar.gz: ebefbcd6d9b3d3e040c30512b1831fe3f1762a7f5d3efa6211dff581a5e3c8fc4b402fc8c05b7f9a701d948f415e835bf3f2bdc7385448ee6393e1eb9f746d59
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.14.16
1
+ 0.14.17
data/coderunner.gemspec CHANGED
@@ -2,17 +2,17 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: coderunner 0.14.16 ruby lib
5
+ # stub: coderunner 0.14.17 ruby lib
6
6
  # stub: ext/extconf.rb
7
7
 
8
8
  Gem::Specification.new do |s|
9
9
  s.name = "coderunner"
10
- s.version = "0.14.16"
10
+ s.version = "0.14.17"
11
11
 
12
12
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
13
13
  s.require_paths = ["lib"]
14
14
  s.authors = ["Edmund Highcock"]
15
- s.date = "2014-05-26"
15
+ s.date = "2014-07-02"
16
16
  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."
17
17
  s.email = "edmundhighcock@sourceforge.net"
18
18
  s.executables = ["coderunner"]
@@ -569,10 +569,12 @@ end
569
569
  # Scan the text of a namelist from an input file and return an array variables with their default values
570
570
 
571
571
  def self.scan_text_for_variables(text)
572
- regex = Regexp.new("#{rcp.matching_regex.to_s}\\s*(?:\\!(?<comment>.*))?[\\n|;]")
572
+ regex = Regexp.new("#{rcp.matching_regex.to_s}\\s*(?:\\!(?<comment>.*))?(?:\\n|;|\\Z)")
573
573
  arr = []
574
+ #ep ['scanning text', text]
574
575
  text.scan(regex) do
575
576
  match = $~
577
+ #ep ['scan_match', match]
576
578
  var = match[:name].downcase.to_sym
577
579
  default = match[:default.to_sym]
578
580
  default = (match[:float] or match[:complex]) ? match[:default].gsub(/(\.)(\D|$)/, '\10\2').gsub(/[dD]/, 'e').gsub(/(\D|^)(\.)/, '\10\2') : match[:default]
@@ -1085,7 +1087,7 @@ def self.get_namelists_and_variables_from_source_code(source)
1085
1087
  all_variables_in_source = {}
1086
1088
  namelist_declarations = {}
1087
1089
  #source.scan(/^\s*namelist\s*\/(?<namelist>\w+)\/(?<variables>(?:(?:&\s*[\n\r]+)|[^!\n\r])*)/) do
1088
- source.scan(Regexp.new("#{/^\s*namelist\s*\/\s*(?<namelist>\w+)\s*\//}(?<variables>#{FORTRAN_SINGLE_LINE})")) do
1090
+ source.scan(Regexp.new("#{/^\s*namelist\s*\/\s*(?<namelist>\w+)\s*\//i}(?<variables>#{FORTRAN_SINGLE_LINE})", Regexp::IGNORECASE)) do
1089
1091
  namelist = $~[:namelist].to_s.downcase.to_sym
1090
1092
  variables = $~[:variables].gsub(/!.*/, '')
1091
1093
  eputs namelist, variables
@@ -1112,9 +1114,9 @@ end
1112
1114
  # Try to get a sample value of the
1113
1115
  def self.get_sample_value(source, var)
1114
1116
  ep var
1115
- values_text = source.scan(Regexp.new("\\W#{var}\\s*=\\s*.+")).join("\n")
1117
+ values_text = source.scan(Regexp.new("\\W#{var}\\s*=\\s*.+", Regexp::IGNORECASE)).join("\n")
1116
1118
  ep values_text
1117
- values = scan_text_for_variables(values_text).map{|(v,val)| val}
1119
+ values = scan_text_for_variables(values_text.sub(/_RKIND/, '')).map{|(v,val)| val}
1118
1120
  values.uniq!
1119
1121
  # ep values if var == :nbeta
1120
1122
  values.delete_if{|val| val.kind_of? String} if values.find{|val| val.kind_of? Numeric}
@@ -824,7 +824,7 @@ to your code module.
824
824
 
825
825
  @run_info = rcp.run_info || [] # Run info can optionally be defined in the code module.
826
826
  # ep @run_info
827
- @run_info = rcp.run_info + ([:preamble, :job_no, :running, :id, :status, :sys, :is_component, :naming_pars, :run_name, :resubmit_id, :real_id, :component_runs, :parameter_hash, :parameter_hash_string, :output_file, :error_file, :extra_files] + SUBMIT_OPTIONS) #.each{|v| RUN_INFO.push v} unless RUN_INFO.include? :job_no
827
+ @run_info = rcp.run_info + ([:preamble, :job_no, :running, :id, :status, :sys, :is_component, :naming_pars, :run_name, :resubmit_id, :real_id, :component_runs, :parameter_hash, :parameter_hash_string, :output_file, :error_file, :extra_files, :code_run_environment] + SUBMIT_OPTIONS) #.each{|v| RUN_INFO.push v} unless RUN_INFO.include? :job_no
828
828
  @all = (rcp.variables + rcp.results + rcp.run_info) #.each{|v| ALL.push v}
829
829
  # ep "GOT HERE"
830
830
  (@all + [:directory, :run_name, :modlet, :relative_directory]).each{|var| send(:attr_accessor, var)}
@@ -1055,7 +1055,7 @@ end
1055
1055
  # is to return an empty string.
1056
1056
 
1057
1057
  def code_run_environment
1058
- ""
1058
+ @code_run_environment
1059
1059
  end
1060
1060
 
1061
1061
  # Prints a warning message, useful for pre-submit checks.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coderunner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.16
4
+ version: 0.14.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edmund Highcock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-26 00:00:00.000000000 Z
11
+ date: 2014-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphkit