dayhoff-tools 1.5.5__py3-none-any.whl → 1.5.7__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.
Potentially problematic release.
This version of dayhoff-tools might be problematic. Click here for more details.
- dayhoff_tools/cli/engine_commands.py +2 -2
- dayhoff_tools/warehouse.py +49 -12
- {dayhoff_tools-1.5.5.dist-info → dayhoff_tools-1.5.7.dist-info}/METADATA +1 -1
- {dayhoff_tools-1.5.5.dist-info → dayhoff_tools-1.5.7.dist-info}/RECORD +6 -6
- {dayhoff_tools-1.5.5.dist-info → dayhoff_tools-1.5.7.dist-info}/WHEEL +0 -0
- {dayhoff_tools-1.5.5.dist-info → dayhoff_tools-1.5.7.dist-info}/entry_points.txt +0 -0
|
@@ -415,7 +415,7 @@ def update_ssh_config_entry(engine_name: str, instance_id: str, ssh_user: str, i
|
|
|
415
415
|
Host {engine_name} {SSH_MANAGED_COMMENT}
|
|
416
416
|
HostName {instance_id}
|
|
417
417
|
User {ssh_user}
|
|
418
|
-
ProxyCommand sh -c \"AWS_SSM_IDLE_TIMEOUT={idle_timeout} aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p
|
|
418
|
+
ProxyCommand sh -c \"AWS_SSM_IDLE_TIMEOUT={idle_timeout} aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'\"\n"""
|
|
419
419
|
|
|
420
420
|
# Check if entry already exists
|
|
421
421
|
host_line = f"Host {engine_name} {SSH_MANAGED_COMMENT}"
|
|
@@ -1029,7 +1029,7 @@ def config_ssh(
|
|
|
1029
1029
|
f"Host {engine['name']} {SSH_MANAGED_COMMENT}",
|
|
1030
1030
|
f" HostName {engine['instance_id']}",
|
|
1031
1031
|
f" User {ssh_user}",
|
|
1032
|
-
f" ProxyCommand sh -c \"AWS_SSM_IDLE_TIMEOUT=600 aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p
|
|
1032
|
+
f" ProxyCommand sh -c \"AWS_SSM_IDLE_TIMEOUT=600 aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'\"",
|
|
1033
1033
|
]
|
|
1034
1034
|
)
|
|
1035
1035
|
|
dayhoff_tools/warehouse.py
CHANGED
|
@@ -9,6 +9,25 @@ from zoneinfo import ZoneInfo
|
|
|
9
9
|
# Import cloud helper lazily inside functions to avoid heavy deps at module load
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
def _find_project_root() -> Path | None:
|
|
13
|
+
"""
|
|
14
|
+
Find the project root by searching upwards from the current directory for
|
|
15
|
+
a `.git` directory or a `pyproject.toml` file.
|
|
16
|
+
|
|
17
|
+
Returns:
|
|
18
|
+
The path to the project root, or None if not found.
|
|
19
|
+
"""
|
|
20
|
+
current_dir = Path.cwd().resolve()
|
|
21
|
+
while current_dir != current_dir.parent:
|
|
22
|
+
if (current_dir / ".git").is_dir() or (current_dir / "pyproject.toml").is_file():
|
|
23
|
+
return current_dir
|
|
24
|
+
current_dir = current_dir.parent
|
|
25
|
+
# Check the final directory in the hierarchy (e.g., '/')
|
|
26
|
+
if (current_dir / ".git").is_dir() or (current_dir / "pyproject.toml").is_file():
|
|
27
|
+
return current_dir
|
|
28
|
+
return None
|
|
29
|
+
|
|
30
|
+
|
|
12
31
|
def _warn_if_gcp_default_sa(force_prompt: bool = False) -> None:
|
|
13
32
|
"""Warn the user when the active gcloud principal is the default VM service
|
|
14
33
|
account. See detailed docstring later in file (duplicate for early
|
|
@@ -528,11 +547,17 @@ def import_from_warehouse_typer() -> None:
|
|
|
528
547
|
import questionary
|
|
529
548
|
|
|
530
549
|
# Ensure execution from root directory
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
550
|
+
project_root = _find_project_root()
|
|
551
|
+
cwd = Path.cwd()
|
|
552
|
+
if not project_root or project_root != cwd:
|
|
553
|
+
error_msg = (
|
|
554
|
+
"This command must be run from the project's root directory, which is"
|
|
555
|
+
" expected to contain a `.git` folder or a `pyproject.toml` file.\n"
|
|
556
|
+
f"Current directory: {cwd}"
|
|
535
557
|
)
|
|
558
|
+
if project_root:
|
|
559
|
+
error_msg += f"\nDetected project root: {project_root}"
|
|
560
|
+
raise Exception(error_msg)
|
|
536
561
|
|
|
537
562
|
# Use questionary for prompts instead of typer
|
|
538
563
|
warehouse_path = questionary.text("Warehouse path:").ask()
|
|
@@ -574,11 +599,17 @@ def get_from_warehouse_typer() -> None:
|
|
|
574
599
|
import questionary
|
|
575
600
|
|
|
576
601
|
# Ensure execution from root directory
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
602
|
+
project_root = _find_project_root()
|
|
603
|
+
cwd = Path.cwd()
|
|
604
|
+
if not project_root or project_root != cwd:
|
|
605
|
+
error_msg = (
|
|
606
|
+
"This command must be run from the project's root directory, which is"
|
|
607
|
+
" expected to contain a `.git` folder or a `pyproject.toml` file.\n"
|
|
608
|
+
f"Current directory: {cwd}"
|
|
581
609
|
)
|
|
610
|
+
if project_root:
|
|
611
|
+
error_msg += f"\nDetected project root: {project_root}"
|
|
612
|
+
raise Exception(error_msg)
|
|
582
613
|
|
|
583
614
|
# Use questionary for prompts instead of typer
|
|
584
615
|
warehouse_path = questionary.text("Warehouse path:").ask()
|
|
@@ -619,11 +650,17 @@ def add_to_warehouse_typer() -> None:
|
|
|
619
650
|
import questionary
|
|
620
651
|
|
|
621
652
|
# Ensure execution from root directory
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
653
|
+
project_root = _find_project_root()
|
|
654
|
+
cwd = Path.cwd()
|
|
655
|
+
if not project_root or project_root != cwd:
|
|
656
|
+
error_msg = (
|
|
657
|
+
"This command must be run from the project's root directory, which is"
|
|
658
|
+
" expected to contain a `.git` folder or a `pyproject.toml` file.\n"
|
|
659
|
+
f"Current directory: {cwd}"
|
|
626
660
|
)
|
|
661
|
+
if project_root:
|
|
662
|
+
error_msg += f"\nDetected project root: {project_root}"
|
|
663
|
+
raise Exception(error_msg)
|
|
627
664
|
|
|
628
665
|
# Prompt for the data file path
|
|
629
666
|
warehouse_path = questionary.text("Data file to be registered:").ask()
|
|
@@ -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=
|
|
6
|
+
dayhoff_tools/cli/engine_commands.py,sha256=_WzJpxwGVmN0vem6oVi5FosQkKaEGCLUgoUHoKSWejg,89475
|
|
7
7
|
dayhoff_tools/cli/main.py,sha256=tRN7WCBHg6uyNp6rA54pKTCoVmBntta2i0Yas3bUpZ4,4853
|
|
8
8
|
dayhoff_tools/cli/swarm_commands.py,sha256=5EyKj8yietvT5lfoz8Zx0iQvVaNgc3SJX1z2zQR6o6M,5614
|
|
9
9
|
dayhoff_tools/cli/utility_commands.py,sha256=FRZTPrjsG_qmIIqoNxd1Q1vVkS_5w8aY33IrVYVNCLg,18131
|
|
@@ -26,8 +26,8 @@ dayhoff_tools/intake/structure.py,sha256=ufN3gAodQxhnt7psK1VTQeu9rKERmo_PhoxIbB4
|
|
|
26
26
|
dayhoff_tools/intake/uniprot.py,sha256=BZYJQF63OtPcBBnQ7_P9gulxzJtqyorgyuDiPeOJqE4,16456
|
|
27
27
|
dayhoff_tools/logs.py,sha256=DKdeP0k0kliRcilwvX0mUB2eipO5BdWUeHwh-VnsICs,838
|
|
28
28
|
dayhoff_tools/sqlite.py,sha256=jV55ikF8VpTfeQqqlHSbY8OgfyfHj8zgHNpZjBLos_E,18672
|
|
29
|
-
dayhoff_tools/warehouse.py,sha256=
|
|
30
|
-
dayhoff_tools-1.5.
|
|
31
|
-
dayhoff_tools-1.5.
|
|
32
|
-
dayhoff_tools-1.5.
|
|
33
|
-
dayhoff_tools-1.5.
|
|
29
|
+
dayhoff_tools/warehouse.py,sha256=heaYc64qplgN3_1WVPFmqj53goStioWwY5NqlWc4c0s,24453
|
|
30
|
+
dayhoff_tools-1.5.7.dist-info/METADATA,sha256=APBk7rddBNxAjWSsibYM8Fx5B_BRJXRHi61rqjBRGZg,2914
|
|
31
|
+
dayhoff_tools-1.5.7.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
32
|
+
dayhoff_tools-1.5.7.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
|
|
33
|
+
dayhoff_tools-1.5.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|