dayhoff-tools 1.3.6__tar.gz → 1.3.7__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.6 → dayhoff_tools-1.3.7}/PKG-INFO +1 -1
  2. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/cli/engine_commands.py +38 -11
  3. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/pyproject.toml +1 -1
  4. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/README.md +0 -0
  5. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/__init__.py +0 -0
  6. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/chemistry/standardizer.py +0 -0
  7. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/chemistry/utils.py +0 -0
  8. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/cli/__init__.py +0 -0
  9. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/cli/cloud_commands.py +0 -0
  10. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/cli/main.py +0 -0
  11. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/cli/swarm_commands.py +0 -0
  12. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/cli/utility_commands.py +0 -0
  13. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/deployment/base.py +0 -0
  14. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/deployment/deploy_aws.py +0 -0
  15. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/deployment/deploy_gcp.py +0 -0
  16. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/deployment/deploy_utils.py +0 -0
  17. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/deployment/job_runner.py +0 -0
  18. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/deployment/processors.py +0 -0
  19. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/deployment/swarm.py +0 -0
  20. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/embedders.py +0 -0
  21. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/fasta.py +0 -0
  22. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/file_ops.py +0 -0
  23. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/h5.py +0 -0
  24. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/intake/gcp.py +0 -0
  25. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/intake/gtdb.py +0 -0
  26. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/intake/kegg.py +0 -0
  27. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/intake/mmseqs.py +0 -0
  28. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/intake/structure.py +0 -0
  29. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/intake/uniprot.py +0 -0
  30. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/logs.py +0 -0
  31. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/dayhoff_tools/sqlite.py +0 -0
  32. {dayhoff_tools-1.3.6 → dayhoff_tools-1.3.7}/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.6
3
+ Version: 1.3.7
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
@@ -163,7 +163,7 @@ def format_status(state: str, ready: Optional[bool]) -> str:
163
163
  if ready is True:
164
164
  return "[green]Running ✓[/green]"
165
165
  elif ready is False:
166
- return "[yellow]Running ⚠ (Initializing...)[/yellow]"
166
+ return "[yellow]Running ⚠ (Bootstrapping...)[/yellow]"
167
167
  else:
168
168
  return "[green]Running[/green]"
169
169
  elif state.lower() == "stopped":
@@ -332,7 +332,6 @@ def launch_engine(
332
332
  else:
333
333
  error = response.json().get("error", "Unknown error")
334
334
  console.print(f"[red]❌ Failed to launch engine: {error}[/red]")
335
- raise typer.Exit(1)
336
335
 
337
336
 
338
337
  @engine_app.command("list")
@@ -948,15 +947,43 @@ def create_ami(
948
947
 
949
948
  response = ec2.create_image(**create_params)
950
949
 
951
- ami_id = response["ImageId"]
952
- console.print(f"[green]✓ AMI creation initiated![/green]")
953
- console.print(f"AMI ID: [cyan]{ami_id}[/cyan]")
954
- console.print("\n[dim]The AMI creation process will continue in the background.[/dim]")
955
- console.print("[dim]You can monitor progress in the EC2 Console under 'AMIs'.[/dim]")
956
- console.print(
957
- f"\nOnce complete, run [cyan]terraform apply[/cyan] in "
958
- f"terraform/environments/dev to use the new AMI."
959
- )
950
+ ami_id = response["ImageId"]
951
+ console.print(f"[green]✓ AMI creation initiated![/green]")
952
+ console.print(f"AMI ID: [cyan]{ami_id}[/cyan]")
953
+
954
+ # Restore the source engine to a normal state
955
+ console.print("Restoring source engine state...")
956
+ restore_response = ssm.send_command(
957
+ InstanceIds=[engine["instance_id"]],
958
+ DocumentName="AWS-RunShellScript",
959
+ Parameters={
960
+ "commands": [
961
+ "sudo touch /opt/dayhoff/first_boot_complete.sentinel",
962
+ "sudo systemctl restart engine-idle-detector.timer",
963
+ ],
964
+ "executionTimeout": ["60"],
965
+ },
966
+ )
967
+
968
+ # Quick wait to see if it failed immediately
969
+ time.sleep(1)
970
+ restore_command_id = restore_response["Command"]["CommandId"]
971
+ result = ssm.get_command_invocation(
972
+ CommandId=restore_command_id,
973
+ InstanceId=engine["instance_id"],
974
+ )
975
+ if result["Status"] not in ["Pending", "InProgress", "Success"]:
976
+ console.print("[yellow]⚠️ Warning: Failed to restore source engine state.[/yellow]")
977
+ else:
978
+ console.print("[green]✓ Source engine restored to normal operation.[/green]")
979
+
980
+
981
+ console.print("\n[dim]The AMI creation process will continue in the background.[/dim]")
982
+ console.print("[dim]You can monitor progress in the EC2 Console under 'AMIs'.[/dim]")
983
+ console.print(
984
+ f"\nOnce complete, run [cyan]terraform apply[/cyan] in "
985
+ f"terraform/environments/dev to use the new AMI."
986
+ )
960
987
 
961
988
  except ClientError as e:
962
989
  console.print(f"[red]❌ Failed to create AMI: {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.6"
8
+ version = "1.3.7"
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