dayhoff-tools 1.3.13__tar.gz → 1.3.15__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.13 → dayhoff_tools-1.3.15}/PKG-INFO +1 -1
  2. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/cli/engine_commands.py +32 -3
  3. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/pyproject.toml +1 -1
  4. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/README.md +0 -0
  5. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/__init__.py +0 -0
  6. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/chemistry/standardizer.py +0 -0
  7. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/chemistry/utils.py +0 -0
  8. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/cli/__init__.py +0 -0
  9. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/cli/cloud_commands.py +0 -0
  10. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/cli/main.py +0 -0
  11. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/cli/swarm_commands.py +0 -0
  12. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/cli/utility_commands.py +0 -0
  13. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/deployment/base.py +0 -0
  14. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/deployment/deploy_aws.py +0 -0
  15. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/deployment/deploy_gcp.py +0 -0
  16. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/deployment/deploy_utils.py +0 -0
  17. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/deployment/job_runner.py +0 -0
  18. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/deployment/processors.py +0 -0
  19. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/deployment/swarm.py +0 -0
  20. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/embedders.py +0 -0
  21. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/fasta.py +0 -0
  22. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/file_ops.py +0 -0
  23. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/h5.py +0 -0
  24. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/intake/gcp.py +0 -0
  25. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/intake/gtdb.py +0 -0
  26. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/intake/kegg.py +0 -0
  27. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/intake/mmseqs.py +0 -0
  28. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/intake/structure.py +0 -0
  29. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/intake/uniprot.py +0 -0
  30. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/logs.py +0 -0
  31. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/dayhoff_tools/sqlite.py +0 -0
  32. {dayhoff_tools-1.3.13 → dayhoff_tools-1.3.15}/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.13
3
+ Version: 1.3.15
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
@@ -959,6 +959,9 @@ def resize_engine(
959
959
  online: bool = typer.Option(
960
960
  False, "--online", help="Resize while running (requires manual filesystem expansion)"
961
961
  ),
962
+ force: bool = typer.Option(
963
+ False, "--force", "-f", help="Force resize and detach all studios"
964
+ ),
962
965
  ):
963
966
  """Resize an engine's boot disk."""
964
967
  check_aws_sso()
@@ -1024,14 +1027,39 @@ def resize_engine(
1024
1027
  resize_response = make_api_request(
1025
1028
  "POST",
1026
1029
  f"/engines/{engine['instance_id']}/resize",
1027
- json_data={"size": size}
1030
+ json_data={"size": size, "detach_studios": force}
1028
1031
  )
1029
1032
 
1033
+ if resize_response.status_code == 409 and not force:
1034
+ # Engine has attached studios
1035
+ data = resize_response.json()
1036
+ attached_studios = data.get("attached_studios", [])
1037
+
1038
+ console.print("\n[yellow]⚠️ This engine has attached studios:[/yellow]")
1039
+ for studio in attached_studios:
1040
+ console.print(f" • {studio['user']} ({studio['studio_id']})")
1041
+
1042
+ if Confirm.ask("\nDetach all studios and resize the engine?"):
1043
+ resize_response = make_api_request(
1044
+ "POST",
1045
+ f"/engines/{engine['instance_id']}/resize",
1046
+ json_data={"size": size, "detach_studios": True}
1047
+ )
1048
+ else:
1049
+ console.print("Resize cancelled.")
1050
+ return
1051
+
1030
1052
  if resize_response.status_code != 200:
1031
1053
  error = resize_response.json().get("error", "Unknown error")
1032
1054
  console.print(f"[red]❌ Failed to resize engine: {error}[/red]")
1033
1055
  raise typer.Exit(1)
1034
1056
 
1057
+ # Check if studios were detached
1058
+ data = resize_response.json()
1059
+ detached_studios = data.get("detached_studios", 0)
1060
+ if detached_studios > 0:
1061
+ console.print(f"[green]✓ Detached {detached_studios} studio(s) before resize[/green]")
1062
+
1035
1063
  # Wait for modification to complete
1036
1064
  console.print("Waiting for volume modification to complete...")
1037
1065
  while True:
@@ -1076,8 +1104,9 @@ def resize_engine(
1076
1104
  elif online and engine["state"].lower() == "running":
1077
1105
  console.print("\n[yellow]⚠️ Online resize complete. You must now expand the filesystem:[/yellow]")
1078
1106
  console.print(f"1. SSH into the engine: [cyan]ssh {engine['name']}[/cyan]")
1079
- console.print("2. Run: [cyan]sudo growpart /dev/nvme0n1 1[/cyan]")
1080
- console.print("3. Run: [cyan]sudo xfs_growfs /[/cyan]")
1107
+ console.print("2. Find the root device: [cyan]lsblk[/cyan]")
1108
+ console.print("3. Expand the partition: [cyan]sudo growpart /dev/nvme0n1 1[/cyan] (adjust device name as needed)")
1109
+ console.print("4. Expand the filesystem: [cyan]sudo xfs_growfs /[/cyan]")
1081
1110
 
1082
1111
  except ClientError as e:
1083
1112
  console.print(f"[red]❌ Failed to resize engine: {e}[/red]")
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
5
5
 
6
6
  [project]
7
7
  name = "dayhoff-tools"
8
- version = "1.3.13"
8
+ version = "1.3.15"
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