diff --git a/antarest/launcher/adapters/slurm_launcher/slurm_launcher.py b/antarest/launcher/adapters/slurm_launcher/slurm_launcher.py index 714ce6d0e5..92e2755408 100644 --- a/antarest/launcher/adapters/slurm_launcher/slurm_launcher.py +++ b/antarest/launcher/adapters/slurm_launcher/slurm_launcher.py @@ -285,7 +285,7 @@ def _import_study_output( xpansion_mode: t.Optional[str] = None, log_dir: t.Optional[str] = None, ) -> t.Optional[str]: - if xpansion_mode is not None: + if xpansion_mode: self._import_xpansion_result(job_id, xpansion_mode) launcher_logs: t.Dict[str, t.List[Path]] = {} @@ -331,14 +331,6 @@ def _import_xpansion_result(self, job_id: str, xpansion_mode: str) -> None: ) output_path = unzipped_output_path - if (output_path / "updated_links").exists(): - logger.warning("Skipping updated links") - self.callbacks.append_after_log(job_id, "Skipping updated links") - else: - shutil.copytree( - self.local_workspace / STUDIES_OUTPUT_DIR_NAME / job_id / "input" / "links", - output_path / "updated_links", - ) if xpansion_mode == "r": shutil.copytree( self.local_workspace / STUDIES_OUTPUT_DIR_NAME / job_id / "user" / "expansion", diff --git a/tests/launcher/test_slurm_launcher.py b/tests/launcher/test_slurm_launcher.py index 9476f86be8..a509342837 100644 --- a/tests/launcher/test_slurm_launcher.py +++ b/tests/launcher/test_slurm_launcher.py @@ -1,6 +1,5 @@ import os import random -import shutil import textwrap import uuid from argparse import Namespace @@ -400,13 +399,6 @@ def test_import_study_output(launcher_config, tmp_path) -> None: xpansion_test_file.write_text("world") output_dir = launcher_config.launcher.slurm.local_workspace / "OUTPUT" / "1" / "output" / "output_name" output_dir.mkdir(parents=True) - assert not (output_dir / "updated_links" / "something").exists() - assert not (output_dir / "updated_links" / "something").exists() - - slurm_launcher._import_study_output("1", "cpp") - assert (output_dir / "updated_links" / "something").exists() - assert (output_dir / "updated_links" / "something").read_text() == "hello" - shutil.rmtree(output_dir / "updated_links") slurm_launcher._import_study_output("1", "r") assert (output_dir / "results" / "something_else").exists()