pipen-cli-gbatch 0.0.3__py3-none-any.whl → 0.0.4__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 pipen-cli-gbatch might be problematic. Click here for more details.
- pipen_cli_gbatch/__init__.py +29 -5
- pipen_cli_gbatch/daemon_args.toml +1 -1
- {pipen_cli_gbatch-0.0.3.dist-info → pipen_cli_gbatch-0.0.4.dist-info}/METADATA +3 -2
- pipen_cli_gbatch-0.0.4.dist-info/RECORD +6 -0
- {pipen_cli_gbatch-0.0.3.dist-info → pipen_cli_gbatch-0.0.4.dist-info}/WHEEL +1 -1
- pipen_cli_gbatch-0.0.3.dist-info/RECORD +0 -6
- {pipen_cli_gbatch-0.0.3.dist-info → pipen_cli_gbatch-0.0.4.dist-info}/entry_points.txt +0 -0
pipen_cli_gbatch/__init__.py
CHANGED
|
@@ -79,7 +79,7 @@ from pipen.cli import CLIPlugin
|
|
|
79
79
|
from pipen.scheduler import GbatchScheduler
|
|
80
80
|
from pipen_poplog import LogsPopulator
|
|
81
81
|
|
|
82
|
-
__version__ = "0.0.
|
|
82
|
+
__version__ = "0.0.4"
|
|
83
83
|
__all__ = ("CliGbatchPlugin", "CliGbatchDaemon")
|
|
84
84
|
|
|
85
85
|
|
|
@@ -317,7 +317,7 @@ class CliGbatchDaemon:
|
|
|
317
317
|
|
|
318
318
|
def _show_scheduler_opts(self):
|
|
319
319
|
"""Log the scheduler options for debugging purposes."""
|
|
320
|
-
logger.
|
|
320
|
+
logger.info("Scheduler Options:")
|
|
321
321
|
for key, val in self.config.items():
|
|
322
322
|
if key in (
|
|
323
323
|
"workdir",
|
|
@@ -337,7 +337,7 @@ class CliGbatchDaemon:
|
|
|
337
337
|
):
|
|
338
338
|
continue
|
|
339
339
|
|
|
340
|
-
logger.
|
|
340
|
+
logger.info(f"- {key}: {val}")
|
|
341
341
|
|
|
342
342
|
async def _run_wait(self): # pragma: no cover
|
|
343
343
|
"""Run the pipeline and wait for completion.
|
|
@@ -498,7 +498,7 @@ class CliGbatchDaemon:
|
|
|
498
498
|
)
|
|
499
499
|
sys.exit(1)
|
|
500
500
|
|
|
501
|
-
if "name" not in self.config:
|
|
501
|
+
if "name" not in self.config or not self.config.name:
|
|
502
502
|
self.config["name"] = "PipenCliGbatchDaemon"
|
|
503
503
|
|
|
504
504
|
async def run(self): # pragma: no cover
|
|
@@ -767,12 +767,36 @@ class CliGbatchPlugin(CLIPlugin): # pragma: no cover
|
|
|
767
767
|
CONFIG_FILES,
|
|
768
768
|
known_parsed.profile,
|
|
769
769
|
)
|
|
770
|
+
|
|
771
|
+
def is_valid(val: Any) -> bool:
|
|
772
|
+
"""Check if a value is valid (not None, not empty string, not empty list).
|
|
773
|
+
"""
|
|
774
|
+
if val is None:
|
|
775
|
+
return False
|
|
776
|
+
if isinstance(val, bool):
|
|
777
|
+
return True
|
|
778
|
+
return bool(val)
|
|
779
|
+
|
|
770
780
|
# update parsed with the defaults
|
|
771
781
|
for key, val in defaults.items():
|
|
782
|
+
if (
|
|
783
|
+
key == "mount"
|
|
784
|
+
and val
|
|
785
|
+
and getattr(known_parsed, key, None)
|
|
786
|
+
):
|
|
787
|
+
if not isinstance(val, (tuple, list)):
|
|
788
|
+
val = [val]
|
|
789
|
+
val = list(val)
|
|
790
|
+
|
|
791
|
+
kp_mount = getattr(known_parsed, key)
|
|
792
|
+
val.extend(kp_mount)
|
|
793
|
+
setattr(known_parsed, key, val)
|
|
794
|
+
continue
|
|
795
|
+
|
|
772
796
|
if (
|
|
773
797
|
key == "command"
|
|
774
798
|
or val is None
|
|
775
|
-
or getattr(known_parsed, key, None)
|
|
799
|
+
or is_valid(getattr(known_parsed, key, None))
|
|
776
800
|
):
|
|
777
801
|
continue
|
|
778
802
|
|
|
@@ -120,7 +120,7 @@ help = "The location to run the job."
|
|
|
120
120
|
flags = ["--mount"]
|
|
121
121
|
# type = "list"
|
|
122
122
|
default = []
|
|
123
|
-
action = "
|
|
123
|
+
action = "append"
|
|
124
124
|
help = """The list of mounts to mount to the VM, each in the format of SOURCE:TARGET, where SOURCE must be either a Google Storage Bucket path (gs://...).
|
|
125
125
|
You can also use named mounts like `INDIR=gs://my-bucket/inputs` and the directory will be mounted to `/mnt/disks/INDIR` in the VM;
|
|
126
126
|
then you can use environment variable `$INDIR` in the command/script to refer to the mounted path.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pipen-cli-gbatch
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: A pipen cli plugin to run command via Google Cloud Batch
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: pwwang
|
|
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
17
|
Requires-Dist: google-cloud-storage (>=3.0.0,<4.0.0)
|
|
17
18
|
Requires-Dist: pipen (>=0.17.19,<0.18.0)
|
|
18
19
|
Requires-Dist: pipen-poplog (>=0.3.6,<0.4.0)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
pipen_cli_gbatch/__init__.py,sha256=x5R1wU-TyXS_Z1EqJ1jWhFn66sKLt_fg8eyXtz9k7rg,29508
|
|
2
|
+
pipen_cli_gbatch/daemon_args.toml,sha256=YzqLumFjIY8mRMzRt3M5D1fEjK93QvQJ0XynDnimPIo,6873
|
|
3
|
+
pipen_cli_gbatch-0.0.4.dist-info/METADATA,sha256=5i6JjljULy5Km96zlHt0dcI97Wleq73yzYpakX5j8Zw,11301
|
|
4
|
+
pipen_cli_gbatch-0.0.4.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
5
|
+
pipen_cli_gbatch-0.0.4.dist-info/entry_points.txt,sha256=Z9NLeCpRo-rb8wss5mB5TBcG-_RbdlPA49b8Ma5pvQA,57
|
|
6
|
+
pipen_cli_gbatch-0.0.4.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
pipen_cli_gbatch/__init__.py,sha256=rpkQ3NA8g4zNnzKaBz3jNZVKNDIIEPRewHK1OCvR9EA,28766
|
|
2
|
-
pipen_cli_gbatch/daemon_args.toml,sha256=PZJ7DHIvGsfVxPwDT0rhdHQb6WxnA10ebXnQOfv4faM,6879
|
|
3
|
-
pipen_cli_gbatch-0.0.3.dist-info/METADATA,sha256=jzaT7B6fAHU8xkUfINHPBOFezxnXUPm0GhiYLEft4Dg,11250
|
|
4
|
-
pipen_cli_gbatch-0.0.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
5
|
-
pipen_cli_gbatch-0.0.3.dist-info/entry_points.txt,sha256=Z9NLeCpRo-rb8wss5mB5TBcG-_RbdlPA49b8Ma5pvQA,57
|
|
6
|
-
pipen_cli_gbatch-0.0.3.dist-info/RECORD,,
|
|
File without changes
|