dayhoff-tools 1.3.25__tar.gz → 1.3.27__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.3.25 → dayhoff_tools-1.3.27}/PKG-INFO +1 -1
  2. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/cli/engine_commands.py +42 -8
  3. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/pyproject.toml +1 -1
  4. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/README.md +0 -0
  5. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/__init__.py +0 -0
  6. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/chemistry/standardizer.py +0 -0
  7. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/chemistry/utils.py +0 -0
  8. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/cli/__init__.py +0 -0
  9. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/cli/cloud_commands.py +0 -0
  10. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/cli/main.py +0 -0
  11. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/cli/swarm_commands.py +0 -0
  12. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/cli/utility_commands.py +0 -0
  13. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/deployment/base.py +0 -0
  14. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/deployment/deploy_aws.py +0 -0
  15. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/deployment/deploy_gcp.py +0 -0
  16. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/deployment/deploy_utils.py +0 -0
  17. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/deployment/job_runner.py +0 -0
  18. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/deployment/processors.py +0 -0
  19. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/deployment/swarm.py +0 -0
  20. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/embedders.py +0 -0
  21. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/fasta.py +0 -0
  22. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/file_ops.py +0 -0
  23. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/h5.py +0 -0
  24. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/intake/gcp.py +0 -0
  25. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/intake/gtdb.py +0 -0
  26. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/intake/kegg.py +0 -0
  27. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/intake/mmseqs.py +0 -0
  28. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/intake/structure.py +0 -0
  29. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/intake/uniprot.py +0 -0
  30. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/logs.py +0 -0
  31. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/sqlite.py +0 -0
  32. {dayhoff_tools-1.3.25 → dayhoff_tools-1.3.27}/dayhoff_tools/warehouse.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dayhoff-tools
3
- Version: 1.3.25
3
+ Version: 1.3.27
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
@@ -592,13 +592,16 @@ def engine_status(
592
592
  engines = response.json().get("engines", [])
593
593
  engine = resolve_engine(name_or_id, engines)
594
594
 
595
- # Get attached studios info
596
- response = make_api_request(
597
- "GET", f"/engines/{engine['instance_id']}/attached-studios"
598
- )
599
- attached_studios = []
600
- if response.status_code == 200:
601
- attached_studios = response.json().get("studios", [])
595
+ # Get detailed engine status including idle detector info
596
+ response = make_api_request("GET", f"/engines/{engine['instance_id']}")
597
+ if response.status_code != 200:
598
+ console.print("[red]❌ Failed to fetch engine details[/red]")
599
+ raise typer.Exit(1)
600
+
601
+ engine_details = response.json()
602
+ engine = engine_details.get("engine", engine) # Use detailed info if available
603
+ idle_detector = engine_details.get("idle_detector", {})
604
+ attached_studios = engine_details.get("attached_studios", [])
602
605
 
603
606
  # Calculate costs
604
607
  launch_time = parse_launch_time(engine["launch_time"])
@@ -642,6 +645,37 @@ def engine_status(
642
645
  status_lines.append(f" • Idle Detector: {health.get('idle_detector_timer', 'unknown')}")
643
646
  except Exception:
644
647
  pass
648
+
649
+ # Idle detector status (from new API endpoint)
650
+ if idle_detector.get("available"):
651
+ status_lines.append("")
652
+ status_lines.append("[bold]Idle Detector:[/bold]")
653
+
654
+ # Overall status
655
+ if idle_detector["status"] == "active":
656
+ status_lines.append(" [green]✓ Engine ACTIVE[/green]")
657
+ else:
658
+ idle_seconds = idle_detector.get("idle_seconds", 0)
659
+ idle_threshold = idle_detector.get("idle_threshold", 1800)
660
+ idle_minutes = idle_seconds // 60
661
+ threshold_minutes = idle_threshold // 60
662
+ status_lines.append(f" [yellow]⏱ Engine IDLE ({idle_minutes}/{threshold_minutes} minutes)[/yellow]")
663
+
664
+ # Coffee lock
665
+ if idle_detector.get("coffee_lock"):
666
+ status_lines.append(f" • [cyan]☕ Caffeinated for another {idle_detector['coffee_lock']}[/cyan]")
667
+
668
+ # SSH sessions
669
+ ssh_sessions = idle_detector.get("ssh_sessions", [])
670
+ if ssh_sessions:
671
+ status_lines.append(f" • [blue]SSH Sessions ({len(ssh_sessions)}):[/blue]")
672
+ for session in ssh_sessions:
673
+ status_lines.append(f" - {session['tty']} (pid {session['pid']}, idle {session['idle_time']}) from {session['from_ip']}")
674
+
675
+ # IDE connections
676
+ ide_conn = idle_detector.get("ide_connections")
677
+ if ide_conn:
678
+ status_lines.append(f" • [magenta]🖥 IDE connected ({ide_conn['connection_count']} connections)[/magenta]")
645
679
 
646
680
  if attached_studios:
647
681
  status_lines.append("")
@@ -978,7 +1012,7 @@ def coffee(
978
1012
  else:
979
1013
  console.print(f"Pouring coffee for [cyan]{engine['name']}[/cyan] for {duration}…")
980
1014
 
981
- # Use SSM to run the engine keep-alive command
1015
+ # Use SSM to run the engine coffee command
982
1016
  ssm = boto3.client("ssm", region_name="us-east-1")
983
1017
  try:
984
1018
  response = ssm.send_command(
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
5
5
 
6
6
  [project]
7
7
  name = "dayhoff-tools"
8
- version = "1.3.25"
8
+ version = "1.3.27"
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