diff options
author | Christoph Helma <helma@in-silico.ch> | 2011-03-03 12:57:43 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2011-03-03 12:57:43 +0100 |
commit | 8b46f5a4f389d7cd54f6e8b38025d275f9d3ed1b (patch) | |
tree | 3d786b2f371db0f097abf11438def17beac820cf /test | |
parent | 5f243f1e9e0a8e12cd8a2267bcec3140d21bf445 (diff) | |
parent | d5378ac285f200a9a75b52030856c77f4697325f (diff) |
Merge branch 'development' of github.com:helma/opentox-validation into development
Conflicts:
application.rb
example.rb
report/report_persistance.rb
Diffstat (limited to 'test')
-rw-r--r-- | test/test_examples.rb | 28 | ||||
-rw-r--r-- | test/test_examples_util.rb | 8 |
2 files changed, 18 insertions, 18 deletions
diff --git a/test/test_examples.rb b/test/test_examples.rb index bbe6ddd..34a9f67 100644 --- a/test/test_examples.rb +++ b/test/test_examples.rb @@ -67,15 +67,15 @@ module ValidationExamples class LazarHamsterSplit < HamsterSplit def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-algorithm"],"lazar") - @algorithm_params = "feature_generation_uri="+File.join(@@config[:services]["opentox-algorithm"],"fminer") + @algorithm_uri = File.join(CONFIG[:services]["opentox-algorithm"],"lazar") + @algorithm_params = "feature_generation_uri="+File.join(CONFIG[:services]["opentox-algorithm"],"fminer") super end end class MajorityHamsterSplit < HamsterSplit def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-majority"],"/class/algorithm") + @algorithm_uri = File.join(CONFIG[:services]["opentox-majority"],"/class/algorithm") super end end @@ -93,15 +93,15 @@ module ValidationExamples class MajorityHamsterTrainingTest < HamsterTrainingTest def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-majority"],"/class/algorithm") + @algorithm_uri = File.join(CONFIG[:services]["opentox-majority"],"/class/algorithm") super end end class LazarHamsterTrainingTest < HamsterTrainingTest def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-algorithm"],"lazar") - @algorithm_params = "feature_generation_uri="+File.join(@@config[:services]["opentox-algorithm"],"fminer") + @algorithm_uri = File.join(CONFIG[:services]["opentox-algorithm"],"lazar") + @algorithm_params = "feature_generation_uri="+File.join(CONFIG[:services]["opentox-algorithm"],"fminer") super end end @@ -118,15 +118,15 @@ module ValidationExamples class MajorityHamsterCrossvalidation < HamsterCrossvalidation def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-majority"],"/class/algorithm") + @algorithm_uri = File.join(CONFIG[:services]["opentox-majority"],"/class/algorithm") super end end class LazarHamsterCrossvalidation < HamsterCrossvalidation def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-algorithm"],"lazar") - @algorithm_params = "feature_generation_uri="+File.join(@@config[:services]["opentox-algorithm"],"fminer") + @algorithm_uri = File.join(CONFIG[:services]["opentox-algorithm"],"lazar") + @algorithm_params = "feature_generation_uri="+File.join(CONFIG[:services]["opentox-algorithm"],"fminer") super end end @@ -142,15 +142,15 @@ module ValidationExamples class MajorityISTHamsterCrossvalidation < ISTHamsterCrossvalidation def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-majority"],"/class/algorithm") + @algorithm_uri = File.join(CONFIG[:services]["opentox-majority"],"/class/algorithm") super end end class LazarISTHamsterCrossvalidation < ISTHamsterCrossvalidation def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-algorithm"],"lazar") - @algorithm_params = "feature_generation_uri="+File.join(@@config[:services]["opentox-algorithm"],"fminer") + @algorithm_uri = File.join(CONFIG[:services]["opentox-algorithm"],"lazar") + @algorithm_params = "feature_generation_uri="+File.join(CONFIG[:services]["opentox-algorithm"],"fminer") super end end @@ -240,7 +240,7 @@ module ValidationExamples class MajorityCacoTrainingTest < CacoTrainingTest def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-majority"],"/regr/algorithm") + @algorithm_uri = File.join(CONFIG[:services]["opentox-majority"],"/regr/algorithm") super end end @@ -301,4 +301,4 @@ module ValidationExamples end #puts ValidationExamples.list -#puts ValidationExamples.select("1,2a").inspect
\ No newline at end of file +#puts ValidationExamples.select("1,2a").inspect diff --git a/test/test_examples_util.rb b/test/test_examples_util.rb index 09f7d6c..7eb69ff 100644 --- a/test/test_examples_util.rb +++ b/test/test_examples_util.rb @@ -5,7 +5,7 @@ module ValidationExamples @@dataset_uris = {} - def self.upload_dataset(file, dataset_service=@@config[:services]["opentox-dataset"], file_type="application/x-yaml") + def self.upload_dataset(file, dataset_service=CONFIG[:services]["opentox-dataset"], file_type="application/x-yaml") raise "File not found: "+file.path.to_s unless File.exist?(file.path) if @@dataset_uris[file.path.to_s]==nil data = File.read(file.path) @@ -40,7 +40,7 @@ module ValidationExamples $test_case.post uri,params return wait($test_case.last_response.body) else - return OpenTox::RestClientWrapper.post(File.join(@@config[:services]["opentox-validation"],uri),params) + return OpenTox::RestClientWrapper.post(File.join(CONFIG[:services]["opentox-validation"],uri),params) end end @@ -50,7 +50,7 @@ module ValidationExamples $test_case.get uri,nil,'HTTP_ACCEPT' => accept_header return wait($test_case.last_response.body) else - return OpenTox::RestClientWrapper.get(File.join(@@config[:services]["opentox-validation"],uri),{:accept => accept_header}) + return OpenTox::RestClientWrapper.get(File.join(CONFIG[:services]["opentox-validation"],uri),{:accept => accept_header}) end end @@ -295,4 +295,4 @@ module ValidationExamples "crossvalidation" end end -end
\ No newline at end of file +end |