dayhoff-tools 1.11.9__py3-none-any.whl → 1.11.11__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.
@@ -485,10 +485,14 @@ def _get_current_aws_profile() -> str:
485
485
  cmd = [aws_path, "configure", "list", "--no-cli-pager"]
486
486
  _, stdout, _ = _run_command(cmd, capture=True, check=False)
487
487
 
488
- # Extract profile from output
489
- profile_match = re.search(r"profile\s+(\S+)", stdout)
490
- if profile_match and profile_match.group(1) not in ("<not", "not"):
491
- return profile_match.group(1)
488
+ # Extract profile from output (format: "profile : <value> : <type> : <location>")
489
+ # Match the line starting with "profile" and capture the value after the first colon
490
+ profile_match = re.search(r"^profile\s+:\s+(\S+)", stdout, re.MULTILINE)
491
+ if profile_match:
492
+ profile_value = profile_match.group(1)
493
+ # Check if the profile is actually set (not "<not" or "not")
494
+ if profile_value not in ("<not", "not"):
495
+ return profile_value
492
496
  except:
493
497
  pass
494
498
 
@@ -128,8 +128,9 @@ def build_job_image(config: dict) -> str:
128
128
 
129
129
  This function handles the complete image building process:
130
130
  1. Ensures we're in the repo root
131
- 2. Constructs the image URI based on config
132
- 3. Builds the image using docker build
131
+ 2. Cleans Docker config to avoid credential helper conflicts
132
+ 3. Constructs the image URI based on config
133
+ 4. Builds the image using docker build
133
134
 
134
135
  Args:
135
136
  config: Dictionary containing the configuration loaded from YAML.
@@ -146,6 +147,11 @@ def build_job_image(config: dict) -> str:
146
147
  """
147
148
  move_to_repo_root()
148
149
 
150
+ # Clean Docker config to avoid VS Code dev container credential helper conflicts
151
+ from dayhoff_tools.deployment.deploy_utils import clean_docker_config
152
+
153
+ clean_docker_config()
154
+
149
155
  # Get image URI
150
156
  image_uri = _build_image_uri(config)
151
157
  docker_config = config["docker"]
@@ -614,6 +614,24 @@ def setup_rxnfp() -> None:
614
614
  )
615
615
 
616
616
 
617
+ def clean_docker_config() -> None:
618
+ """Clean Docker configuration to avoid credential helper conflicts.
619
+
620
+ VS Code dev containers can set up credential helpers that interfere with
621
+ Docker builds and registry operations. This function creates a clean
622
+ configuration that disables problematic credential helpers.
623
+
624
+ This is automatically called before Docker builds and registry operations
625
+ to prevent authentication failures.
626
+ """
627
+ docker_config_dir = os.path.expanduser("~/.docker")
628
+ os.makedirs(docker_config_dir, exist_ok=True)
629
+
630
+ # Write a minimal config file that disables credential helpers
631
+ with open(os.path.join(docker_config_dir, "config.json"), "w") as f:
632
+ json.dump({"auths": {}, "credsStore": ""}, f)
633
+
634
+
617
635
  def docker_login(registry: str, username: str, password: str) -> None:
618
636
  """Login to a Docker registry using provided credentials.
619
637
 
@@ -625,13 +643,8 @@ def docker_login(registry: str, username: str, password: str) -> None:
625
643
  Raises:
626
644
  subprocess.CalledProcessError: If Docker login fails
