From 8fcff3b90c1088db5f921ec8073dfcc583c9a760 Mon Sep 17 00:00:00 2001 From: belthlemar Date: Wed, 25 Sep 2024 17:59:10 +0200 Subject: [PATCH] bump and use v1.0.6 --- antarest/launcher/service.py | 2 +- requirements.txt | 2 +- tests/storage/business/test_study_version_upgrader.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/antarest/launcher/service.py b/antarest/launcher/service.py index ee193cadd8..824bfc75b0 100644 --- a/antarest/launcher/service.py +++ b/antarest/launcher/service.py @@ -228,7 +228,7 @@ def run_study( job_uuid = self._generate_new_id() logger.info(f"New study launch (study={study_uuid}, job_id={job_uuid})") study_info = self.study_service.get_study_information(uuid=study_uuid, params=params) - solver_version = study_version or study_info.version.__str__() + solver_version = study_version or study_info.version.__format__(format_spec="ddd") self._assert_launcher_is_initialized(launcher) assert_permission( diff --git a/requirements.txt b/requirements.txt index 7d9aa2e336..228814e8c5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ Antares-Launcher~=1.3.2 -antares-study-version~=1.0.5 +antares-study-version~=1.0.6 antares-timeseries-generation~=0.1.5 # When you install `fastapi[all]`, you get FastAPI along with additional dependencies: diff --git a/tests/storage/business/test_study_version_upgrader.py b/tests/storage/business/test_study_version_upgrader.py index 979f38d064..4fa7e940ec 100644 --- a/tests/storage/business/test_study_version_upgrader.py +++ b/tests/storage/business/test_study_version_upgrader.py @@ -124,15 +124,15 @@ def test_fails_because_of_versions_asked(tmp_path: Path): with zipfile.ZipFile(path_study) as zip_output: zip_output.extractall(path=study_dir) # Try to upgrade with an unknown version - with pytest.raises(InvalidUpgrade, match="Cannot downgrade from version '720' to '600'"): + with pytest.raises(InvalidUpgrade, match="Cannot downgrade from version '7.2' to '6'"): StudyUpgrader(study_dir, "600").upgrade() # Try to upgrade with the current version - with pytest.raises(InvalidUpgrade, match="Your study is already in version '720'"): + with pytest.raises(InvalidUpgrade, match="Your study is already in version '7.2'"): StudyUpgrader(study_dir, "720").upgrade() # Try to upgrade with an old version with pytest.raises( InvalidUpgrade, - match="Cannot downgrade from version '720' to '710'", + match="Cannot downgrade from version '7.2' to '7.1'", ): StudyUpgrader(study_dir, "710").upgrade() # Try to upgrade with a version that does not exist