dayhoff-tools 1.13.6__tar.gz → 1.13.8__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 (53) hide show
  1. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/PKG-INFO +1 -1
  2. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/engine_commands.py +58 -23
  3. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/pyproject.toml +1 -1
  4. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/README.md +0 -0
  5. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/__init__.py +0 -0
  6. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/chemistry/standardizer.py +0 -0
  7. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/chemistry/utils.py +0 -0
  8. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/__init__.py +0 -0
  9. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/cloud_commands.py +0 -0
  10. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engine1/__init__.py +0 -0
  11. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engine1/engine_core.py +0 -0
  12. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engine1/engine_lifecycle.py +0 -0
  13. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engine1/engine_maintenance.py +0 -0
  14. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engine1/engine_management.py +0 -0
  15. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engine1/shared.py +0 -0
  16. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engine1/studio_commands.py +0 -0
  17. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/__init__.py +0 -0
  18. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/api_client.py +0 -0
  19. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/auth.py +0 -0
  20. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/engine-studio-cli.md +0 -0
  21. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/progress.py +0 -0
  22. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/simulators/cli-simulators.md +0 -0
  23. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/simulators/demo.sh +0 -0
  24. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/simulators/engine_list_simulator.py +0 -0
  25. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/simulators/engine_status_simulator.py +0 -0
  26. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/simulators/idle_status_simulator.py +0 -0
  27. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/simulators/simulator_utils.py +0 -0
  28. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/simulators/studio_list_simulator.py +0 -0
  29. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/simulators/studio_status_simulator.py +0 -0
  30. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/engines_studios/studio_commands.py +0 -0
  31. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/main.py +0 -0
  32. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/swarm_commands.py +0 -0
  33. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/cli/utility_commands.py +0 -0
  34. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/deployment/base.py +0 -0
  35. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/deployment/deploy_aws.py +0 -0
  36. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/deployment/deploy_gcp.py +0 -0
  37. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/deployment/deploy_utils.py +0 -0
  38. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/deployment/job_runner.py +0 -0
  39. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/deployment/processors.py +0 -0
  40. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/deployment/swarm.py +0 -0
  41. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/embedders.py +0 -0
  42. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/fasta.py +0 -0
  43. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/file_ops.py +0 -0
  44. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/h5.py +0 -0
  45. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/intake/gcp.py +0 -0
  46. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/intake/gtdb.py +0 -0
  47. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/intake/kegg.py +0 -0
  48. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/intake/mmseqs.py +0 -0
  49. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/intake/structure.py +0 -0
  50. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/intake/uniprot.py +0 -0
  51. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/logs.py +0 -0
  52. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/sqlite.py +0 -0
  53. {dayhoff_tools-1.13.6 → dayhoff_tools-1.13.8}/dayhoff_tools/warehouse.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dayhoff-tools
3
- Version: 1.13.6
3
+ Version: 1.13.8
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
@@ -69,11 +69,15 @@ def _update_ssh_config_silent(client: StudioManagerClient, env: str) -> bool:
69
69
  if state != "running":
70
70
  continue
71
71
 
72
+ # Map environment to AWS profile
73
+ profile = f"{env}-devaccess"
74
+
72
75
  config_entries.append(f"\nHost {name}\n")
73
76
  config_entries.append(f" HostName {instance_id}\n")
74
77
  config_entries.append(f" User {user}\n")
78
+ config_entries.append(f" ForwardAgent yes\n")
75
79
  config_entries.append(
76
- f" ProxyCommand aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'\n"
80
+ f" ProxyCommand aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p' --profile {profile}\n"
77
81
  )
78
82
 
79
83
  config_entries.append(managed_end)
