dayhoff-tools 1.11.7__tar.gz → 1.11.8__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.
- {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/PKG-INFO +1 -2
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/cli/utility_commands.py +104 -1
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/pyproject.toml +1 -2
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/README.md +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/__init__.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/chemistry/standardizer.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/chemistry/utils.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/cli/__init__.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/cli/cloud_commands.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/cli/engine/__init__.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/cli/engine/engine_core.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/cli/engine/engine_lifecycle.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/cli/engine/engine_maintenance.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/cli/engine/engine_management.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/cli/engine/shared.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/cli/engine/studio_commands.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/cli/main.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/cli/swarm_commands.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/deployment/base.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/deployment/deploy_aws.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/deployment/deploy_gcp.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/deployment/deploy_utils.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/deployment/job_runner.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/deployment/processors.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/deployment/swarm.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/embedders.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/fasta.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/file_ops.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/h5.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/intake/gcp.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/intake/gtdb.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/intake/kegg.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/intake/mmseqs.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/intake/structure.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/intake/uniprot.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/logs.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/sqlite.py +0 -0
 - {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/warehouse.py +0 -0
 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Metadata-Version: 2.4
         
     | 
| 
       2 
2 
     | 
    
         
             
            Name: dayhoff-tools
         
     | 
| 
       3 
     | 
    
         
            -
            Version: 1.11. 
     | 
| 
      
 3 
     | 
    
         
            +
            Version: 1.11.8
         
     | 
| 
       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
         
     | 
| 
         @@ -29,7 +29,6 @@ Requires-Dist: pyyaml (>=6.0) 
     | 
|
| 
       29 
29 
     | 
    
         
             
            Requires-Dist: questionary (>=2.0.1)
         
     | 
| 
       30 
30 
     | 
    
         
             
            Requires-Dist: rdkit-pypi (>=2022.9.5) ; extra == "full"
         
     | 
| 
       31 
31 
     | 
    
         
             
            Requires-Dist: requests (>=2.31.0)
         
     | 
| 
       32 
     | 
    
         
            -
            Requires-Dist: seaborn
         
     | 
| 
       33 
32 
     | 
    
         
             
            Requires-Dist: sentencepiece (>=0.2.0) ; extra == "embedders"
         
     | 
| 
       34 
33 
     | 
    
         
             
            Requires-Dist: sentencepiece (>=0.2.0) ; extra == "full"
         
     | 
| 
       35 
34 
     | 
    
         
             
            Requires-Dist: sqlalchemy (>=2.0.40,<3.0.0) ; extra == "full"
         
     | 
| 
         @@ -724,6 +724,64 @@ def _get_all_platform_manifests(): 
     | 
|
| 
       724 
724 
     | 
    
         
             
                return manifest_files
         
     | 
| 
       725 
725 
     | 
    
         | 
| 
       726 
726 
     | 
    
         | 
| 
      
 727 
     | 
    
         
            +
            def _resolve_package_version(package_name: str) -> str | None:
         
     | 
| 
      
 728 
     | 
    
         
            +
                """Resolve a package version by running uv lock and parsing the lock file.
         
     | 
| 
      
 729 
     | 
    
         
            +
             
     | 
| 
      
 730 
     | 
    
         
            +
                Args:
         
     | 
| 
      
 731 
     | 
    
         
            +
                    package_name: Name of the package to resolve
         
     | 
| 
      
 732 
     | 
    
         
            +
             
     | 
| 
      
 733 
     | 
    
         
            +
                Returns:
         
     | 
| 
      
 734 
     | 
    
         
            +
                    Resolved version string, or None if resolution failed
         
     | 
| 
      
 735 
     | 
    
         
            +
                """
         
     | 
| 
      
 736 
     | 
    
         
            +
                import os
         
     | 
| 
      
 737 
     | 
    
         
            +
             
     | 
| 
      
 738 
     | 
    
         
            +
                try:
         
     | 
| 
      
 739 
     | 
    
         
            +
                    # Determine which manifest to use (prefer Mac, then AWS)
         
     | 
| 
      
 740 
     | 
    
         
            +
                    platform = os.environ.get("STUDIO_PLATFORM", "aws")
         
     | 
| 
      
 741 
     | 
    
         
            +
                    manifest_path = None
         
     | 
| 
      
 742 
     | 
    
         
            +
                    uv_dir = None
         
     | 
| 
      
 743 
     | 
    
         
            +
             
     | 
| 
      
 744 
     | 
    
         
            +
                    if platform == "mac" and Path("pyproject.mac.toml").exists():
         
     | 
| 
      
 745 
     | 
    
         
            +
                        manifest_path = Path("pyproject.mac.toml")
         
     | 
| 
      
 746 
     | 
    
         
            +
                        uv_dir = Path(".mac_uv_project")
         
     | 
| 
      
 747 
     | 
    
         
            +
                    elif Path("pyproject.aws.toml").exists():
         
     | 
| 
      
 748 
     | 
    
         
            +
                        manifest_path = Path("pyproject.aws.toml")
         
     | 
| 
      
 749 
     | 
    
         
            +
                        uv_dir = Path(".aws_uv_project")
         
     | 
| 
      
 750 
     | 
    
         
            +
                    elif Path("pyproject.mac.toml").exists():
         
     | 
| 
      
 751 
     | 
    
         
            +
                        # Fallback to Mac if AWS doesn't exist
         
     | 
| 
      
 752 
     | 
    
         
            +
                        manifest_path = Path("pyproject.mac.toml")
         
     | 
| 
      
 753 
     | 
    
         
            +
                        uv_dir = Path(".mac_uv_project")
         
     | 
| 
      
 754 
     | 
    
         
            +
                    else:
         
     | 
| 
      
 755 
     | 
    
         
            +
                        return None
         
     | 
| 
      
 756 
     | 
    
         
            +
             
     | 
| 
      
 757 
     | 
    
         
            +
                    # Create temp directory and copy manifest
         
     | 
| 
      
 758 
     | 
    
         
            +
                    uv_dir.mkdir(parents=True, exist_ok=True)
         
     | 
| 
      
 759 
     | 
    
         
            +
                    (uv_dir / "pyproject.toml").write_text(manifest_path.read_text())
         
     | 
| 
      
 760 
     | 
    
         
            +
             
     | 
| 
      
 761 
     | 
    
         
            +
                    # Copy README if it exists
         
     | 
| 
      
 762 
     | 
    
         
            +
                    if Path("README.md").exists():
         
     | 
| 
      
 763 
     | 
    
         
            +
                        (uv_dir / "README.md").write_text(Path("README.md").read_text())
         
     | 
| 
      
 764 
     | 
    
         
            +
             
     | 
| 
      
 765 
     | 
    
         
            +
                    # Run uv lock (suppress output)
         
     | 
| 
      
 766 
     | 
    
         
            +
                    subprocess.run(["uv", "lock"], cwd=str(uv_dir), check=True, capture_output=True)
         
     | 
| 
      
 767 
     | 
    
         
            +
             
     | 
| 
      
 768 
     | 
    
         
            +
                    # Parse lock file
         
     | 
| 
      
 769 
     | 
    
         
            +
                    lock_file = uv_dir / "uv.lock"
         
     | 
| 
      
 770 
     | 
    
         
            +
                    if not lock_file.exists():
         
     | 
| 
      
 771 
     | 
    
         
            +
                        return None
         
     | 
| 
      
 772 
     | 
    
         
            +
             
     | 
| 
      
 773 
     | 
    
         
            +
                    lock_data = toml.load(lock_file)
         
     | 
| 
      
 774 
     | 
    
         
            +
                    for package in lock_data.get("package", []):
         
     | 
| 
      
 775 
     | 
    
         
            +
                        if package.get("name") == package_name:
         
     | 
| 
      
 776 
     | 
    
         
            +
                            return package.get("version")
         
     | 
| 
      
 777 
     | 
    
         
            +
             
     | 
| 
      
 778 
     | 
    
         
            +
                    return None
         
     | 
| 
      
 779 
     | 
    
         
            +
             
     | 
| 
      
 780 
     | 
    
         
            +
                except Exception as e:
         
     | 
| 
      
 781 
     | 
    
         
            +
                    print(f"Warning: Failed to resolve version: {e}")
         
     | 
| 
      
 782 
     | 
    
         
            +
                    return None
         
     | 
| 
      
 783 
     | 
    
         
            +
             
     | 
| 
      
 784 
     | 
    
         
            +
             
     | 
| 
       727 
785 
     | 
    
         
             
            def _update_all_manifests_for_dayhoff_tools(new_version: str):
         
     | 
| 
       728 
786 
     | 
    
         
             
                """Update dayhoff-tools constraint in all platform manifests."""
         
     | 
| 
       729 
787 
     | 
    
         
             
                import re
         
     | 
| 
         @@ -800,8 +858,9 @@ def add_dependency( 
     | 
|
| 
       800 
858 
     | 
    
         
             
                section_name = "dev dependencies" if dev else "main dependencies"
         
     | 
| 
       801 
859 
     | 
    
         
             
                print(f"Adding '{package}' to {section_name} in all platform manifests...")
         
     | 
| 
       802 
860 
     | 
    
         | 
| 
       803 
     | 
    
         
            -
                # Parse package name to check for duplicates
         
     | 
| 
      
 861 
     | 
    
         
            +
                # Parse package name to check for duplicates and version specs
         
     | 
| 
       804 
862 
     | 
    
         
             
                package_name = re.split(r"[<>=~!\[]", package)[0].strip()
         
     | 
| 
      
 863 
     | 
    
         
            +
                has_version_spec = any(c in package for c in ["<", ">", "=", "~", "!"])
         
     | 
| 
       805 
864 
     | 
    
         | 
| 
       806 
865 
     | 
    
         
             
                for manifest_file in manifest_files:
         
     | 
| 
       807 
866 
     | 
    
         
             
                    try:
         
     | 
| 
         @@ -885,6 +944,50 @@ def add_dependency( 
     | 
|
| 
       885 
944 
     | 
    
         
             
                        print(f"Error updating {manifest_file}: {e}")
         
     | 
| 
       886 
945 
     | 
    
         | 
| 
       887 
946 
     | 
    
         
             
                print(f"\n✅ Added '{package}' to all platform manifests")
         
     | 
| 
      
 947 
     | 
    
         
            +
             
     | 
| 
      
 948 
     | 
    
         
            +
                # If no version specified, resolve and add version constraint
         
     | 
| 
      
 949 
     | 
    
         
            +
                if not has_version_spec:
         
     | 
| 
      
 950 
     | 
    
         
            +
                    print(f"\n🔍 Resolving version for '{package_name}'...")
         
     | 
| 
      
 951 
     | 
    
         
            +
                    resolved_version = _resolve_package_version(package_name)
         
     | 
| 
      
 952 
     | 
    
         
            +
             
     | 
| 
      
 953 
     | 
    
         
            +
                    if resolved_version:
         
     | 
| 
      
 954 
     | 
    
         
            +
                        print(f"📌 Resolved to version {resolved_version}")
         
     | 
| 
      
 955 
     | 
    
         
            +
                        print(
         
     | 
| 
      
 956 
     | 
    
         
            +
                            f"Updating manifests with version constraint '>={resolved_version}'..."
         
     | 
| 
      
 957 
     | 
    
         
            +
                        )
         
     | 
| 
      
 958 
     | 
    
         
            +
             
     | 
| 
      
 959 
     | 
    
         
            +
                        # Update all manifests to add version constraint
         
     | 
| 
      
 960 
     | 
    
         
            +
                        for manifest_file in manifest_files:
         
     | 
| 
      
 961 
     | 
    
         
            +
                            try:
         
     | 
| 
      
 962 
     | 
    
         
            +
                                content = manifest_file.read_text()
         
     | 
| 
      
 963 
     | 
    
         
            +
                                # Replace unversioned package with versioned one
         
     | 
| 
      
 964 
     | 
    
         
            +
                                pattern = re.compile(
         
     | 
| 
      
 965 
     | 
    
         
            +
                                    rf'^(\s*["\']){re.escape(package_name)}(["\'],?)(.*)$',
         
     | 
| 
      
 966 
     | 
    
         
            +
                                    re.MULTILINE,
         
     | 
| 
      
 967 
     | 
    
         
            +
                                )
         
     | 
| 
      
 968 
     | 
    
         
            +
             
     | 
| 
      
 969 
     | 
    
         
            +
                                def replace_with_version(match):
         
     | 
| 
      
 970 
     | 
    
         
            +
                                    prefix = match.group(1)
         
     | 
| 
      
 971 
     | 
    
         
            +
                                    suffix = match.group(2)
         
     | 
| 
      
 972 
     | 
    
         
            +
                                    rest = match.group(3)
         
     | 
| 
      
 973 
     | 
    
         
            +
                                    return (
         
     | 
| 
      
 974 
     | 
    
         
            +
                                        f"{prefix}{package_name}>={resolved_version}{suffix}{rest}"
         
     | 
| 
      
 975 
     | 
    
         
            +
                                    )
         
     | 
| 
      
 976 
     | 
    
         
            +
             
     | 
| 
      
 977 
     | 
    
         
            +
                                new_content = pattern.sub(replace_with_version, content)
         
     | 
| 
      
 978 
     | 
    
         
            +
                                manifest_file.write_text(new_content)
         
     | 
| 
      
 979 
     | 
    
         
            +
                                print(f"✅ Updated {manifest_file} with version constraint")
         
     | 
| 
      
 980 
     | 
    
         
            +
                            except Exception as e:
         
     | 
| 
      
 981 
     | 
    
         
            +
                                print(f"Warning: Could not update version in {manifest_file}: {e}")
         
     | 
| 
      
 982 
     | 
    
         
            +
             
     | 
| 
      
 983 
     | 
    
         
            +
                        print(
         
     | 
| 
      
 984 
     | 
    
         
            +
                            f"\n✅ Added '{package_name}>={resolved_version}' to all platform manifests"
         
     | 
| 
      
 985 
     | 
    
         
            +
                        )
         
     | 
| 
      
 986 
     | 
    
         
            +
                    else:
         
     | 
| 
      
 987 
     | 
    
         
            +
                        print(
         
     | 
| 
      
 988 
     | 
    
         
            +
                            f"⚠️  Could not resolve version for '{package_name}', left unversioned"
         
     | 
| 
      
 989 
     | 
    
         
            +
                        )
         
     | 
| 
      
 990 
     | 
    
         
            +
             
     | 
| 
       888 
991 
     | 
    
         
             
                print(
         
     | 
| 
       889 
992 
     | 
    
         
             
                    f"\nRun {BLUE}dh tomlsync{RESET} to install the new dependency in your environment."
         
     | 
| 
       890 
993 
     | 
    
         
             
                )
         
     | 
| 
         @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api" 
     | 
|
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            [project]
         
     | 
| 
       7 
7 
     | 
    
         
             
            name = "dayhoff-tools"
         
     | 
| 
       8 
     | 
    
         
            -
            version = "1.11. 
     | 
| 
      
 8 
     | 
    
         
            +
            version = "1.11.8"
         
     | 
| 
       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"}
         
     | 
| 
         @@ -21,7 +21,6 @@ dependencies = [ 
     | 
|
| 
       21 
21 
     | 
    
         
             
                "questionary>=2.0.1",
         
     | 
| 
       22 
22 
     | 
    
         
             
                "tzdata>=2025.2",
         
     | 
| 
       23 
23 
     | 
    
         
             
                "boto3>=1.36.8",
         
     | 
| 
       24 
     | 
    
         
            -
                "seaborn",
         
     | 
| 
       25 
24 
     | 
    
         
             
            ]
         
     | 
| 
       26 
25 
     | 
    
         
             
            requires-python = ">=3.10,<4.0"
         
     | 
| 
       27 
26 
     | 
    
         | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
    
        {dayhoff_tools-1.11.7 → dayhoff_tools-1.11.8}/dayhoff_tools/cli/engine/engine_maintenance.py
    RENAMED
    
    | 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     |