dayhoff-tools 1.6.10__tar.gz → 1.6.12__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.6.10 → dayhoff_tools-1.6.12}/PKG-INFO +1 -1
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/cli/engine_commands.py +21 -1
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/pyproject.toml +1 -1
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/README.md +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/__init__.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/chemistry/standardizer.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/chemistry/utils.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/cli/__init__.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/cli/cloud_commands.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/cli/main.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/cli/swarm_commands.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/cli/utility_commands.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/deployment/base.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/deployment/deploy_aws.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/deployment/deploy_gcp.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/deployment/deploy_utils.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/deployment/job_runner.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/deployment/processors.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/deployment/swarm.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/embedders.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/fasta.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/file_ops.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/h5.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/intake/gcp.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/intake/gtdb.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/intake/kegg.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/intake/mmseqs.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/intake/structure.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/intake/uniprot.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/logs.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/sqlite.py +0 -0
- {dayhoff_tools-1.6.10 → dayhoff_tools-1.6.12}/dayhoff_tools/warehouse.py +0 -0
@@ -1765,16 +1765,21 @@ def attach_studio(
|
|
1765
1765
|
|
1766
1766
|
for attempt in range(max_attempts):
|
1767
1767
|
# If the attach already completed in the previous iteration (but we
|
1768
|
-
# didn't notice because the operation table wasn
|
1768
|
+
# didn't notice because the operation table wasn't updated yet),
|
1769
1769
|
# bail out early.
|
1770
1770
|
if _is_studio_attached(studio["studio_id"], engine["instance_id"]):
|
1771
|
+
console.print("[dim]DEBUG: Studio already attached (detected by _is_studio_attached)[/dim]")
|
1771
1772
|
success = True
|
1772
1773
|
break
|
1774
|
+
|
1775
|
+
console.print(f"[dim]DEBUG: Attempt {attempt + 1}/{max_attempts}[/dim]")
|
1773
1776
|
success, error_msg = _attempt_studio_attach(
|
1774
1777
|
studio, engine, target_user, public_key
|
1775
1778
|
)
|
1779
|
+
console.print(f"[dim]DEBUG: Attempt result: success={success}, error_msg={error_msg}[/dim]")
|
1776
1780
|
|
1777
1781
|
if success:
|
1782
|
+
console.print("[dim]DEBUG: Success! Breaking out of retry loop[/dim]")
|
1778
1783
|
break # success!
|
1779
1784
|
|
1780
1785
|
if error_msg:
|
@@ -1846,8 +1851,17 @@ def _attempt_studio_attach(studio, engine, target_user, public_key):
|
|
1846
1851
|
},
|
1847
1852
|
)
|
1848
1853
|
|
1854
|
+
# DEBUG: Log what we're getting back
|
1855
|
+
console.print(f"[dim]DEBUG: Attach response: {response.status_code}[/dim]")
|
1856
|
+
if response.status_code not in (200, 202):
|
1857
|
+
try:
|
1858
|
+
console.print(f"[dim]DEBUG: Error: {response.json().get('error', 'No error field')}[/dim]")
|
1859
|
+
except:
|
1860
|
+
console.print(f"[dim]DEBUG: Could not parse error response[/dim]")
|
1861
|
+
|
1849
1862
|
# Fast-path success
|
1850
1863
|
if response.status_code == 200:
|
1864
|
+
console.print("[dim]DEBUG: Got 200 - immediate success[/dim]")
|
1851
1865
|
return True, None
|
1852
1866
|
|
1853
1867
|
# Asynchronous path – API returned 202 Accepted and operation tracking ID
|
@@ -1855,7 +1869,9 @@ def _attempt_studio_attach(studio, engine, target_user, public_key):
|
|
1855
1869
|
op_id = response.json().get("operation_id")
|
1856
1870
|
if not op_id:
|
1857
1871
|
return False, "Async operation started but no operation_id returned"
|
1872
|
+
console.print(f"[dim]DEBUG: Got 202 - polling operation {op_id}[/dim]")
|
1858
1873
|
poll_ok, poll_err = _poll_operation(op_id)
|
1874
|
+
console.print(f"[dim]DEBUG: Poll result: ok={poll_ok}, err={poll_err}[/dim]")
|
1859
1875
|
if poll_ok:
|
1860
1876
|
return True, None
|
1861
1877
|
return False, poll_err
|
@@ -1921,16 +1937,20 @@ def _poll_operation(operation_id: str, timeout: int = 600) -> Tuple[bool, str]:
|
|
1921
1937
|
# ---- fetch status ---------------------------------------------------
|
1922
1938
|
op_resp = make_api_request("GET", f"/operations/{operation_id}")
|
1923
1939
|
if op_resp.status_code != 200:
|
1940
|
+
console.print(f"[dim]DEBUG: Operation poll failed: HTTP {op_resp.status_code}[/dim]")
|
1924
1941
|
return False, (
|
1925
1942
|
f"Failed to fetch operation status (HTTP {op_resp.status_code})"
|
1926
1943
|
)
|
1927
1944
|
data = op_resp.json()
|
1928
1945
|
op_status = data.get("status")
|
1946
|
+
console.print(f"[dim]DEBUG: Operation status: {op_status}[/dim]")
|
1929
1947
|
|
1930
1948
|
# ---- interpret state -----------------------------------------------
|
1931
1949
|
if op_status == "COMPLETED":
|
1950
|
+
console.print("[dim]DEBUG: Operation completed successfully[/dim]")
|
1932
1951
|
return True, ""
|
1933
1952
|
if op_status == "FAILED":
|
1953
|
+
console.print(f"[dim]DEBUG: Operation failed: {data.get('error', 'Operation failed')}[/dim]")
|
1934
1954
|
return False, data.get("error", "Operation failed")
|
1935
1955
|
|
1936
1956
|
# Not finished yet – wait a little and poll again (no live spinner)
|
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
|
|
5
5
|
|
6
6
|
[project]
|
7
7
|
name = "dayhoff-tools"
|
8
|
-
version = "1.6.
|
8
|
+
version = "1.6.12"
|
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
|
File without changes
|