dayhoff-tools 1.4.21__tar.gz → 1.5.1__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.

Files changed (32) hide show
  1. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/PKG-INFO +1 -1
  2. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/cli/engine_commands.py +26 -0
  3. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/pyproject.toml +1 -1
  4. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/README.md +0 -0
  5. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/__init__.py +0 -0
  6. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/chemistry/standardizer.py +0 -0
  7. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/chemistry/utils.py +0 -0
  8. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/cli/__init__.py +0 -0
  9. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/cli/cloud_commands.py +0 -0
  10. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/cli/main.py +0 -0
  11. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/cli/swarm_commands.py +0 -0
  12. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/cli/utility_commands.py +0 -0
  13. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/deployment/base.py +0 -0
  14. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/deployment/deploy_aws.py +0 -0
  15. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/deployment/deploy_gcp.py +0 -0
  16. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/deployment/deploy_utils.py +0 -0
  17. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/deployment/job_runner.py +0 -0
  18. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/deployment/processors.py +0 -0
  19. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/deployment/swarm.py +0 -0
  20. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/embedders.py +0 -0
  21. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/fasta.py +0 -0
  22. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/file_ops.py +0 -0
  23. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/h5.py +0 -0
  24. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/intake/gcp.py +0 -0
  25. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/intake/gtdb.py +0 -0
  26. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/intake/kegg.py +0 -0
  27. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/intake/mmseqs.py +0 -0
  28. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/intake/structure.py +0 -0
  29. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/intake/uniprot.py +0 -0
  30. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/logs.py +0 -0
  31. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/sqlite.py +0 -0
  32. {dayhoff_tools-1.4.21 → dayhoff_tools-1.5.1}/dayhoff_tools/warehouse.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dayhoff-tools
3
- Version: 1.4.21
3
+ Version: 1.5.1
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
@@ -1,6 +1,7 @@
1
1
  """Engine and Studio management commands for DHT CLI."""
2
2
 
3
3
  import json
4
+ import shutil
4
5
  import subprocess
5
6
  import sys
6
7
  import time
@@ -365,6 +366,19 @@ def get_ssh_public_key() -> str:
365
366
  )
366
367
 
367
368
 
369
+ def check_session_manager_plugin():
370
+ """Check if AWS Session Manager Plugin is available and warn if not."""
371
+ if shutil.which("session-manager-plugin") is None:
372
+ console.print(
373
+ "[bold red]⚠️ AWS Session Manager Plugin not found![/bold red]\n"
374
+ "SSH connections to engines require the Session Manager Plugin.\n"
375
+ "Please install it following the setup guide:\n"
376
+ "[link]https://github.com/dayhofflabs/nutshell/blob/main/REFERENCE/setup_guides/new-laptop.md[/link]"
377
+ )
378
+ return False
379
+ return True
380
+
381
+
368
382
  def update_ssh_config_entry(engine_name: str, instance_id: str, ssh_user: str):
369
383
  """Add or update a single SSH config entry for the given SSH user."""
370
384
  config_path = Path.home() / ".ssh" / "config"
@@ -850,6 +864,10 @@ def ssh_engine(
850
864
  Pass `--admin` to connect with the underlying [`ec2-user`] account for break-glass or debugging.
851
865
  """
852
866
  username = check_aws_sso()
867
+
868
+ # Check for Session Manager Plugin
869
+ if not check_session_manager_plugin():
870
+ raise typer.Exit(1)
853
871
 
854
872
  # Get all engines to resolve name
855
873
  response = make_api_request("GET", "/engines")
@@ -887,6 +905,10 @@ def config_ssh(
887
905
  """Update SSH config with available engines."""
888
906
  username = check_aws_sso()
889
907
 
908
+ # Only check for Session Manager Plugin if we're not just cleaning
909
+ if not clean and not check_session_manager_plugin():
910
+ raise typer.Exit(1)
911
+
890
912
  if clean:
891
913
  console.print("Removing all managed SSH entries...")
892
914
  else:
@@ -1568,6 +1590,10 @@ def attach_studio(
1568
1590
  """Attach your studio to an engine."""
1569
1591
  username = check_aws_sso()
1570
1592
 
1593
+ # Check for Session Manager Plugin since we'll update SSH config
1594
+ if not check_session_manager_plugin():
1595
+ raise typer.Exit(1)
1596
+
1571
1597
  # Use specified user if provided, otherwise use current user
1572
1598
  target_user = user if user else username
1573
1599
 
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
5
5
 
6
6
  [project]
7
7
  name = "dayhoff-tools"
8
- version = "1.4.21"
8
+ version = "1.5.1"
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