dayhoff-tools 1.7.2__tar.gz → 1.7.3__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.
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/PKG-INFO +1 -1
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/cli/main.py +6 -1
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/cli/utility_commands.py +76 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/pyproject.toml +1 -1
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/README.md +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/__init__.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/chemistry/standardizer.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/chemistry/utils.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/cli/__init__.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/cli/cloud_commands.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/cli/engine_commands.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/cli/swarm_commands.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/deployment/base.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/deployment/deploy_aws.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/deployment/deploy_gcp.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/deployment/deploy_utils.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/deployment/job_runner.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/deployment/processors.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/deployment/swarm.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/embedders.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/fasta.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/file_ops.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/h5.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/intake/gcp.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/intake/gtdb.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/intake/kegg.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/intake/mmseqs.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/intake/structure.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/intake/uniprot.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/logs.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/sqlite.py +0 -0
- {dayhoff_tools-1.7.2 → dayhoff_tools-1.7.3}/dayhoff_tools/warehouse.py +0 -0
@@ -64,8 +64,9 @@ app.add_typer(engine_app, name="engine", help="Manage compute engines for develo
|
|
64
64
|
app.add_typer(studio_app, name="studio", help="Manage persistent development studios.")
|
65
65
|
|
66
66
|
|
67
|
-
@app.callback()
|
67
|
+
@app.callback(invoke_without_command=True)
|
68
68
|
def _version_option(
|
69
|
+
ctx: typer.Context,
|
69
70
|
version_flag: bool = typer.Option(
|
70
71
|
False,
|
71
72
|
"--version",
|
@@ -78,6 +79,10 @@ def _version_option(
|
|
78
79
|
if version_flag:
|
79
80
|
typer.echo(_get_dht_version())
|
80
81
|
raise typer.Exit()
|
82
|
+
# If no subcommand provided, show help instead of 'Missing command'
|
83
|
+
if ctx.invoked_subcommand is None:
|
84
|
+
typer.echo(ctx.get_help())
|
85
|
+
raise typer.Exit()
|
81
86
|
|
82
87
|
|
83
88
|
@app.command("wheel")
|
@@ -112,6 +112,7 @@ def build_and_upload_wheel(bump_part: str = "patch"):
|
|
112
112
|
print("Using UV_PUBLISH_TOKEN for authentication.")
|
113
113
|
|
114
114
|
pyproject_path = "pyproject.toml"
|
115
|
+
mac_manifest_path = "pyproject.mac.toml"
|
115
116
|
current_version = None # Initialize in case the first try block fails
|
116
117
|
|
117
118
|
try:
|
@@ -173,6 +174,25 @@ def build_and_upload_wheel(bump_part: str = "patch"):
|
|
173
174
|
with open(pyproject_path, "w") as f:
|
174
175
|
f.write(new_content)
|
175
176
|
print(f"Updated {pyproject_path} with version {new_version}")
|
177
|
+
|
178
|
+
# Mirror version in pyproject.mac.toml if present (best-effort)
|
179
|
+
mac_updated = False
|
180
|
+
try:
|
181
|
+
mac_path = Path(mac_manifest_path)
|
182
|
+
if mac_path.exists():
|
183
|
+
mac_content = mac_path.read_text()
|
184
|
+
mac_pattern = re.compile(
|
185
|
+
f'^version\s*=\s*"{re.escape(current_version)}"', re.MULTILINE
|
186
|
+
)
|
187
|
+
mac_new_content, mac_replacements = mac_pattern.subn(
|
188
|
+
f'version = "{new_version}"', mac_content
|
189
|
+
)
|
190
|
+
if mac_replacements > 0:
|
191
|
+
mac_path.write_text(mac_new_content)
|
192
|
+
mac_updated = True
|
193
|
+
print(f"Updated {mac_manifest_path} with version {new_version}")
|
194
|
+
except Exception as e:
|
195
|
+
print(f"Warning: Could not update {mac_manifest_path}: {e}")
|
176
196
|
# --- End Version Bumping Logic ---
|
177
197
|
|
178
198
|
# Build wheel and sdist
|
@@ -191,6 +211,27 @@ def build_and_upload_wheel(bump_part: str = "patch"):
|
|
191
211
|
|
192
212
|
print(f"Successfully built and uploaded version {new_version} to PyPI")
|
193
213
|
|
214
|
+
# Re-install DHT in current venv when building from DHT itself
|
215
|
+
try:
|
216
|
+
proj_name = None
|
217
|
+
try:
|
218
|
+
proj_toml = toml.load(pyproject_path)
|
219
|
+
proj_name = (
|
220
|
+
proj_toml.get("project", {}).get("name")
|
221
|
+
if isinstance(proj_toml, dict)
|
222
|
+
else None
|
223
|
+
)
|
224
|
+
except Exception:
|
225
|
+
pass
|
226
|
+
if proj_name == "dayhoff-tools":
|
227
|
+
print("Re-installing dayhoff-tools into the active environment…")
|
228
|
+
reinstall_cmd = ["uv", "pip", "install", "-e", "."]
|
229
|
+
print(f"Running command: {BLUE}{' '.join(reinstall_cmd)}{RESET}")
|
230
|
+
subprocess.run(reinstall_cmd, check=True)
|
231
|
+
print("dayhoff-tools reinstalled in the current environment.")
|
232
|
+
except subprocess.CalledProcessError as e:
|
233
|
+
print(f"Warning: Failed to reinstall dayhoff-tools locally: {e}")
|
234
|
+
|
194
235
|
except FileNotFoundError:
|
195
236
|
print(f"Error: {pyproject_path} not found.")
|
196
237
|
# No version change happened, so no rollback needed
|
@@ -219,6 +260,24 @@ def build_and_upload_wheel(bump_part: str = "patch"):
|
|
219
260
|
print(
|
220
261
|
f"Warning: Could not find version {new_version} to revert in {pyproject_path}."
|
221
262
|
)
|
263
|
+
|
264
|
+
# Also revert mac manifest if we updated it
|
265
|
+
try:
|
266
|
+
mac_path = Path(mac_manifest_path)
|
267
|
+
if mac_path.exists():
|
268
|
+
mac_content_revert = mac_path.read_text()
|
269
|
+
mac_reverted, mac_num = pattern_revert.subn(
|
270
|
+
f'version = "{current_version}"', mac_content_revert
|
271
|
+
)
|
272
|
+
if mac_num > 0:
|
273
|
+
mac_path.write_text(mac_reverted)
|
274
|
+
print(
|
275
|
+
f"Successfully reverted version in {mac_manifest_path}."
|
276
|
+
)
|
277
|
+
except Exception as e2:
|
278
|
+
print(
|
279
|
+
f"Warning: Failed to revert version change in {mac_manifest_path}: {e2}"
|
280
|
+
)
|
222
281
|
except Exception as revert_e:
|
223
282
|
print(
|
224
283
|
f"Warning: Failed to revert version change in {pyproject_path}: {revert_e}"
|
@@ -248,6 +307,23 @@ def build_and_upload_wheel(bump_part: str = "patch"):
|
|
248
307
|
print(
|
249
308
|
f"Warning: Could not find version {new_version} to revert in {pyproject_path}."
|
250
309
|
)
|
310
|
+
# Also revert mac manifest if necessary
|
311
|
+
try:
|
312
|
+
mac_path = Path(mac_manifest_path)
|
313
|
+
if mac_path.exists():
|
314
|
+
mac_content_revert = mac_path.read_text()
|
315
|
+
mac_reverted, mac_num = pattern_revert.subn(
|
316
|
+
f'version = "{current_version}"', mac_content_revert
|
317
|
+
)
|
318
|
+
if mac_num > 0:
|
319
|
+
mac_path.write_text(mac_reverted)
|
320
|
+
print(
|
321
|
+
f"Successfully reverted version in {mac_manifest_path}."
|
322
|
+
)
|
323
|
+
except Exception as e2:
|
324
|
+
print(
|
325
|
+
f"Warning: Failed to revert version change in {mac_manifest_path}: {e2}"
|
326
|
+
)
|
251
327
|
except Exception as revert_e:
|
252
328
|
print(
|
253
329
|
f"Warning: Failed to revert version change in {pyproject_path}: {revert_e}"
|
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
|
|
5
5
|
|
6
6
|
[project]
|
7
7
|
name = "dayhoff-tools"
|
8
|
-
version = "1.7.
|
8
|
+
version = "1.7.3"
|
9
9
|
description = "Common tools for all the repos at Dayhoff Labs"
|
10
10
|
authors = [
|
11
11
|
{name = "Daniel Martin-Alarcon", email = "dma@dayhofflabs.com"}
|
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
|