From 3ec64522bc4176308febca8ac3266ad71638c82b Mon Sep 17 00:00:00 2001 From: malmans2 Date: Thu, 8 May 2025 16:20:24 +0200 Subject: [PATCH 1/4] migrate to ecmwf-datastores-client --- cdsapi/api.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cdsapi/api.py b/cdsapi/api.py index 051186d..9e67c03 100644 --- a/cdsapi/api.py +++ b/cdsapi/api.py @@ -282,9 +282,9 @@ def __new__(cls, url=None, key=None, *args, **kwargs): if ":" in token: return super().__new__(cls) - import datapi.legacy_api_client + from ecmwf.datastores.legacy_client import LegacyClient - return super().__new__(datapi.legacy_api_client.LegacyApiClient) + return super().__new__(LegacyClient) def __init__( self, diff --git a/setup.py b/setup.py index e47c0af..a73cbeb 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def read(fname): include_package_data=True, python_requires=">=3.8", install_requires=[ - "datapi", + "ecmwf-datastores-client @ git+https://github.com/ecmwf/ecmwf-datastores-client.git@COPDS-2640", "requests>=2.5.0", "tqdm", ], From 46aa55c87f8ec259a03b0cb4261cee086c41e491 Mon Sep 17 00:00:00 2001 From: malmans2 Date: Fri, 9 May 2025 09:47:00 +0200 Subject: [PATCH 2/4] use main --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a73cbeb..b73a0ea 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def read(fname): include_package_data=True, python_requires=">=3.8", install_requires=[ - "ecmwf-datastores-client @ git+https://github.com/ecmwf/ecmwf-datastores-client.git@COPDS-2640", + "ecmwf-datastores-client @ git+https://github.com/ecmwf/ecmwf-datastores-client.git", "requests>=2.5.0", "tqdm", ], From f1420c1f30a757acb4e62a97bf4d6cd10ef6eab0 Mon Sep 17 00:00:00 2001 From: malmans2 Date: Fri, 9 May 2025 12:24:32 +0200 Subject: [PATCH 3/4] use pypi --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b73a0ea..27c5ceb 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def read(fname): include_package_data=True, python_requires=">=3.8", install_requires=[ - "ecmwf-datastores-client @ git+https://github.com/ecmwf/ecmwf-datastores-client.git", + "ecmwf-datastores-client", "requests>=2.5.0", "tqdm", ], From 7bbda2047986dcd50290e0ecffaeb0b2cea6fdf5 Mon Sep 17 00:00:00 2001 From: malmans2 Date: Mon, 12 May 2025 09:09:15 +0200 Subject: [PATCH 4/4] update tests --- tests/test_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 69e86f8..6445a09 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1,6 +1,6 @@ import os -import datapi.legacy_api_client +import ecmwf.datastores.legacy_client import pytest import cdsapi @@ -33,7 +33,7 @@ def test_request(): ), ( "", - datapi.legacy_api_client.LegacyApiClient, + ecmwf.datastores.legacy_client.LegacyClient, ), ], )