hfutils 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hfutils-0.2.3/hfutils.egg-info → hfutils-0.2.4}/PKG-INFO +1 -1
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/config/meta.py +1 -1
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/operate/download.py +5 -4
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/utils/__init__.py +1 -0
- hfutils-0.2.4/hfutils/utils/path.py +5 -0
- {hfutils-0.2.3 → hfutils-0.2.4/hfutils.egg-info}/PKG-INFO +1 -1
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils.egg-info/SOURCES.txt +1 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/LICENSE +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/MANIFEST.in +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/README.md +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/__init__.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/archive/__init__.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/archive/base.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/archive/rar.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/archive/sevenz.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/archive/tar.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/archive/zip.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/config/__init__.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/entry/__init__.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/entry/base.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/entry/cli.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/entry/dispatch.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/entry/download.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/entry/ls.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/entry/upload.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/entry/whoami.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/index/__init__.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/index/fetch.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/index/hash.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/index/make.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/index/validate.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/operate/__init__.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/operate/base.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/operate/upload.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/operate/validate.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/utils/binary.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/utils/download.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/utils/temp.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/utils/tqdm_.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils/utils/walk.py +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils.egg-info/dependency_links.txt +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils.egg-info/entry_points.txt +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils.egg-info/requires.txt +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/hfutils.egg-info/top_level.txt +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/requirements-7z.txt +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/requirements-build.txt +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/requirements-doc.txt +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/requirements-rar.txt +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/requirements-test.txt +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/requirements-transfer.txt +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/requirements.txt +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/setup.cfg +0 -0
- {hfutils-0.2.3 → hfutils-0.2.4}/setup.py +0 -0
|
@@ -9,7 +9,7 @@ import requests.exceptions
|
|
|
9
9
|
from .base import RepoTypeTyping, list_files_in_repository, _IGNORE_PATTERN_UNSET, get_hf_client
|
|
10
10
|
from .validate import is_local_file_ready
|
|
11
11
|
from ..archive import archive_unpack
|
|
12
|
-
from ..utils import tqdm, TemporaryDirectory
|
|
12
|
+
from ..utils import tqdm, TemporaryDirectory, hf_normpath
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def download_file_to_file(local_file: str, repo_id: str, file_in_repo: str,
|
|
@@ -41,7 +41,7 @@ def download_file_to_file(local_file: str, repo_id: str, file_in_repo: str,
|
|
|
41
41
|
hf_client.hf_hub_download(
|
|
42
42
|
repo_id=repo_id,
|
|
43
43
|
repo_type=repo_type,
|
|
44
|
-
filename=file_in_repo,
|
|
44
|
+
filename=hf_normpath(file_in_repo),
|
|
45
45
|
revision=revision,
|
|
46
46
|
local_dir=td,
|
|
47
47
|
force_download=True,
|
|
@@ -120,11 +120,12 @@ def download_directory_as_directory(local_directory: str, repo_id: str, dir_in_r
|
|
|
120
120
|
current_resume_download = resume_download
|
|
121
121
|
try:
|
|
122
122
|
dst_file = os.path.join(local_directory, rel_file)
|
|
123
|
+
file_in_repo = hf_normpath(f'{dir_in_repo}/{rel_file}')
|
|
123
124
|
if os.path.exists(dst_file) and is_local_file_ready(
|
|
124
125
|
repo_id=repo_id,
|
|
125
126
|
repo_type=repo_type,
|
|
126
127
|
local_file=dst_file,
|
|
127
|
-
file_in_repo=
|
|
128
|
+
file_in_repo=file_in_repo,
|
|
128
129
|
revision=revision,
|
|
129
130
|
hf_token=hf_token,
|
|
130
131
|
):
|
|
@@ -136,7 +137,7 @@ def download_directory_as_directory(local_directory: str, repo_id: str, dir_in_r
|
|
|
136
137
|
download_file_to_file(
|
|
137
138
|
local_file=dst_file,
|
|
138
139
|
repo_id=repo_id,
|
|
139
|
-
file_in_repo=
|
|
140
|
+
file_in_repo=file_in_repo,
|
|
140
141
|
repo_type=repo_type,
|
|
141
142
|
revision=revision,
|
|
142
143
|
resume_download=current_resume_download,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|