dayhoff-tools 1.14.14__py3-none-any.whl → 1.14.15__py3-none-any.whl
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.
- dayhoff_tools/cli/utility_commands.py +32 -149
- {dayhoff_tools-1.14.14.dist-info → dayhoff_tools-1.14.15.dist-info}/METADATA +2 -3
- {dayhoff_tools-1.14.14.dist-info → dayhoff_tools-1.14.15.dist-info}/RECORD +5 -5
- {dayhoff_tools-1.14.14.dist-info → dayhoff_tools-1.14.15.dist-info}/WHEEL +0 -0
- {dayhoff_tools-1.14.14.dist-info → dayhoff_tools-1.14.15.dist-info}/entry_points.txt +0 -0
|
@@ -110,24 +110,11 @@ def build_and_upload_wheel(bump_part: str = "patch"):
|
|
|
110
110
|
publish_cmd = ["uv", "publish", "--token", token]
|
|
111
111
|
print("Using UV_PUBLISH_TOKEN for authentication.")
|
|
112
112
|
|
|
113
|
-
#
|
|
114
|
-
pyproject_path =
|
|
115
|
-
|
|
116
|
-
"pyproject.
|
|
117
|
-
"pyproject.mac.toml",
|
|
118
|
-
"pyproject.workstation.toml",
|
|
119
|
-
]:
|
|
120
|
-
if Path(candidate).exists():
|
|
121
|
-
pyproject_path = candidate
|
|
122
|
-
break
|
|
123
|
-
|
|
124
|
-
if not pyproject_path:
|
|
125
|
-
print(
|
|
126
|
-
"Error: No platform-specific manifest found (pyproject.aws.toml, pyproject.mac.toml, or pyproject.workstation.toml)"
|
|
127
|
-
)
|
|
113
|
+
# Use standard pyproject.toml
|
|
114
|
+
pyproject_path = "pyproject.toml"
|
|
115
|
+
if not Path(pyproject_path).exists():
|
|
116
|
+
print("Error: pyproject.toml not found in current directory.")
|
|
128
117
|
return
|
|
129
|
-
|
|
130
|
-
print(f"Using manifest: {pyproject_path}")
|
|
131
118
|
current_version = None # Initialize in case the first try block fails
|
|
132
119
|
|
|
133
120
|
try:
|
|
@@ -190,90 +177,33 @@ def build_and_upload_wheel(bump_part: str = "patch"):
|
|
|
190
177
|
f.write(new_content)
|
|
191
178
|
print(f"Updated {pyproject_path} with version {new_version}")
|
|
192
179
|
|
|
193
|
-
# Mirror version in all other platform manifests (best-effort)
|
|
194
|
-
other_manifests = []
|
|
195
|
-
for candidate in [
|
|
196
|
-
"pyproject.aws.toml",
|
|
197
|
-
"pyproject.mac.toml",
|
|
198
|
-
"pyproject.workstation.toml",
|
|
199
|
-
]:
|
|
200
|
-
if Path(candidate).exists() and candidate != pyproject_path:
|
|
201
|
-
other_manifests.append(Path(candidate))
|
|
202
|
-
|
|
203
|
-
for manifest_path in other_manifests:
|
|
204
|
-
try:
|
|
205
|
-
content = manifest_path.read_text()
|
|
206
|
-
pattern = re.compile(
|
|
207
|
-
f'^version\s*=\s*"{re.escape(current_version)}"', re.MULTILINE
|
|
208
|
-
)
|
|
209
|
-
new_content, replacements = pattern.subn(
|
|
210
|
-
f'version = "{new_version}"', content
|
|
211
|
-
)
|
|
212
|
-
if replacements > 0:
|
|
213
|
-
manifest_path.write_text(new_content)
|
|
214
|
-
print(f"Updated {manifest_path} with version {new_version}")
|
|
215
|
-
except Exception as e:
|
|
216
|
-
print(f"Warning: Could not update {manifest_path}: {e}")
|
|
217
180
|
# --- End Version Bumping Logic ---
|
|
218
181
|
|
|
219
182
|
# Build wheel and sdist
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
if pyproject_path != "pyproject.toml":
|
|
224
|
-
if Path("pyproject.toml").exists():
|
|
225
|
-
Path("pyproject.toml").rename("pyproject.toml.build.bak")
|
|
226
|
-
backup_created = True
|
|
227
|
-
Path(pyproject_path).read_text()
|
|
228
|
-
with open("pyproject.toml", "w") as f:
|
|
229
|
-
f.write(Path(pyproject_path).read_text())
|
|
230
|
-
temp_pyproject_created = True
|
|
183
|
+
build_cmd = ["uv", "build"]
|
|
184
|
+
print(f"Running command: {BLUE}{' '.join(build_cmd)}{RESET}")
|
|
185
|
+
subprocess.run(build_cmd, check=True)
|
|
231
186
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
print(f"Running command: {BLUE}{' '.join(build_cmd)}{RESET}")
|
|
236
|
-
subprocess.run(build_cmd, check=True)
|
|
237
|
-
|
|
238
|
-
# Upload using uv publish with explicit arguments
|
|
239
|
-
# Print masked command in blue
|
|
240
|
-
print(f"Running command: {BLUE}{' '.join(publish_cmd_safe_print)}{RESET}")
|
|
241
|
-
subprocess.run(
|
|
242
|
-
publish_cmd, # Use the actual command with token
|
|
243
|
-
check=True,
|
|
244
|
-
)
|
|
187
|
+
# Upload to PyPI
|
|
188
|
+
print(f"Running command: {BLUE}{' '.join(publish_cmd_safe_print)}{RESET}")
|
|
189
|
+
subprocess.run(publish_cmd, check=True)
|
|
245
190
|
|
|
246
|
-
|
|
191
|
+
print(f"Successfully built and uploaded version {new_version} to PyPI")
|
|
247
192
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
print("Re-installing dayhoff-tools into the active environment…")
|
|
263
|
-
reinstall_cmd = ["uv", "pip", "install", "-e", ".[full]"]
|
|
264
|
-
print(f"Running command: {BLUE}{' '.join(reinstall_cmd)}{RESET}")
|
|
265
|
-
subprocess.run(reinstall_cmd, check=True)
|
|
266
|
-
print("dayhoff-tools reinstalled in the current environment.")
|
|
267
|
-
except subprocess.CalledProcessError as e:
|
|
268
|
-
print(f"Warning: Failed to reinstall dayhoff-tools locally: {e}")
|
|
269
|
-
|
|
270
|
-
finally:
|
|
271
|
-
# Restore original state (always clean up, even if errors occurred)
|
|
272
|
-
if temp_pyproject_created:
|
|
273
|
-
if Path("pyproject.toml").exists():
|
|
274
|
-
Path("pyproject.toml").unlink()
|
|
275
|
-
if backup_created and Path("pyproject.toml.build.bak").exists():
|
|
276
|
-
Path("pyproject.toml.build.bak").rename("pyproject.toml")
|
|
193
|
+
# Re-install DHT in Pixi environment when building from DHT itself
|
|
194
|
+
try:
|
|
195
|
+
proj_toml = toml.load(pyproject_path)
|
|
196
|
+
proj_name = proj_toml.get("project", {}).get("name")
|
|
197
|
+
if proj_name == "dayhoff-tools":
|
|
198
|
+
print("Re-installing dayhoff-tools into the Pixi environment...")
|
|
199
|
+
reinstall_cmd = ["pixi", "install"]
|
|
200
|
+
print(f"Running command: {BLUE}{' '.join(reinstall_cmd)}{RESET}")
|
|
201
|
+
subprocess.run(reinstall_cmd, check=True)
|
|
202
|
+
print("dayhoff-tools reinstalled in the Pixi environment.")
|
|
203
|
+
except subprocess.CalledProcessError as e:
|
|
204
|
+
print(f"Warning: Failed to reinstall dayhoff-tools locally: {e}")
|
|
205
|
+
except Exception:
|
|
206
|
+
pass # Not dayhoff-tools or couldn't read toml
|
|
277
207
|
|
|
278
208
|
except FileNotFoundError:
|
|
279
209
|
print(f"Error: {pyproject_path} not found.")
|
|
@@ -304,42 +234,18 @@ def build_and_upload_wheel(bump_part: str = "patch"):
|
|
|
304
234
|
f"Warning: Could not find version {new_version} to revert in {pyproject_path}."
|
|
305
235
|
)
|
|
306
236
|
|
|
307
|
-
# Also revert other platform manifests
|
|
308
|
-
for candidate in [
|
|
309
|
-
"pyproject.aws.toml",
|
|
310
|
-
"pyproject.mac.toml",
|
|
311
|
-
"pyproject.workstation.toml",
|
|
312
|
-
]:
|
|
313
|
-
if Path(candidate).exists() and candidate != pyproject_path:
|
|
314
|
-
try:
|
|
315
|
-
content_revert = Path(candidate).read_text()
|
|
316
|
-
reverted, num = pattern_revert.subn(
|
|
317
|
-
f'version = "{current_version}"', content_revert
|
|
318
|
-
)
|
|
319
|
-
if num > 0:
|
|
320
|
-
Path(candidate).write_text(reverted)
|
|
321
|
-
print(f"Successfully reverted version in {candidate}.")
|
|
322
|
-
except Exception as e2:
|
|
323
|
-
print(
|
|
324
|
-
f"Warning: Failed to revert version change in {candidate}: {e2}"
|
|
325
|
-
)
|
|
326
237
|
except Exception as revert_e:
|
|
327
|
-
print(
|
|
328
|
-
f"Warning: Failed to revert version change in {pyproject_path}: {revert_e}"
|
|
329
|
-
)
|
|
238
|
+
print(f"Warning: Failed to revert version change: {revert_e}")
|
|
330
239
|
except Exception as e:
|
|
331
240
|
print(f"An unexpected error occurred: {e}")
|
|
332
|
-
#
|
|
241
|
+
# Attempt rollback if version was bumped
|
|
333
242
|
if current_version and "new_version" in locals() and new_version:
|
|
334
243
|
try:
|
|
335
|
-
print(
|
|
336
|
-
f"Attempting to revert version in {pyproject_path} back to {current_version} due to unexpected error..."
|
|
337
|
-
)
|
|
338
|
-
# (Same revert logic as above)
|
|
244
|
+
print(f"Attempting to revert version back to {current_version}...")
|
|
339
245
|
with open(pyproject_path, "r") as f:
|
|
340
246
|
content_revert = f.read()
|
|
341
247
|
pattern_revert = re.compile(
|
|
342
|
-
f'^version
|
|
248
|
+
f'^version\\s*=\\s*"{re.escape(new_version)}"', re.MULTILINE
|
|
343
249
|
)
|
|
344
250
|
reverted_content, num_revert = pattern_revert.subn(
|
|
345
251
|
f'version = "{current_version}"', content_revert
|
|
@@ -347,34 +253,11 @@ def build_and_upload_wheel(bump_part: str = "patch"):
|
|
|
347
253
|
if num_revert > 0:
|
|
348
254
|
with open(pyproject_path, "w") as f:
|
|
349
255
|
f.write(reverted_content)
|
|
350
|
-
print(
|
|
256
|
+
print("Successfully reverted version in pyproject.toml.")
|
|
351
257
|
else:
|
|
352
|
-
print(
|
|
353
|
-
f"Warning: Could not find version {new_version} to revert in {pyproject_path}."
|
|
354
|
-
)
|
|
355
|
-
# Also revert other platform manifests
|
|
356
|
-
for candidate in [
|
|
357
|
-
"pyproject.aws.toml",
|
|
358
|
-
"pyproject.mac.toml",
|
|
359
|
-
"pyproject.workstation.toml",
|
|
360
|
-
]:
|
|
361
|
-
if Path(candidate).exists() and candidate != pyproject_path:
|
|
362
|
-
try:
|
|
363
|
-
content_revert = Path(candidate).read_text()
|
|
364
|
-
reverted, num = pattern_revert.subn(
|
|
365
|
-
f'version = "{current_version}"', content_revert
|
|
366
|
-
)
|
|
367
|
-
if num > 0:
|
|
368
|
-
Path(candidate).write_text(reverted)
|
|
369
|
-
print(f"Successfully reverted version in {candidate}.")
|
|
370
|
-
except Exception as e2:
|
|
371
|
-
print(
|
|
372
|
-
f"Warning: Failed to revert version change in {candidate}: {e2}"
|
|
373
|
-
)
|
|
258
|
+
print(f"Warning: Could not find version {new_version} to revert.")
|
|
374
259
|
except Exception as revert_e:
|
|
375
|
-
print(
|
|
376
|
-
f"Warning: Failed to revert version change in {pyproject_path}: {revert_e}"
|
|
377
|
-
)
|
|
260
|
+
print(f"Warning: Failed to revert version change: {revert_e}")
|
|
378
261
|
|
|
379
262
|
|
|
380
263
|
# --- Dependency Management Commands ---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dayhoff-tools
|
|
3
|
-
Version: 1.14.
|
|
3
|
+
Version: 1.14.15
|
|
4
4
|
Summary: Common tools for all the repos at Dayhoff Labs
|
|
5
5
|
Author: Daniel Martin-Alarcon
|
|
6
6
|
Author-email: dma@dayhofflabs.com
|
|
@@ -25,7 +25,7 @@ Requires-Dist: fair-esm (>=2.0.0) ; extra == "full"
|
|
|
25
25
|
Requires-Dist: firebase-admin (>=6.5.0)
|
|
26
26
|
Requires-Dist: h5py (>=3.11.0) ; extra == "full"
|
|
27
27
|
Requires-Dist: h5py (>=3.13.0) ; extra == "embedders"
|
|
28
|
-
Requires-Dist: numpy (>=1.26.4) ; extra == "embedders"
|
|
28
|
+
Requires-Dist: numpy (>=1.26.4,<2.0) ; extra == "embedders"
|
|
29
29
|
Requires-Dist: pandas (>=2.2.0,<2.2.3) ; extra == "embedders"
|
|
30
30
|
Requires-Dist: pandas (>=2.2.0,<2.2.3) ; extra == "full"
|
|
31
31
|
Requires-Dist: pydantic (>=2.0.0) ; extra == "batch"
|
|
@@ -38,7 +38,6 @@ Requires-Dist: sentencepiece (>=0.2.0) ; extra == "embedders"
|
|
|
38
38
|
Requires-Dist: sentencepiece (>=0.2.0) ; extra == "full"
|
|
39
39
|
Requires-Dist: sqlalchemy (>=2.0.40,<3.0.0) ; extra == "full"
|
|
40
40
|
Requires-Dist: toml (>=0.10)
|
|
41
|
-
Requires-Dist: torch (>=2.4.0) ; extra == "embedders"
|
|
42
41
|
Requires-Dist: tqdm (>=4.67.1) ; extra == "embedders"
|
|
43
42
|
Requires-Dist: tqdm (>=4.67.1) ; extra == "full"
|
|
44
43
|
Requires-Dist: transformers (==4.36.2) ; extra == "full"
|
|
@@ -50,7 +50,7 @@ dayhoff_tools/cli/engines_studios/studio_commands.py,sha256=KGSNZQS8MmM_DfQzT9SR
|
|
|
50
50
|
dayhoff_tools/cli/github_commands.py,sha256=pfrxI68LObGm_gtPlQN-gHPahHV4l9k9T4GqO99NNL0,8948
|
|
51
51
|
dayhoff_tools/cli/main.py,sha256=6ffnaFzui-bVd1ME7yThk_ZrMOofwStamEUkkYlminY,8503
|
|
52
52
|
dayhoff_tools/cli/swarm_commands.py,sha256=5EyKj8yietvT5lfoz8Zx0iQvVaNgc3SJX1z2zQR6o6M,5614
|
|
53
|
-
dayhoff_tools/cli/utility_commands.py,sha256=
|
|
53
|
+
dayhoff_tools/cli/utility_commands.py,sha256=O6vy3rONTeuPYZyhjnFeqf8GxUlyc7i2O11d1s3shH4,45513
|
|
54
54
|
dayhoff_tools/deployment/base.py,sha256=uZnFvnPQx6pH_HmJbdThweAs3BrxMaDohpE3iX_-yk4,18377
|
|
55
55
|
dayhoff_tools/deployment/deploy_aws.py,sha256=1j16aE4hmln4pQVtcSGuIGVWbOBfWwveytvihjofADo,21519
|
|
56
56
|
dayhoff_tools/deployment/deploy_gcp.py,sha256=xgaOVsUDmP6wSEMYNkm1yRNcVskfdz80qJtCulkBIAM,8860
|
|
@@ -71,7 +71,7 @@ dayhoff_tools/intake/uniprot.py,sha256=BZYJQF63OtPcBBnQ7_P9gulxzJtqyorgyuDiPeOJq
|
|
|
71
71
|
dayhoff_tools/logs.py,sha256=DKdeP0k0kliRcilwvX0mUB2eipO5BdWUeHwh-VnsICs,838
|
|
72
72
|
dayhoff_tools/sqlite.py,sha256=jV55ikF8VpTfeQqqlHSbY8OgfyfHj8zgHNpZjBLos_E,18672
|
|
73
73
|
dayhoff_tools/warehouse.py,sha256=UETBtZD3r7WgvURqfGbyHlT7cxoiVq8isjzMuerKw8I,24475
|
|
74
|
-
dayhoff_tools-1.14.
|
|
75
|
-
dayhoff_tools-1.14.
|
|
76
|
-
dayhoff_tools-1.14.
|
|
77
|
-
dayhoff_tools-1.14.
|
|
74
|
+
dayhoff_tools-1.14.15.dist-info/METADATA,sha256=YBP4lpBDAIhxYuJ65DR_ADrajk6hyLC1e_UCVc_bwx8,3136
|
|
75
|
+
dayhoff_tools-1.14.15.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
|
|
76
|
+
dayhoff_tools-1.14.15.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
|
|
77
|
+
dayhoff_tools-1.14.15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|