dh-cli 0.4.1__tar.gz → 0.4.2__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.
- {dh_cli-0.4.1 → dh_cli-0.4.2}/PKG-INFO +1 -1
- {dh_cli-0.4.1 → dh_cli-0.4.2}/pyproject.toml +1 -1
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/hz/__init__.py +42 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/.gitignore +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/LICENSE +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/README.md +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/__init__.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/__init__.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/aws_batch.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/__init__.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/boltz.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/cancel.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/clean.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/embed_t5.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/finalize.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/list_jobs.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/local.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/logs.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/protmpnn.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/protmpnn_to_boltz.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/retry.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/status.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/submit.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/train.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/commands/wait_for.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/fasta_utils.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/h5_utils.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/job_id.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/manifest.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/batch/s3_transport.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/cloud_commands.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/codeartifact.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/engines_studios/__init__.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/engines_studios/api_client.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/engines_studios/auth.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/engines_studios/engine_commands.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/engines_studios/progress.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/engines_studios/ssh_config.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/engines_studios/studio_commands.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/github_commands.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/hz/deploy.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/hz/local.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/hz/test.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/hz/tf.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/hz/users.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/main.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/utility_commands.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/src/dh_cli/warehouse.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/tests/hz/test_init.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/tests/hz/test_suites.py +0 -0
- {dh_cli-0.4.1 → dh_cli-0.4.2}/tests/hz/test_users.py +0 -0
|
@@ -10,6 +10,48 @@ hz_app = typer.Typer(
|
|
|
10
10
|
context_settings={"help_option_names": ["-h", "--help"]},
|
|
11
11
|
)
|
|
12
12
|
|
|
13
|
+
API_URLS = {
|
|
14
|
+
"prod": "https://api.horizyn.dayhofflabs.com",
|
|
15
|
+
"dev": "https://horizyn-api-dev.dayhofflabs.com",
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@hz_app.command()
|
|
20
|
+
def health(
|
|
21
|
+
detailed: bool = typer.Option(False, "-d", "--detailed", help="Include GPU and EFS details."),
|
|
22
|
+
):
|
|
23
|
+
"""Check API health for both prod and dev environments."""
|
|
24
|
+
import json
|
|
25
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
26
|
+
from urllib.request import urlopen
|
|
27
|
+
from urllib.error import URLError
|
|
28
|
+
|
|
29
|
+
path = "/healthz/detailed" if detailed else "/healthz"
|
|
30
|
+
|
|
31
|
+
def _fetch(env: str) -> tuple[str, dict | str]:
|
|
32
|
+
try:
|
|
33
|
+
with urlopen(f"{API_URLS[env]}{path}", timeout=10) as resp:
|
|
34
|
+
return env, json.loads(resp.read())
|
|
35
|
+
except (URLError, OSError) as exc:
|
|
36
|
+
return env, f"unreachable ({exc})"
|
|
37
|
+
except json.JSONDecodeError:
|
|
38
|
+
return env, "invalid response"
|
|
39
|
+
|
|
40
|
+
with ThreadPoolExecutor(max_workers=2) as pool:
|
|
41
|
+
results = dict(pool.map(_fetch, API_URLS))
|
|
42
|
+
|
|
43
|
+
for env in ("prod", "dev"):
|
|
44
|
+
label = f"[{env}] {API_URLS[env]}"
|
|
45
|
+
data = results[env]
|
|
46
|
+
if isinstance(data, str):
|
|
47
|
+
typer.secho(f"{label} ✗ {data}", fg=typer.colors.RED)
|
|
48
|
+
else:
|
|
49
|
+
status = data.get("status", "unknown")
|
|
50
|
+
version = data.get("version", "?")
|
|
51
|
+
color = typer.colors.GREEN if status == "healthy" else typer.colors.YELLOW
|
|
52
|
+
typer.secho(f"{label} v{version} {status}", fg=color)
|
|
53
|
+
typer.echo(json.dumps(data, indent=2))
|
|
54
|
+
|
|
13
55
|
|
|
14
56
|
def _find_workspace_root() -> Path:
|
|
15
57
|
root = os.environ.get("WORKSPACE_ROOT")
|
|
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
|
|
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
|