dayhoff-tools 1.3.12__tar.gz → 1.3.13__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.12 → dayhoff_tools-1.3.13}/PKG-INFO +1 -1
  2. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/cli/engine_commands.py +46 -19
  3. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/pyproject.toml +1 -1
  4. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/README.md +0 -0
  5. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/__init__.py +0 -0
  6. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/chemistry/standardizer.py +0 -0
  7. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/chemistry/utils.py +0 -0
  8. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/cli/__init__.py +0 -0
  9. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/cli/cloud_commands.py +0 -0
  10. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/cli/main.py +0 -0
  11. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/cli/swarm_commands.py +0 -0
  12. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/cli/utility_commands.py +0 -0
  13. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/deployment/base.py +0 -0
  14. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/deployment/deploy_aws.py +0 -0
  15. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/deployment/deploy_gcp.py +0 -0
  16. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/deployment/deploy_utils.py +0 -0
  17. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/deployment/job_runner.py +0 -0
  18. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/deployment/processors.py +0 -0
  19. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/deployment/swarm.py +0 -0
  20. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/embedders.py +0 -0
  21. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/fasta.py +0 -0
  22. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/file_ops.py +0 -0
  23. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/h5.py +0 -0
  24. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/intake/gcp.py +0 -0
  25. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/intake/gtdb.py +0 -0
  26. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/intake/kegg.py +0 -0
  27. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/intake/mmseqs.py +0 -0
  28. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/intake/structure.py +0 -0
  29. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/intake/uniprot.py +0 -0
  30. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/logs.py +0 -0
  31. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/dayhoff_tools/sqlite.py +0 -0
  32. {dayhoff_tools-1.3.12 → dayhoff_tools-1.3.13}/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.12
3
+ Version: 1.3.13
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
@@ -1032,21 +1032,35 @@ def resize_engine(
1032
1032
  console.print(f"[red]❌ Failed to resize engine: {error}[/red]")
1033
1033
  raise typer.Exit(1)
1034
1034
 
1035
- # Wait for volume modification to complete
1035
+ # Wait for modification to complete
1036
1036
  console.print("Waiting for volume modification to complete...")
1037
1037
  while True:
1038
1038
  mod_state = ec2.describe_volumes_modifications(VolumeIds=[root_volume_id])
1039
1039
  if not mod_state["VolumesModifications"]:
1040
1040
  break # Modification complete
1041
- state = mod_state["VolumesModifications"][0]["ModificationState"]
1041
+
1042
+ modification = mod_state["VolumesModifications"][0]
1043
+ state = modification["ModificationState"]
1044
+ progress = modification.get("Progress", 0)
1045
+
1046
+ # Show progress updates only for the resize phase
1047
+ if state == "modifying":
1048
+ console.print(f"[yellow]Progress: {progress}%[/yellow]")
1049
+
1050
+ # Exit as soon as optimization starts (resize is complete)
1051
+ if state == "optimizing":
1052
+ console.print("[green]✓ Volume resized successfully[/green]")
1053
+ console.print("[dim]AWS is optimizing the volume in the background (no action needed).[/dim]")
1054
+ break
1055
+
1042
1056
  if state == "completed":
1057
+ console.print("[green]✓ Volume resized successfully[/green]")
1043
1058
  break
1044
1059
  elif state == "failed":
1045
1060
  console.print("[red]❌ Volume modification failed[/red]")
1046
1061
  raise typer.Exit(1)
1047
- time.sleep(5)
1048
-
1049
- console.print("[green]✓ Volume resized successfully[/green]")
1062
+
1063
+ time.sleep(2) # Check more frequently for better UX
1050
1064
 
1051
1065
  # If offline resize, start the instance back up
1052
1066
  if not online and engine["state"].lower() == "running":
@@ -1796,38 +1810,51 @@ def resize_studio(
1796
1810
  )
1797
1811
 
1798
1812
  if resize_response.status_code != 200:
1799
- # Add debugging to see the actual response
1800
- try:
1801
- error_body = resize_response.json()
1802
- error = error_body.get("error", "Unknown error")
1803
- console.print(f"[red]Debug: Full error response: {error_body}[/red]")
1804
- except Exception as e:
1805
- console.print(f"[red]Debug: Failed to parse error response: {e}[/red]")
1806
- console.print(f"[red]Debug: Raw response: {resize_response.text}[/red]")
1807
- error = "Unknown error"
1808
-
1813
+ error = resize_response.json().get("error", "Unknown error")
1809
1814
  console.print(f"[red]❌ Failed to resize studio: {error}[/red]")
1810
1815
  raise typer.Exit(1)
1811
1816
 
1812
1817
  # Wait for volume modification to complete
1813
1818
  ec2 = boto3.client("ec2", region_name="us-east-1")
1814
- console.print("Waiting for volume modification to complete...")
1819
+ console.print("Resizing volume...")
1820
+
1821
+ # Track progress
1822
+ last_progress = 0
1823
+
1815
1824
  while True:
1816
1825
  try:
1817
1826
  mod_state = ec2.describe_volumes_modifications(VolumeIds=[studio["studio_id"]])
1818
1827
  if not mod_state["VolumesModifications"]:
1819
1828
  break # Modification complete
1820
- state = mod_state["VolumesModifications"][0]["ModificationState"]
1829
+
1830
+ modification = mod_state["VolumesModifications"][0]
1831
+ state = modification["ModificationState"]
1832
+ progress = modification.get("Progress", 0)
1833
+
1834
+ # Show progress updates only for the resize phase
1835
+ if state == "modifying" and progress > last_progress:
1836
+ console.print(f"[yellow]Progress: {progress}%[/yellow]")
1837
+ last_progress = progress
1838
+
1839
+ # Exit as soon as optimization starts (resize is complete)
1840
+ if state == "optimizing":
1841
+ console.print(f"[green]✓ Studio resized successfully to {size}GB![/green]")
1842
+ console.print("[dim]AWS is optimizing the volume in the background (no action needed).[/dim]")
1843
+ break
1844
+
1821
1845
  if state == "completed":
1846
+ console.print(f"[green]✓ Studio resized successfully to {size}GB![/green]")
1822
1847
  break
1823
1848
  elif state == "failed":
1824
1849
  console.print("[red]❌ Volume modification failed[/red]")
1825
1850
  raise typer.Exit(1)
1826
- time.sleep(5)
1851
+
1852
+ time.sleep(2) # Check more frequently for better UX
1853
+
1827
1854
  except ClientError:
1828
1855
  # Modification might be complete
1856
+ console.print(f"[green]✓ Studio resized successfully to {size}GB![/green]")
1829
1857
  break
1830
1858
 
1831
- console.print(f"[green]✓ Studio resized successfully to {size}GB![/green]")
1832
1859
  console.print("\n[dim]The filesystem will be automatically expanded when you next attach the studio.[/dim]")
1833
1860
  console.print(f"To attach: [cyan]dh studio attach <engine-name>[/cyan]")
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
5
5
 
6
6
  [project]
7
7
  name = "dayhoff-tools"
8
- version = "1.3.12"
8
+ version = "1.3.13"
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