Skip to content

Commit 0f27eed

Browse files
committed
Bump version to 0.9.0
1 parent 3a1f7bc commit 0f27eed

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "zoomaker"
3-
version = "0.8.1"
3+
version = "0.9.0"
44
description = "Zoomaker - Friendly house keeping for your AI model zoo and related resources."
55
authors = ["Benedikt Groß"]
66
readme = "README.md"

zoomaker.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def install(self):
8787
else:
8888
repo.remotes.origin.pull()
8989
print(f"\tgit pull latest: {repo.head.object.hexsha}")
90-
90+
9191
# Download
9292
else:
9393
filename = self._slugify(os.path.basename(src))
@@ -151,20 +151,20 @@ def _download_file(self, src, install_to, name, bearer_token = None):
151151
headers['Authorization'] = f'Bearer {bearer_token}'
152152
response = requests.get(src, stream=True, allow_redirects=True, headers=headers)
153153
response.raise_for_status()
154-
154+
155155
# Get the filename from the Content-Disposition header
156156
content_disposition = response.headers.get('Content-Disposition')
157157
if content_disposition:
158158
filename = re.findall("filename=(.+)", content_disposition)[0].strip('"')
159159
else:
160160
filename = name
161-
161+
162162
# Sanitize the filename
163163
filename = self._slugify(filename)
164-
164+
165165
# Construct the full path for the file
166166
file_path = os.path.join(install_to, filename)
167-
167+
168168
# Download the file with progress bar
169169
total_size = int(response.headers.get('content-length', 0))
170170
with open(file_path, 'wb') as file, tqdm(
@@ -177,10 +177,10 @@ def _download_file(self, src, install_to, name, bearer_token = None):
177177
for data in response.iter_content(chunk_size=1024):
178178
size = file.write(data)
179179
progress_bar.update(size)
180-
180+
181181
print(f"\t Downloaded: {file_path}")
182182
print(f"\t Size: {self._get_file_size(file_path)}")
183-
183+
184184
return file_path
185185
except requests.exceptions.RequestException as e:
186186
print(f"\t ❌ Error downloading file: {e}")
@@ -214,7 +214,7 @@ def main():
214214
parser = argparse.ArgumentParser(description="Install models, git repos and run scripts defined in the zoo.yaml file.")
215215
parser.add_argument("command", nargs="?", choices=["install", "run"], help="The command to execute.")
216216
parser.add_argument("script", nargs="?", help="The script name to execute.")
217-
parser.add_argument("-v", "--version", action="version", help="The current version of the zoomaker.", version="0.8.0")
217+
parser.add_argument("-v", "--version", action="version", help="The current version of the zoomaker.", version="0.9.0")
218218
args = parser.parse_args()
219219

220220
if args.command == "install":
@@ -225,4 +225,4 @@ def main():
225225
parser.print_help()
226226

227227
if __name__ == "__main__":
228-
main()
228+
main()

0 commit comments

Comments
 (0)