dayhoff-tools 1.13.10__py3-none-any.whl → 1.13.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.
@@ -344,46 +344,55 @@ def create_or_update_job_definition(
344
344
  f"Adding mount points to job definition: {batch_job_config['mountPoints']}"
345
345
  )
346
346
 
347
- # Auto-mount Primordial Drive if available
348
- # This ensures all batch jobs have access to shared datasets at /primordial/
349
- primordial_fs_id = get_primordial_fs_id(session)
350
- if primordial_fs_id:
351
- print(f"Adding Primordial Drive configuration (fs_id: {primordial_fs_id})")
352
-
353
- # Add volume configuration
354
- efs_volume = {
355
- "name": "primordial",
356
- "efsVolumeConfiguration": {
357
- "fileSystemId": primordial_fs_id,
358
- "rootDirectory": "/",
359
- },
360
- }
361
-
362
- if "volumes" not in container_properties:
363
- container_properties["volumes"] = []
364
-
365
- # Check if already added to avoid duplicates
366
- if not any(
367
- v.get("name") == "primordial" for v in container_properties["volumes"]
368
- ):
369
- container_properties["volumes"].append(efs_volume)
370
-
371
- # Add mount point
372
- mount_point = {
373
- "sourceVolume": "primordial",
374
- "containerPath": "/primordial",
375
- "readOnly": False,
376
- }
377
-
378
- if "mountPoints" not in container_properties:
379
- container_properties["mountPoints"] = []
380
-
381
- # Check if already added
382
- if not any(
383
- mp.get("containerPath") == "/primordial"
384
- for mp in container_properties["mountPoints"]
385
- ):
386
- container_properties["mountPoints"].append(mount_point)
347
+ # Mount Primordial Drive if explicitly enabled via feature flag
348
+ # Add 'mount_primordial_drive' to features list to mount shared EFS at /primordial/
349
+ features = config.get("features", []) or []
350
+ features_set = {f if isinstance(f, str) else next(iter(f)) for f in features}
351
+ mount_primordial = "mount_primordial_drive" in features_set
352
+
353
+ if mount_primordial:
354
+ primordial_fs_id = get_primordial_fs_id(session)
355
+ if primordial_fs_id:
356
+ print(f"Adding Primordial Drive configuration (fs_id: {primordial_fs_id})")
357
+
358
+ # Add volume configuration
359
+ efs_volume = {
360
+ "name": "primordial",
361
+ "efsVolumeConfiguration": {
362
+ "fileSystemId": primordial_fs_id,
363
+ "rootDirectory": "/",
364
+ },
365
+ }
366
+
367
+ if "volumes" not in container_properties:
368
+ container_properties["volumes"] = []
369
+
370
+ # Check if already added to avoid duplicates
371
+ if not any(
372
+ v.get("name") == "primordial" for v in container_properties["volumes"]
373
+ ):
374
+ container_properties["volumes"].append(efs_volume)
375
+
376
+ # Add mount point
377
+ mount_point = {
378
+ "sourceVolume": "primordial",
379
+ "containerPath": "/primordial",
380
+ "readOnly": False,
381
+ }
382
+
383
+ if "mountPoints" not in container_properties:
384
+ container_properties["mountPoints"] = []
385
+
386
+ # Check if already added
387
+ if not any(
388
+ mp.get("containerPath") == "/primordial"
389
+ for mp in container_properties["mountPoints"]
390
+ ):
391
+ container_properties["mountPoints"].append(mount_point)
392
+ else:
393
+ print(
394
+ "Warning: mount_primordial_drive enabled but Primordial Drive not found in this environment"
395
+ )
387
396
 
388
397
  # Check if job definition already exists using the session client
389
398
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dayhoff-tools
3
- Version: 1.13.10
3
+ Version: 1.13.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,7 @@ dayhoff_tools/cli/main.py,sha256=Nz_jtbppmvWKHZydQ0nkt_eejccJE90ces8xCGrerdY,708
29
29
  dayhoff_tools/cli/swarm_commands.py,sha256=5EyKj8yietvT5lfoz8Zx0iQvVaNgc3SJX1z2zQR6o6M,5614
30
30
  dayhoff_tools/cli/utility_commands.py,sha256=e2P4dCCtoqMUGNyb0lFBZ6GZpl5Zslm1qqE5qIvsy38,50765
31
31
  dayhoff_tools/deployment/base.py,sha256=fM9zyhuRvIK8YqY6ooYg9j6wy_8touA_L-dkV7FA5q4,18058
32
- dayhoff_tools/deployment/deploy_aws.py,sha256=3xNuGvwDKvICfiLXVeM4Oz8MXQ363voTM-6vXHtEHZY,20987
32
+ dayhoff_tools/deployment/deploy_aws.py,sha256=1j16aE4hmln4pQVtcSGuIGVWbOBfWwveytvihjofADo,21519
33
33
  dayhoff_tools/deployment/deploy_gcp.py,sha256=xgaOVsUDmP6wSEMYNkm1yRNcVskfdz80qJtCulkBIAM,8860
34
34
  dayhoff_tools/deployment/deploy_utils.py,sha256=KyUFZZWn8NGT9QpR0HGqkX-huOFubvYCabko9SlC5Gg,26516
35
35
  dayhoff_tools/deployment/job_runner.py,sha256=hljvFpH2Bw96uYyUup5Ths72PZRL_X27KxlYzBMgguo,5086
@@ -48,7 +48,7 @@ dayhoff_tools/intake/uniprot.py,sha256=BZYJQF63OtPcBBnQ7_P9gulxzJtqyorgyuDiPeOJq
48
48
  dayhoff_tools/logs.py,sha256=DKdeP0k0kliRcilwvX0mUB2eipO5BdWUeHwh-VnsICs,838
49
49
  dayhoff_tools/sqlite.py,sha256=jV55ikF8VpTfeQqqlHSbY8OgfyfHj8zgHNpZjBLos_E,18672
50
50
  dayhoff_tools/warehouse.py,sha256=UETBtZD3r7WgvURqfGbyHlT7cxoiVq8isjzMuerKw8I,24475
51
- dayhoff_tools-1.13.10.dist-info/METADATA,sha256=RwVcLNZbrSHXOK8jbzm9c3bPchOE3sZAET6k1VYV0zQ,2981
52
- dayhoff_tools-1.13.10.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
53
- dayhoff_tools-1.13.10.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
54
- dayhoff_tools-1.13.10.dist-info/RECORD,,
51
+ dayhoff_tools-1.13.11.dist-info/METADATA,sha256=BkD-bKUPgbnhU1G91rDs7Ex8bGPQ4JTwoG5Netpfs7g,2981
52
+ dayhoff_tools-1.13.11.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
53
+ dayhoff_tools-1.13.11.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
54
+ dayhoff_tools-1.13.11.dist-info/RECORD,,