dayhoff-tools 1.9.2__tar.gz → 1.9.4__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.
Files changed (32) hide show
  1. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/PKG-INFO +1 -1
  2. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/cli/engine_commands.py +27 -21
  3. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/pyproject.toml +1 -1
  4. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/README.md +0 -0
  5. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/__init__.py +0 -0
  6. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/chemistry/standardizer.py +0 -0
  7. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/chemistry/utils.py +0 -0
  8. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/cli/__init__.py +0 -0
  9. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/cli/cloud_commands.py +0 -0
  10. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/cli/main.py +0 -0
  11. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/cli/swarm_commands.py +0 -0
  12. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/cli/utility_commands.py +0 -0
  13. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/deployment/base.py +0 -0
  14. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/deployment/deploy_aws.py +0 -0
  15. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/deployment/deploy_gcp.py +0 -0
  16. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/deployment/deploy_utils.py +0 -0
  17. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/deployment/job_runner.py +0 -0
  18. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/deployment/processors.py +0 -0
  19. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/deployment/swarm.py +0 -0
  20. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/embedders.py +0 -0
  21. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/fasta.py +0 -0
  22. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/file_ops.py +0 -0
  23. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/h5.py +0 -0
  24. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/intake/gcp.py +0 -0
  25. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/intake/gtdb.py +0 -0
  26. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/intake/kegg.py +0 -0
  27. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/intake/mmseqs.py +0 -0
  28. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/intake/structure.py +0 -0
  29. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/intake/uniprot.py +0 -0
  30. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/logs.py +0 -0
  31. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/sqlite.py +0 -0
  32. {dayhoff_tools-1.9.2 → dayhoff_tools-1.9.4}/dayhoff_tools/warehouse.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dayhoff-tools
3
- Version: 1.9.2
3
+ Version: 1.9.4
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
@@ -773,23 +773,22 @@ def engine_status(
773
773
  run_disp = engine["state"].capitalize()
774
774
 
775
775
  # Compose Active/Idle header with extra detail when idle
776
- if idle_detector.get("status") == "active":
777
- active_disp = "[green]Active[/green]"
778
- else:
779
- # show Idle <elapsed>/<threshold> if available; else just N/A for stopped states
776
+ def _compute_active_disp(idle_info: Dict[str, Any]) -> str:
777
+ if idle_info.get("status") == "active":
778
+ return "[green]Active[/green]"
780
779
  if running_state in ("stopped", "stopping"):
781
- active_disp = "[dim]N/A[/dim]"
782
- else:
783
- idle_seconds = idle_detector.get("idle_seconds")
784
- thresh = idle_detector.get("idle_threshold")
785
- if isinstance(idle_seconds, (int, float)) and isinstance(
786
- thresh, (int, float)
787
- ):
788
- active_disp = (
789
- f"[yellow]Idle {int(idle_seconds)//60}m/{int(thresh)//60}m[/yellow]"
790
- )
791
- else:
792
- active_disp = "[yellow]Idle[/yellow]"
780
+ return "[dim]N/A[/dim]"
781
+ idle_seconds_v = idle_info.get("idle_seconds")
782
+ thresh_v = idle_info.get("idle_threshold")
783
+ if isinstance(idle_seconds_v, (int, float)) and isinstance(
784
+ thresh_v, (int, float)
785
+ ):
786
+ return (
787
+ f"[yellow]Idle {int(idle_seconds_v)//60}m/{int(thresh_v)//60}m[/yellow]"
788
+ )
789
+ return "[yellow]Idle[/yellow]"
790
+
791
+ active_disp = _compute_active_disp(idle_detector)
793
792
 
794
793
  top_lines = [
795
794
  f"[blue]{engine['name']}[/blue] {run_disp} {active_disp}\n",
@@ -895,9 +894,10 @@ def engine_status(
895
894
  status_lines.append(
896
895
  f" • GPU Drivers: {'OK' if health.get('drivers_ok') else 'MISSING'}"
897
896
  )
898
- status_lines.append(
899
- f" • Idle Detector: {health.get('idle_detector_timer', 'unknown')}"
897
+ idle_stat = health.get("idle_detector_service") or health.get(
898
+ "idle_detector_timer", "unknown"
900
899
  )
900
+ status_lines.append(f" • Idle Detector: {idle_stat}")
901
901
  except Exception:
902
902
  pass
903
903
 
@@ -1005,6 +1005,13 @@ def engine_status(
1005
1005
  for k, v in overlay.items():
1006
1006
  idle_detector.setdefault(k, v)
1007
1007
 
1008
+ # Recompute header display using enriched overlay values
1009
+ try:
1010
+ active_disp = _compute_active_disp(idle_detector)
1011
+ top_lines[0] = f"[blue]{engine['name']}[/blue] {run_disp} {active_disp}\n"
1012
+ except Exception:
1013
+ pass
1014
+
1008
1015
  # Activity Sensors (show all with YES/no)
1009
1016
  if idle_detector.get("available"):
1010
1017
  status_lines.append("")
@@ -2681,7 +2688,7 @@ def idle_timeout_cmd(
2681
2688
  cmd = (
2682
2689
  "sudo sed -i '/^IDLE_TIMEOUT_SECONDS=/d' /etc/engine.env && "
2683
2690
  f"echo 'IDLE_TIMEOUT_SECONDS={seconds}' | sudo tee -a /etc/engine.env >/dev/null && "
2684
- "sudo systemctl restart engine-idle-detector.timer"
2691
+ "sudo systemctl restart engine-idle-detector.service"
2685
2692
  )
2686
2693
 
2687
2694
  resp = ssm.send_command(
@@ -2820,8 +2827,7 @@ def repair_engine(
2820
2827
  "echo 'finished' | sudo tee /opt/dayhoff/state/engine-init.stage > /dev/null",
2821
2828
  # Ensure SSM agent is running
2822
2829
  "sudo systemctl restart amazon-ssm-agent 2>/dev/null || true",
2823
- # Restart idle detector
2824
- "sudo systemctl restart engine-idle-detector.timer 2>/dev/null || true",
2830
+ # Restart idle detector (service only)
2825
2831
  "sudo systemctl restart engine-idle-detector.service 2>/dev/null || true",
2826
2832
  # Report status
2827
2833
  "echo '=== Repair Complete ===' && echo 'Sentinel: ' && ls -la /opt/dayhoff/first_boot_complete.sentinel",
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
5
5
 
6
6
  [project]
7
7
  name = "dayhoff-tools"
8
- version = "1.9.2"
8
+ version = "1.9.4"
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