@@ -213,46 +217,71 @@ def launch_engine(
213
217
 
214
218
  except Exception as e:
215
219
  error_msg = str(e)
216
-
220
+
217
221
  # Check for quota/limit errors
218
222
  if "VcpuLimitExceeded" in error_msg or "vCPU limit" in error_msg:
219
223
  click.echo(f"✗ Failed to launch engine: vCPU quota exceeded", err=True)
220
224
  click.echo("", err=True)
221
- click.echo(f"The {env} AWS account has insufficient vCPU quota for {engine_type} instances.", err=True)
225
+ click.echo(
226
+ f"The {env} AWS account has insufficient vCPU quota for {engine_type} instances.",
227
+ err=True,
228
+ )
222
229
  click.echo("", err=True)
223
230
  click.echo("Solutions:", err=True)
224
- click.echo(" 1. Use a different instance type (e.g., --type cpu)", err=True)
231
+ click.echo(
232
+ " 1. Use a different instance type (e.g., --type cpu)", err=True
233
+ )
225
234
  click.echo(" 2. Request a quota increase:", err=True)
226
235
  click.echo(" • AWS Console → Service Quotas → Amazon EC2", err=True)
227
236
  click.echo(" • Find quota for the instance family", err=True)
228
- click.echo(" • Request increase (typically approved within 24h)", err=True)
237
+ click.echo(
238
+ " • Request increase (typically approved within 24h)", err=True
239
+ )
229
240
  click.echo("", err=True)
230
- click.echo("For testing infrastructure, use CPU instances instead of GPU.", err=True)
241
+ click.echo(
242
+ "For testing infrastructure, use CPU instances instead of GPU.",
243
+ err=True,
244
+ )
231
245
  raise click.Abort()
232
-
246
+
233
247
  # Check for insufficient capacity errors
234
248
  if "InsufficientInstanceCapacity" in error_msg:
235
- click.echo(f"✗ Failed to launch engine: insufficient EC2 capacity", err=True)
249
+ click.echo(
250
+ f"✗ Failed to launch engine: insufficient EC2 capacity", err=True
251
+ )
236
252
  click.echo("", err=True)
237
- click.echo(f"AWS does not have available {engine_type} capacity in your region/AZ.", err=True)
253
+ click.echo(
254
+ f"AWS does not have available {engine_type} capacity in your region/AZ.",
255
+ err=True,
256
+ )
238
257
  click.echo("", err=True)
239
258
  click.echo("Solutions:", err=True)
240
- click.echo(" 1. Try again in a few minutes (capacity fluctuates)", err=True)
259
+ click.echo(
260
+ " 1. Try again in a few minutes (capacity fluctuates)", err=True
261
+ )
241
262
  click.echo(" 2. Use a different instance type", err=True)
242
263
  click.echo(" 3. Contact AWS support for capacity reservations", err=True)
243
264
  raise click.Abort()
244
-
265
+
245
266
  # Check for instance limit errors
246
- if "InstanceLimitExceeded" in error_msg or "instance limit" in error_msg.lower():
267
+ if (
268
+ "InstanceLimitExceeded" in error_msg
269
+ or "instance limit" in error_msg.lower()
270
+ ):
247
271
  click.echo(f"✗ Failed to launch engine: instance limit exceeded", err=True)
248
272
  click.echo("", err=True)
249
- click.echo(f"You have reached the maximum number of running instances in {env}.", err=True)
273
+ click.echo(
274
+ f"You have reached the maximum number of running instances in {env}.",
275
+ err=True,
276
+ )
250
277
  click.echo("", err=True)
251
278
  click.echo("Solutions:", err=True)
252
- click.echo(" 1. Terminate unused engines: dh engine2 list --env {env}", err=True)
279
+ click.echo(
280
+ " 1. Terminate unused engines: dh engine2 list --env {env}", err=True
281
+ )
253
282
  click.echo(" 2. Request a limit increase via AWS Service Quotas", err=True)
254
283
  raise click.Abort()
255
-
284
+
256
285
  # Generic error
257
286
  click.echo(f"✗ Failed to launch engine: {e}", err=True)
258
287
  raise click.Abort()
@@ -594,19 +623,24 @@ def engine_status(name_or_id: str, env: Optional[str]):
594
623
  remaining = readiness["estimated_time_remaining_seconds"]
595
624
  click.echo(f"Estimated Time Remaining: {remaining}s")
596
625
 
597
- # Show attached studios (always, even without idle state)
598
- attached_studios = status_data.get("attached_studios", [])
599
- if attached_studios:
600
- studio_names = ", ".join([f"\033[35m{s.get('user', 'unknown')}\033[0m" for s in attached_studios])
601
- click.echo(f"\nAttached Studios: {studio_names}")
602
- else:
603
- click.echo(f"\nAttached Studios: None")
604
-
605
626
  # Show idle state (only for running engines) - always detailed per user request
627
+ attached_studios = status_data.get("attached_studios", [])
606
628
  if status_data.get("idle_state"):
607
629
  click.echo(
608
630
  f"\n{format_idle_state(status_data['idle_state'], detailed=True, attached_studios=attached_studios)}"
609
631
  )
632
+ else:
633
+ # If no idle state yet, still show attached studios
634
+ if attached_studios:
635
+ studio_names = ", ".join(
636
+ [
637
+ f"\033[35m{s.get('user', 'unknown')}\033[0m"
638
+ for s in attached_studios
639
+ ]
640
+ )
641
+ click.echo(f"\nAttached Studios: {studio_names}")
642
+ else:
643
+ click.echo(f"\nAttached Studios: None")
610
644
 
611
645
  except Exception as e:
612
646
  click.echo(f"✗ Error: {e}", err=True)
@@ -853,6 +887,7 @@ def config_ssh(clean: bool, all: bool, admin: bool, env: Optional[str]):
853
887
  config_entries.append(f"\nHost {name}\n")
854
888
  config_entries.append(f" HostName {instance_id}\n")
855
889
  config_entries.append(f" User {username}\n")
890
+ config_entries.append(f" ForwardAgent yes\n")
856
891
  config_entries.append(
857
892
  f" ProxyCommand aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p' --profile {aws_profile}\n"
858
893
  )
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
5
5
 
6
6
  [project]
7
7
  name = "dayhoff-tools"
8
- version = "1.13.6"
8
+ version = "1.13.8"
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