627
645
  """
628
- # Create .docker directory if it doesn't exist
629
- docker_config_dir = os.path.expanduser("~/.docker")
630
- os.makedirs(docker_config_dir, exist_ok=True)
631
-
632
- # Write a minimal config file that disables credential helpers
633
- with open(os.path.join(docker_config_dir, "config.json"), "w") as f:
634
- json.dump({"auths": {}, "credsStore": ""}, f)
646
+ # Clean Docker config to avoid credential helper conflicts
647
+ clean_docker_config()
635
648
 
636
649
  # Login to Docker using the credentials
637
650
  login_process = subprocess.run(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dayhoff-tools
3
- Version: 1.11.9
3
+ Version: 1.11.11
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 (>=0.13.2)
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"
@@ -2,7 +2,7 @@ dayhoff_tools/__init__.py,sha256=M5zThPyEBRYa5CfwlzKhcqTevWn3OKu62cjV6Zqie2A,469
2
2
  dayhoff_tools/chemistry/standardizer.py,sha256=uMn7VwHnx02nc404eO6fRuS4rsl4dvSPf2ElfZDXEpY,11188
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
- dayhoff_tools/cli/cloud_commands.py,sha256=33qcWLmq-FwEXMdL3F0OHm-5Stlh2r65CldyEZgQ1no,40904
5
+ dayhoff_tools/cli/cloud_commands.py,sha256=xrWQZm48e09GTh8RmYh3JqXUzW8mMy07dHk_77LqZx8,41199
6
6
  dayhoff_tools/cli/engine/__init__.py,sha256=RE45X2IPCNUvQp6_OHI2lbjwoqexkH3roUPccIHkeJo,9540
7
7
  dayhoff_tools/cli/engine/engine_core.py,sha256=TECO6766GCZTtbxOY7QRggwmjpMH9JZSuxjbwF46unU,27061
8
8
  dayhoff_tools/cli/engine/engine_lifecycle.py,sha256=_Dk-EZs_qbm8APdOuGOuxhlbK6RgkkoLk2nrwKoo1-A,4519
@@ -13,10 +13,10 @@ dayhoff_tools/cli/engine/studio_commands.py,sha256=VwTQujz32-uMcYusDRE73SdzRpgvI
13
13
  dayhoff_tools/cli/main.py,sha256=Ii5boey--93yGthB_eS2LC7ZR3WHGsJXDHY7uElEtso,6169
14
14
  dayhoff_tools/cli/swarm_commands.py,sha256=5EyKj8yietvT5lfoz8Zx0iQvVaNgc3SJX1z2zQR6o6M,5614
15
15
  dayhoff_tools/cli/utility_commands.py,sha256=e2P4dCCtoqMUGNyb0lFBZ6GZpl5Zslm1qqE5qIvsy38,50765
16
- dayhoff_tools/deployment/base.py,sha256=48KE76QlWMeIZJefcBOZVbyChS2V_mgs7IQ31odPV2o,17806
16
+ dayhoff_tools/deployment/base.py,sha256=fM9zyhuRvIK8YqY6ooYg9j6wy_8touA_L-dkV7FA5q4,18058
17
17
  dayhoff_tools/deployment/deploy_aws.py,sha256=gfqh09hGbz0q3oPqVm0imd_CEjKF2k8moGNRIL26qqE,18614
18
18
  dayhoff_tools/deployment/deploy_gcp.py,sha256=xgaOVsUDmP6wSEMYNkm1yRNcVskfdz80qJtCulkBIAM,8860
19
- dayhoff_tools/deployment/deploy_utils.py,sha256=StFwbqnr2_FWiKVg3xnJF4kagTHzndqqDkpaIOaAn_4,26027
19
+ dayhoff_tools/deployment/deploy_utils.py,sha256=KyUFZZWn8NGT9QpR0HGqkX-huOFubvYCabko9SlC5Gg,26516
20
20
  dayhoff_tools/deployment/job_runner.py,sha256=hljvFpH2Bw96uYyUup5Ths72PZRL_X27KxlYzBMgguo,5086
21
21
  dayhoff_tools/deployment/processors.py,sha256=LM0CQbr4XCb3AtLbrcuDQm4tYPXsoNqgVJ4WQYDjzJc,12406
22
22
  dayhoff_tools/deployment/swarm.py,sha256=YJfvVOcAS8cYcIj2fiN4qwC2leh0I9w5A4px8ZWSF6g,22833
@@ -33,7 +33,7 @@ dayhoff_tools/intake/uniprot.py,sha256=BZYJQF63OtPcBBnQ7_P9gulxzJtqyorgyuDiPeOJq
33
33
  dayhoff_tools/logs.py,sha256=DKdeP0k0kliRcilwvX0mUB2eipO5BdWUeHwh-VnsICs,838
34
34
  dayhoff_tools/sqlite.py,sha256=jV55ikF8VpTfeQqqlHSbY8OgfyfHj8zgHNpZjBLos_E,18672
35
35
  dayhoff_tools/warehouse.py,sha256=UETBtZD3r7WgvURqfGbyHlT7cxoiVq8isjzMuerKw8I,24475
36
- dayhoff_tools-1.11.9.dist-info/METADATA,sha256=POBxTDcl6NafsxeUli-dgk5-CZ7SvytEjEONN8OEazA,3014
37
- dayhoff_tools-1.11.9.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
38
- dayhoff_tools-1.11.9.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
39
- dayhoff_tools-1.11.9.dist-info/RECORD,,
36
+ dayhoff_tools-1.11.11.dist-info/METADATA,sha256=GC2z-0AdLxc-bKHH_6-hIgA1TS2Mcd-LRF06MXC8hsU,2981
37
+ dayhoff_tools-1.11.11.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
38
+ dayhoff_tools-1.11.11.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
39
+ dayhoff_tools-1.11.11.dist-info/RECORD,,