Skip to content

Commit d434d45

Browse files
committed
update minio client, old test file
1 parent b821c82 commit d434d45

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

openml/_api/clients/minio.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ def headers(self) -> dict[str, str]:
4040
def path(self) -> Path:
4141
return Path(openml.config.get_cache_directory())
4242

43-
def _get_path(self, url: str) -> Path:
44-
parsed_url = urllib.parse.urlparse(url)
45-
return self.path / "minio" / parsed_url.path.lstrip("/")
46-
4743
def download_minio_file(
4844
self,
4945
source: str,
@@ -66,7 +62,11 @@ def download_minio_file(
6662
automatically find the proxy to use. Pass None or the environment variable
6763
``no_proxy="*"`` to disable proxies.
6864
"""
69-
destination = self._get_path(source) if destination is None else Path(destination)
65+
destination = (
66+
Path(openml.config.get_minio_download_path(source))
67+
if destination is None
68+
else Path(destination)
69+
)
7070
parsed_url = urllib.parse.urlparse(source)
7171

7272
# expect path format: /BUCKET/path/to/file.ext
@@ -119,7 +119,11 @@ def download_minio_bucket(self, source: str, destination: str | Path | None = No
119119
destination : str | Path
120120
Path to a directory to store the bucket content in.
121121
"""
122-
destination = self._get_path(source) if destination is None else Path(destination)
122+
destination = (
123+
Path(openml.config.get_minio_download_path(source))
124+
if destination is None
125+
else Path(destination)
126+
)
123127
parsed_url = urllib.parse.urlparse(source)
124128
if destination.suffix:
125129
destination = destination.parent
-69.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)