diff --git a/cads_api_client/legacy_api_client.py b/cads_api_client/legacy_api_client.py index cb1c7c7..ed82808 100644 --- a/cads_api_client/legacy_api_client.py +++ b/cads_api_client/legacy_api_client.py @@ -133,9 +133,10 @@ def issue_deprecated_kwargs_warning(self, **kwargs: Any) -> None: ) @classmethod - def raise_not_implemented_error(self) -> None: + def raise_toolbox_error(self) -> None: raise NotImplementedError( - "This is a beta version. This functionality has not been implemented yet." + "Legacy CDS Toolbox is now discontinued." + " Watch for announcements/updates on new CDS improved capabilities on our Forum (https://forum.ecmwf.int/)." ) @overload @@ -190,11 +191,13 @@ def error(self, *args: Any, **kwargs: Any) -> None: def debug(self, *args: Any, **kwargs: Any) -> None: self.log(logging.DEBUG, *args, **kwargs) - def service(self, name, *args, **kwargs): # type: ignore - self.raise_not_implemented_error() + @typing.no_type_check + def service(self, name, *args, **kwargs): + self.raise_toolbox_error() - def workflow(self, code, *args, **kwargs): # type: ignore - self.raise_not_implemented_error() + @typing.no_type_check + def workflow(self, code, *args, **kwargs): + self.raise_toolbox_error() def status(self, context: Any = None) -> dict[str, list[str]]: status = collections.defaultdict(list) diff --git a/tests/integration_test_70_legacy_api_client.py b/tests/integration_test_70_legacy_api_client.py index d8355d8..9ea8e03 100644 --- a/tests/integration_test_70_legacy_api_client.py +++ b/tests/integration_test_70_legacy_api_client.py @@ -305,3 +305,10 @@ def test_legacy_api_client_warning( metadata="b", # type: ignore[arg-type] forget="c", # type: ignore[arg-type] ) + + +def test_legacy_api_client_toolbox(legacy_client: LegacyApiClient) -> None: + with pytest.raises(NotImplementedError): + legacy_client.service("service") + with pytest.raises(NotImplementedError): + legacy_client.workflow("workflow")