Skip to content

Commit ea44ed2

Browse files
committed
Removed download code based on httpx. Removed other uneeded dependencies
1 parent 27d3e09 commit ea44ed2

File tree

3 files changed

+3
-44
lines changed

3 files changed

+3
-44
lines changed

pyproject.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ pandas = "<2.2"
2424
prefect = ">2.13.2,<3"
2525
pytest-asyncio = "^0.20.2"
2626
pytest-cases = "^3.6.13"
27+
28+
# To be removed
2729
requests = "^2.25.1"
2830

2931
# Potential dependencies
@@ -39,7 +41,6 @@ pathspec = "0.12.1"
3941
devtools = "^0.12.2"
4042
objsize = "^0.7.0"
4143
humanize = "^4.9.0"
42-
httpx = "^0.26.0"
4344
pydantic = {version = "<2", extras = ["email"]}
4445
griffe = "<1"
4546
ipython = ">=7.34.0"
@@ -58,16 +59,12 @@ pandas-stubs = "^2.1.1.230928"
5859
pre-commit = "^3.8.0"
5960
pytest-mypy-plugins = "^3.1.2"
6061
devtools = "^0.12.2"
61-
mypy = "^1.11.2"
62+
mypy = "^1.13.0"
6263
pytest-aiohttp = "^1.0.5"
6364
pyright = "^1.1.389"
6465

6566
[tool.poetry.group.docs.dependencies]
66-
portray = {git = "https://github.com/HeinrichAD/portray.git"}
67-
docstring-parser = "^0.15"
6867
pymdown-extensions = "^10.0.1"
69-
hug = {git = "https://github.com/hugapi/hug.git", branch="develop"}
70-
7168
mkdocs = "^1.5.3"
7269
mkdocstrings = {version = ">=0.26.1", extras=["python"]}
7370
mkdocs-gen-files = "^0.5.0"

src/omnipy/data/dataset.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
get_event_loop_and_check_if_loop_is_running,
3333
is_iterable,
3434
remove_forward_ref_notation)
35-
from omnipy.util.web import download_file_to_memory
3635

3736
if TYPE_CHECKING:
3837
from omnipy.modules.remote.datasets import HttpUrlDataset
@@ -666,20 +665,6 @@ def _load_paths(self, path_or_urls: Iterable[str], by_file_suffix: bool) -> None
666665
else:
667666
raise RuntimeError('Unable to load from serializer')
668667

669-
@staticmethod
670-
def _download_file(url: str, path: str, tmp_dir_path: str) -> str | None:
671-
print(f'Downloading {url}...')
672-
data = download_file_to_memory(url)
673-
674-
if data is None:
675-
print(f'Failed to download file from {url}')
676-
return None
677-
678-
download_path = os.path.join(tmp_dir_path, os.path.basename(path))
679-
with open(download_path, 'wb') as out_file:
680-
out_file.write(data)
681-
return download_path
682-
683668
@staticmethod
684669
def _ensure_tar_gz_file(path: str):
685670
assert os.path.exists(path), f'No file or directory at {path}'

src/omnipy/util/web.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)