dayhoff-tools 1.6.4__tar.gz → 1.6.6__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.
Potentially problematic release.
This version of dayhoff-tools might be problematic. Click here for more details.
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/PKG-INFO +1 -1
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/cli/engine_commands.py +31 -19
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/pyproject.toml +1 -1
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/README.md +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/__init__.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/chemistry/standardizer.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/chemistry/utils.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/cli/__init__.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/cli/cloud_commands.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/cli/main.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/cli/swarm_commands.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/cli/utility_commands.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/deployment/base.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/deployment/deploy_aws.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/deployment/deploy_gcp.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/deployment/deploy_utils.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/deployment/job_runner.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/deployment/processors.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/deployment/swarm.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/embedders.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/fasta.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/file_ops.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/h5.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/intake/gcp.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/intake/gtdb.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/intake/kegg.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/intake/mmseqs.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/intake/structure.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/intake/uniprot.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/logs.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/sqlite.py +0 -0
- {dayhoff_tools-1.6.4 → dayhoff_tools-1.6.6}/dayhoff_tools/warehouse.py +0 -0
|
@@ -1860,28 +1860,40 @@ def _attempt_studio_attach(studio, engine, target_user, public_key):
|
|
|
1860
1860
|
|
|
1861
1861
|
|
|
1862
1862
|
def _poll_operation(operation_id: str, timeout: int = 600) -> Tuple[bool, str]:
|
|
1863
|
-
"""Poll
|
|
1863
|
+
"""Poll `/operations/<id>` until it reports COMPLETED or FAILED.
|
|
1864
1864
|
|
|
1865
|
-
Returns (True, "") on success or (False, error_message) on failure
|
|
1866
|
-
|
|
1865
|
+
Returns (True, "") on success or (False, error_message) on failure or
|
|
1866
|
+
timeout.
|
|
1867
|
+
|
|
1868
|
+
IMPORTANT: This helper deliberately *avoids* creating its own Rich Live/
|
|
1869
|
+
spinner so that it can be called from inside another Progress/Live context
|
|
1870
|
+
(the outer "Attaching studio…" progress bar). Nested Live renderables lead
|
|
1871
|
+
to constant hide/show repaint cycles, which is what caused the flickering
|
|
1872
|
+
the user observed.
|
|
1867
1873
|
"""
|
|
1868
1874
|
start_ts = time.time()
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1875
|
+
while True:
|
|
1876
|
+
# ---- timeout guard -------------------------------------------------
|
|
1877
|
+
if time.time() - start_ts > timeout:
|
|
1878
|
+
return False, "Timed out waiting for attach operation to complete"
|
|
1879
|
+
|
|
1880
|
+
# ---- fetch status ---------------------------------------------------
|
|
1881
|
+
op_resp = make_api_request("GET", f"/operations/{operation_id}")
|
|
1882
|
+
if op_resp.status_code != 200:
|
|
1883
|
+
return False, (
|
|
1884
|
+
f"Failed to fetch operation status (HTTP {op_resp.status_code})"
|
|
1885
|
+
)
|
|
1886
|
+
data = op_resp.json()
|
|
1887
|
+
op_status = data.get("status")
|
|
1888
|
+
|
|
1889
|
+
# ---- interpret state -----------------------------------------------
|
|
1890
|
+
if op_status == "COMPLETED":
|
|
1891
|
+
return True, ""
|
|
1892
|
+
if op_status == "FAILED":
|
|
1893
|
+
return False, data.get("error", "Operation failed")
|
|
1894
|
+
|
|
1895
|
+
# Not finished yet – wait a little and poll again (no live spinner)
|
|
1896
|
+
time.sleep(3)
|
|
1885
1897
|
|
|
1886
1898
|
|
|
1887
1899
|
@studio_app.command("detach")
|
|
@@ -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.6"
|
|
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
|