Skip to content

Commit

Permalink
ccs_init is called at the end of binding initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerilk committed Oct 4, 2024
1 parent c9f323a commit 469acf6
Show file tree
Hide file tree
Showing 19 changed files with 2 additions and 73 deletions.
2 changes: 2 additions & 0 deletions bindings/ruby/lib/cconfigspace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@
require_relative 'cconfigspace/tree'
require_relative 'cconfigspace/tree_space'
require_relative 'cconfigspace/tree_configuration'

CCS.init
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTest < Minitest::Test
def setup
CCS.init
end

def test_version
ver = CCS.version
assert(ver.kind_of?(CCS::Version))
Expand Down
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_configuration_space.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestConfigurationSpace < Minitest::Test
def setup
CCS.init
end

def test_create
h1 = CCS::NumericalParameter::Float.new
h2 = CCS::NumericalParameter::Float.new
Expand Down
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_distribution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestDistribution < Minitest::Test
def setup
CCS.init
end

def test_from_handle_roulette
areas = [ 1.0, 2.0, 1.0, 0.5 ]
d = CCS::RouletteDistribution::new(areas: areas)
Expand Down
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_evaluation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestEvaluation < Minitest::Test
def setup
CCS.init
end

def test_create
h1 = CCS::NumericalParameter::Float.new
h2 = CCS::NumericalParameter::Float.new
Expand Down
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_expression.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestExpression < Minitest::Test
def setup
CCS.init
end

def test_create
e = CCS::Expression::Add.new(left: 1.0, right: 2.0)
assert_equal( :CCS_OBJECT_TYPE_EXPRESSION, e.object_type )
Expand Down
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_expression_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestExpressionParser < Minitest::Test
def setup
CCS.init
end

def test_parse
exp = "1.0 + 1 == 2 || +1 == 3e0 && \"y\\nes\" == 'no' "
res = CCS.parse(exp)
Expand Down
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_feature_space.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestFeatureSpace < Minitest::Test
def setup
CCS.init
end

def test_create
h1 = CCS::NumericalParameter::Float.new
h2 = CCS::NumericalParameter::Float.new
Expand Down
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_features_tuner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestFeaturesTuner < Minitest::Test
def setup
CCS.init
end

def create_tuning_problem
f1 = CCS::CategoricalParameter::new(values: [true, false])
fs = CCS::FeatureSpace::new(name: "fspace", parameters: [f1])
Expand Down
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_interval.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestInterval < Minitest::Test
def setup
CCS.init
end

def test_new
i = CCS::Interval::new(type: :CCS_NUMERIC_TYPE_FLOAT, lower: -1.0, upper: 1.0)
assert_equal( :CCS_NUMERIC_TYPE_FLOAT, i.type)
Expand Down
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_objective_space.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestObjectiveSpace < Minitest::Test
def setup
CCS.init
end

def test_create
h = CCS::NumericalParameter::Float.new
cs = CCS::ConfigurationSpace::new(name: "cs", parameters: [h])
Expand Down
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_parameter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestParameter < Minitest::Test
def setup
CCS.init
end

def test_from_handle_discrete
values = [0, 1.5, 2, 7.2]
h = CCS::DiscreteParameter::new(values: values)
Expand Down
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_rng.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestRng < Minitest::Test
def setup
CCS.init
end

def test_create
rng = CCS::Rng::new
assert_equal( :CCS_OBJECT_TYPE_RNG, rng.object_type )
Expand Down
5 changes: 0 additions & 5 deletions bindings/ruby/test/test_tree.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestTree < Minitest::Test
def setup
CCS.init
end


def test_create
rng = CCS::Rng.new
root = CCS::Tree.new(arity: 4, value: "foo")
Expand Down
5 changes: 0 additions & 5 deletions bindings/ruby/test/test_tree_evaluation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestTreeEvaluation < Minitest::Test

def setup
CCS.init
end

def generate_tree(depth, rank)
ar = depth - rank
ar = 0 if ar < 0
Expand Down
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_tree_space.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestTreeSpace < Minitest::Test
def setup
CCS.init
end

def generate_tree(depth, rank)
ar = depth - rank
ar = 0 if ar < 0
Expand Down
5 changes: 0 additions & 5 deletions bindings/ruby/test/test_tree_tuner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestTreeTuner < Minitest::Test

def setup
CCS.init
end

def generate_tree(depth, rank)
ar = depth - rank
ar = 0 if ar < 0
Expand Down
4 changes: 0 additions & 4 deletions bindings/ruby/test/test_tuner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
require_relative '../lib/cconfigspace'

class CConfigSpaceTestTuner < Minitest::Test
def setup
CCS.init
end

def create_tuning_problem
h1 = CCS::NumericalParameter::Float.new(lower: -5.0, upper: 5.0)
h2 = CCS::NumericalParameter::Float.new(lower: -5.0, upper: 5.0)
Expand Down
2 changes: 0 additions & 2 deletions bindings/ruby/test/tuner_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
require 'xmlrpc/server'
require 'base64'

CCS.init

class TunerData
attr_accessor :history, :optima
def initialize
Expand Down

0 comments on commit 469acf6

Please sign in to comment.