diff --git a/README.md b/README.md index 5039551..0c6a3fd 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ There are two main ways to interact with Hypermapper: either by using calling it import hypermapper hypermapper.optimize("json_name.py", blackbox-function) ``` -if you have a python interface to your application, or through the client-server functionality that interacts with your application through the terminal. In either case, a .json scenario file is required that sets up the optimization. This is where the input parameters are given as well as other run settings. Examples of scenario files can be found in tests/aux and the full template is found in hypermapper/schema.json. +if you have a python interface to your application, or through the client-server functionality that interacts with your application through the terminal. In either case, a .json scenario file is required that sets up the optimization. This is where the input parameters are given as well as other run settings. Examples of scenario files can be found in tests/auxiliary and the full template is found in hypermapper/schema.json. # Running Hypermapper with a black-box function To run it with a blackbox function, simply call the optimize() routine with a callable python-function and the name of the scenario file. diff --git a/tests/aux/asum.json b/tests/auxiliary/asum.json similarity index 100% rename from tests/aux/asum.json rename to tests/auxiliary/asum.json diff --git a/tests/aux/base_hartmann6.json b/tests/auxiliary/base_hartmann6.json similarity index 100% rename from tests/aux/base_hartmann6.json rename to tests/auxiliary/base_hartmann6.json diff --git a/tests/aux/base_hartmann6_discrete.json b/tests/auxiliary/base_hartmann6_discrete.json similarity index 100% rename from tests/aux/base_hartmann6_discrete.json rename to tests/auxiliary/base_hartmann6_discrete.json diff --git a/tests/aux/base_hartmann6_h.json b/tests/auxiliary/base_hartmann6_h.json similarity index 100% rename from tests/aux/base_hartmann6_h.json rename to tests/auxiliary/base_hartmann6_h.json diff --git a/tests/aux/branin4_resume.csv b/tests/auxiliary/branin4_resume.csv similarity index 100% rename from tests/aux/branin4_resume.csv rename to tests/auxiliary/branin4_resume.csv diff --git a/tests/aux/branin4_scenario1.json b/tests/auxiliary/branin4_scenario1.json similarity index 100% rename from tests/aux/branin4_scenario1.json rename to tests/auxiliary/branin4_scenario1.json diff --git a/tests/aux/branin4_scenario2.json b/tests/auxiliary/branin4_scenario2.json similarity index 100% rename from tests/aux/branin4_scenario2.json rename to tests/auxiliary/branin4_scenario2.json diff --git a/tests/aux/branin4_scenario_batch.json b/tests/auxiliary/branin4_scenario_batch.json similarity index 100% rename from tests/aux/branin4_scenario_batch.json rename to tests/auxiliary/branin4_scenario_batch.json diff --git a/tests/aux/branin4_scenario_bopro.json b/tests/auxiliary/branin4_scenario_bopro.json similarity index 100% rename from tests/aux/branin4_scenario_bopro.json rename to tests/auxiliary/branin4_scenario_bopro.json diff --git a/tests/aux/branin4_scenario_categorical.json b/tests/auxiliary/branin4_scenario_categorical.json similarity index 100% rename from tests/aux/branin4_scenario_categorical.json rename to tests/auxiliary/branin4_scenario_categorical.json diff --git a/tests/aux/branin4_scenario_cli.json b/tests/auxiliary/branin4_scenario_cli.json similarity index 100% rename from tests/aux/branin4_scenario_cli.json rename to tests/auxiliary/branin4_scenario_cli.json diff --git a/tests/aux/branin4_scenario_cli_batch.json b/tests/auxiliary/branin4_scenario_cli_batch.json similarity index 100% rename from tests/aux/branin4_scenario_cli_batch.json rename to tests/auxiliary/branin4_scenario_cli_batch.json diff --git a/tests/aux/branin4_scenario_discrete.json b/tests/auxiliary/branin4_scenario_discrete.json similarity index 100% rename from tests/aux/branin4_scenario_discrete.json rename to tests/auxiliary/branin4_scenario_discrete.json diff --git a/tests/aux/branin4_scenario_feas.json b/tests/auxiliary/branin4_scenario_feas.json similarity index 100% rename from tests/aux/branin4_scenario_feas.json rename to tests/auxiliary/branin4_scenario_feas.json diff --git a/tests/aux/branin4_scenario_fixed.json b/tests/auxiliary/branin4_scenario_fixed.json similarity index 100% rename from tests/aux/branin4_scenario_fixed.json rename to tests/auxiliary/branin4_scenario_fixed.json diff --git a/tests/aux/branin4_scenario_gp.json b/tests/auxiliary/branin4_scenario_gp.json similarity index 100% rename from tests/aux/branin4_scenario_gp.json rename to tests/auxiliary/branin4_scenario_gp.json diff --git a/tests/aux/branin4_scenario_gpy.json b/tests/auxiliary/branin4_scenario_gpy.json similarity index 100% rename from tests/aux/branin4_scenario_gpy.json rename to tests/auxiliary/branin4_scenario_gpy.json diff --git a/tests/aux/branin4_scenario_gpytorch.json b/tests/auxiliary/branin4_scenario_gpytorch.json similarity index 100% rename from tests/aux/branin4_scenario_gpytorch.json rename to tests/auxiliary/branin4_scenario_gpytorch.json diff --git a/tests/aux/branin4_scenario_integer.json b/tests/auxiliary/branin4_scenario_integer.json similarity index 100% rename from tests/aux/branin4_scenario_integer.json rename to tests/auxiliary/branin4_scenario_integer.json diff --git a/tests/aux/branin4_scenario_pibo.json b/tests/auxiliary/branin4_scenario_pibo.json similarity index 100% rename from tests/aux/branin4_scenario_pibo.json rename to tests/auxiliary/branin4_scenario_pibo.json diff --git a/tests/aux/branin4_scenario_pibo_real.json b/tests/auxiliary/branin4_scenario_pibo_real.json similarity index 100% rename from tests/aux/branin4_scenario_pibo_real.json rename to tests/auxiliary/branin4_scenario_pibo_real.json diff --git a/tests/aux/branin4_scenario_pibo_small.json b/tests/auxiliary/branin4_scenario_pibo_small.json similarity index 100% rename from tests/aux/branin4_scenario_pibo_small.json rename to tests/auxiliary/branin4_scenario_pibo_small.json diff --git a/tests/aux/branin4_scenario_resume.json b/tests/auxiliary/branin4_scenario_resume.json similarity index 100% rename from tests/aux/branin4_scenario_resume.json rename to tests/auxiliary/branin4_scenario_resume.json diff --git a/tests/aux/branin4_scenario_rf.json b/tests/auxiliary/branin4_scenario_rf.json similarity index 100% rename from tests/aux/branin4_scenario_rf.json rename to tests/auxiliary/branin4_scenario_rf.json diff --git a/tests/aux/branin_scenario_gp.json b/tests/auxiliary/branin_scenario_gp.json similarity index 100% rename from tests/aux/branin_scenario_gp.json rename to tests/auxiliary/branin_scenario_gp.json diff --git a/tests/aux/chakong_haimes_scenario.json b/tests/auxiliary/chakong_haimes_scenario.json similarity index 100% rename from tests/aux/chakong_haimes_scenario.json rename to tests/auxiliary/chakong_haimes_scenario.json diff --git a/tests/aux/functions.py b/tests/auxiliary/functions.py similarity index 100% rename from tests/aux/functions.py rename to tests/auxiliary/functions.py diff --git a/tests/aux/harris.json b/tests/auxiliary/harris.json similarity index 100% rename from tests/aux/harris.json rename to tests/auxiliary/harris.json diff --git a/tests/aux/hartmann6_scenario_gp.json b/tests/auxiliary/hartmann6_scenario_gp.json similarity index 100% rename from tests/aux/hartmann6_scenario_gp.json rename to tests/auxiliary/hartmann6_scenario_gp.json diff --git a/tests/aux/perm.json b/tests/auxiliary/perm.json similarity index 100% rename from tests/aux/perm.json rename to tests/auxiliary/perm.json diff --git a/tests/aux/rs_cot_1024_scenario.json b/tests/auxiliary/rs_cot_1024_scenario.json similarity index 100% rename from tests/aux/rs_cot_1024_scenario.json rename to tests/auxiliary/rs_cot_1024_scenario.json diff --git a/tests/aux/test_cli.py b/tests/auxiliary/test_cli.py similarity index 95% rename from tests/aux/test_cli.py rename to tests/auxiliary/test_cli.py index 7bf5c63..4a8bde8 100644 --- a/tests/aux/test_cli.py +++ b/tests/auxiliary/test_cli.py @@ -1,4 +1,4 @@ -from aux.functions import branin4_function +from auxiliary.functions import branin4_function import hypermapper import sys from subprocess import Popen, PIPE @@ -14,7 +14,7 @@ def branin4_cli(path, json="branin4_scenario_cli.json"): cmd = [ "python", os.path.join(f"{path}", "..", "hypermapper", "run.py"), - os.path.join(f"{path}", "..", "tests", "aux", json), + os.path.join(f"{path}", "..", "tests", "auxiliary", json), ] print(cmd) # Command to launch Hypermapper p = Popen( diff --git a/tests/test_all.py b/tests/test_all.py index 71075a1..9d11c38 100644 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -2,8 +2,8 @@ from matplotlib import pyplot as plt import hypermapper # noqa -from aux.functions import * -from aux.test_cli import branin4_cli +from auxiliary.functions import * +from auxiliary.test_cli import branin4_cli from typing import Callable, Optional, List, Dict from hypermapper.util.file import read_settings_file @@ -16,13 +16,13 @@ def runBenchmark(scenario: str, function: Callable, output_file: Optional[str] = None): - settings_file = os.path.join(f"{testing_directory}", "aux", f"{scenario}.json") + settings_file = os.path.join(f"{testing_directory}", "auxiliary", f"{scenario}.json") settings = read_settings_file(settings_file) settings["log_file"] = os.path.join( f"{testing_directory}", "logs", f"{scenario.split('.')[0]}.log" ) settings["resume_optimization_file"] = os.path.join( - f"{testing_directory}", "aux", f"{settings['resume_optimization_file']}" + f"{testing_directory}", "auxiliary", f"{settings['resume_optimization_file']}" ) if output_file: settings["output_data_file"] = os.path.join( @@ -49,7 +49,7 @@ def run_performance_test( for filename, function, bname in zip(setting_files, functions, benchmark_names): for setting, name in zip(additional_settings, names): settings_file = os.path.join( - f"{testing_directory}", "aux", f"{filename}.json" + f"{testing_directory}", "auxiliary", f"{filename}.json" ) settings = read_settings_file(settings_file) settings.update(setting) @@ -294,7 +294,7 @@ def crash_test(): # RS settings_file = os.path.join( - f"{testing_directory}", "aux", "branin4_scenario_gp.json" + f"{testing_directory}", "auxiliary", "branin4_scenario_gp.json" ) settings = read_settings_file(settings_file) settings["log_file"] = os.path.join(