Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.

Commit 6dd3e9a

Browse files
authored
remove deprecations (#3)
1 parent e56caca commit 6dd3e9a

File tree

4 files changed

+4
-36
lines changed

4 files changed

+4
-36
lines changed

datapi/catalogue.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from __future__ import annotations
1616

1717
import datetime
18-
import warnings
1918
from typing import Any, Callable
2019

2120
import attrs
@@ -87,14 +86,6 @@ def constraints(self) -> list[dict[str, Any]]:
8786
"get", url, log_messages=False, **self._request_kwargs
8887
)._json_list
8988

90-
def submit(self, **request: Any) -> datapi.Remote:
91-
warnings.warn(
92-
"`.submit` has been deprecated, and in the future will raise an error."
93-
" Please use `.process.submit` from now on.",
94-
DeprecationWarning,
95-
)
96-
return self.process.submit(**request)
97-
9889

9990
@attrs.define(slots=False)
10091
class Catalogue:

datapi/processing.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,6 @@ def collection_ids(self) -> list[str]:
291291
"""Available collection IDs."""
292292
return [proc["id"] for proc in self._json_dict["processes"]]
293293

294-
@property
295-
def process_ids(self) -> list[str]:
296-
warnings.warn(
297-
"`.process_ids` has been deprecated, and in the future will raise an error."
298-
" Please use `.collection_ids` from now on.",
299-
DeprecationWarning,
300-
)
301-
return self.collection_ids
302-
303294

304295
@attrs.define
305296
class Process(ApiResponse):
@@ -610,15 +601,6 @@ def request_uids(self) -> list[str]:
610601
"""List of request UIDs."""
611602
return [job["jobID"] for job in self._json_dict["jobs"]]
612603

613-
@property
614-
def job_ids(self) -> list[str]:
615-
warnings.warn(
616-
"`.job_ids` has been deprecated, and in the future will raise an error."
617-
" Please use `.request_uids` from now on.",
618-
DeprecationWarning,
619-
)
620-
return self.request_uids
621-
622604

623605
@attrs.define
624606
class Results(ApiResponse):

tests/integration_test_20_processing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def test_processig_processes_limit(api_anon_client: ApiClient) -> None:
1212
assert len(processes.collection_ids) == 1
1313
next_processes = processes.next
1414
assert next_processes is not None
15-
assert len(next_processes.process_ids) == 1
15+
assert len(next_processes.collection_ids) == 1
1616

1717

1818
def test_processing_processes_sortby(api_anon_client: ApiClient) -> None:

tests/integration_test_90_features.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import datetime
22
import os
3-
import pathlib
43
from pathlib import Path
54
from typing import Any
65

@@ -72,16 +71,12 @@ def test_features_mars_cds_adaptor_format(
7271
assert os.path.getsize(result)
7372

7473

75-
def test_features_upload_big_file(
76-
api_anon_client: ApiClient, tmp_path: pathlib.Path
77-
) -> None:
74+
def test_features_upload_big_file(api_anon_client: ApiClient) -> None:
7875
# See: https://github.com/fsspec/s3fs/pull/910
79-
target = str(tmp_path / "test.grib")
8076
size = 1_048_576_000 + 1
81-
api_anon_client.retrieve(
77+
results = api_anon_client.submit_and_wait_on_results(
8278
"test-adaptor-dummy",
8379
size=size,
8480
_timestamp=datetime.datetime.now().isoformat(),
85-
target=target,
8681
)
87-
assert os.path.getsize(target) == size
82+
assert results.content_length == size

0 commit comments

Comments
 (0)