dayhoff-tools 1.3.13__py3-none-any.whl → 1.3.14__py3-none-any.whl

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.
@@ -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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dayhoff-tools
3
- Version: 1.3.13
3
+ Version: 1.3.14
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
@@ -3,7 +3,7 @@ dayhoff_tools/chemistry/standardizer.py,sha256=uMn7VwHnx02nc404eO6fRuS4rsl4dvSPf
3
3
  dayhoff_tools/chemistry/utils.py,sha256=jt-7JgF-GeeVC421acX-bobKbLU_X94KNOW24p_P-_M,2257
4
4
  dayhoff_tools/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  dayhoff_tools/cli/cloud_commands.py,sha256=33qcWLmq-FwEXMdL3F0OHm-5Stlh2r65CldyEZgQ1no,40904
6
- dayhoff_tools/cli/engine_commands.py,sha256=aPQp6BkPr-Dye-nNmP3STOLD8VE6nMMRGTyrrtamlYs,68022
6
+ dayhoff_tools/cli/engine_commands.py,sha256=Oo_3I5gd8zP9esjUqwv2skL8Jz3KKd-DcYjCdV34FI8,69275
7
7
  dayhoff_tools/cli/main.py,sha256=rgeEHD9lJ8SBCR34BTLb7gVInHUUdmEBNXAJnq5yEU4,4795
8
8
  dayhoff_tools/cli/swarm_commands.py,sha256=5EyKj8yietvT5lfoz8Zx0iQvVaNgc3SJX1z2zQR6o6M,5614
9
9
  dayhoff_tools/cli/utility_commands.py,sha256=qs8vH9TBFHsOPC3X8cU3qZigM3dDn-2Ytq4o_F2WubU,27874
@@ -27,7 +27,7 @@ dayhoff_tools/intake/uniprot.py,sha256=BZYJQF63OtPcBBnQ7_P9gulxzJtqyorgyuDiPeOJq
27
27
  dayhoff_tools/logs.py,sha256=DKdeP0k0kliRcilwvX0mUB2eipO5BdWUeHwh-VnsICs,838
28
28
  dayhoff_tools/sqlite.py,sha256=jV55ikF8VpTfeQqqlHSbY8OgfyfHj8zgHNpZjBLos_E,18672
29
29
  dayhoff_tools/warehouse.py,sha256=8YbnQ--usrEgDQGfvpV4MrMji55A0rq2hZaOgFGh6ag,15896
30
- dayhoff_tools-1.3.13.dist-info/METADATA,sha256=W2hjhk0hABZN4OyL1JDQv6O6fn83jMn3PkKVaF6AIoc,2825
31
- dayhoff_tools-1.3.13.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
32
- dayhoff_tools-1.3.13.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
33
- dayhoff_tools-1.3.13.dist-info/RECORD,,
30
+ dayhoff_tools-1.3.14.dist-info/METADATA,sha256=IkAuNoYuoRklhk6A6cgQl2x04MvK1AsirQixpV5rMs0,2825
31
+ dayhoff_tools-1.3.14.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
32
+ dayhoff_tools-1.3.14.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
33
+ dayhoff_tools-1.3.14.dist-info/RECORD,,