diff --git a/examples/case_h/models.yml b/examples/case_h/models.yml index ada2928..e2c99f7 100644 --- a/examples/case_h/models.yml +++ b/examples/case_h/models.yml @@ -8,7 +8,6 @@ n_sims: 100 mc: 3.5 seed: 23 - build: venv - Poisson Mock: giturl: https://git.gfz-potsdam.de/csep/it_experiment/models/pymock.git repo_hash: v0.1 @@ -19,7 +18,6 @@ n_sims: 100 mag_min: 3.5 seed: 23 - build: venv - Negbinom Mock: giturl: https://git.gfz-potsdam.de/csep/it_experiment/models/pymock.git repo_hash: v0.1 @@ -31,5 +29,4 @@ apply_mc_to_lambda: True distribution: negbinom seed: 23 - build: venv prefix: pymock diff --git a/floatcsep/environments.py b/floatcsep/environments.py index 9222452..9d1c627 100644 --- a/floatcsep/environments.py +++ b/floatcsep/environments.py @@ -99,7 +99,7 @@ def __init__(self, base_name: str, model_directory: str): base_name (str): The base name, i.e., model name, for the conda environment. model_directory (str): The directory containing the model files. """ - self.base_name = base_name + self.base_name = base_name.replace(' ', '_') self.model_directory = model_directory self.env_name = self.generate_env_name() self.package_manager = self.detect_package_manager() diff --git a/floatcsep/model.py b/floatcsep/model.py index 93bb310..64906d5 100644 --- a/floatcsep/model.py +++ b/floatcsep/model.py @@ -390,7 +390,7 @@ def __init__( self.func_kwargs = func_kwargs or {} self.path = ModelTree(kwargs.get("workdir", os.getcwd()), model_path) - self.build = kwargs.get("build", "docker") + self.build = kwargs.get("build", None) self.run_prefix = "" if self.func: @@ -474,7 +474,7 @@ def forecast_from_func(self, start_date: datetime, end_date: datetime, **kwargs) self.prepare_args(start_date, end_date, **kwargs) log.info( - f"Running {self.name} using {self.build}:" + f"Running {self.name} using {self.environment.__class__.__name__}:" f" {timewindow2str([start_date, end_date])}" ) diff --git a/requirements_dev.txt b/requirements_dev.txt index 329a157..9c8799a 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -19,7 +19,6 @@ pyproj pyshp pytest pytest-cov -pytest-asyncio pyyaml requests scipy diff --git a/tests/qa/test_data.py b/tests/qa/test_data.py index 3e42748..96dd1d2 100644 --- a/tests/qa/test_data.py +++ b/tests/qa/test_data.py @@ -75,11 +75,6 @@ def test_case_g(self, *args): self.run_evaluation(cfg) self.assertEqual(1, 1) - def test_case_h(self, *args): - cfg = self.get_runpath('h') - self.run_evaluation(cfg) - self.assertEqual(1, 1) - @patch.object(Experiment, "generate_report") @patch.object(Experiment, "plot_forecasts") diff --git a/tests/unit/test_model.py b/tests/unit/test_model.py index c57dadf..f63a2d9 100644 --- a/tests/unit/test_model.py +++ b/tests/unit/test_model.py @@ -341,7 +341,7 @@ def test_argprep(self): with open(os.path.join(model_path, "input", "args.txt"), "w") as args: args.write("start_date = foo\nend_date = bar") - model = self.init_model("a", model_path, func="func") + model = self.init_model("a", model_path, func="func", build='docker') start = datetime(2000, 1, 1) end = datetime(2000, 1, 2) model.stage([[start, end]])