pipen-cli-gbatch 0.0.6__py3-none-any.whl → 0.0.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 pipen-cli-gbatch might be problematic. Click here for more details.

@@ -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.6"
82
+ __version__ = "0.0.7"
83
83
  __all__ = ("CliGbatchPlugin", "CliGbatchDaemon")
84
84
  MOUNTED_CWD = "/mnt/disks/.cwd"
85
85
 
@@ -247,8 +247,16 @@ class CliGbatchDaemon:
247
247
  command_outdir = self._get_arg_from_command("outdir")
248
248
 
249
249
  if command_outdir:
250
- self._add_mount(command_outdir, GbatchScheduler.MOUNTED_OUTDIR)
251
- self._replace_arg_in_command("outdir", GbatchScheduler.MOUNTED_OUTDIR)
250
+ coudir = AnyPath(command_outdir)
251
+ if (
252
+ not isinstance(coudir, GSPath)
253
+ and not coudir.is_absolute()
254
+ and self.mount_as_cwd
255
+ ):
256
+ self._replace_arg_in_command("outdir", f"{MOUNTED_CWD}/{coudir}")
257
+ else:
258
+ self._add_mount(command_outdir, GbatchScheduler.MOUNTED_OUTDIR)
259
+ self._replace_arg_in_command("outdir", GbatchScheduler.MOUNTED_OUTDIR)
252
260
  elif self.mount_as_cwd:
253
261
  command_name = self._get_arg_from_command("name") or self.config.name
254
262
  self._replace_arg_in_command(
@@ -516,6 +524,12 @@ class CliGbatchDaemon:
516
524
  self._handle_outdir()
517
525
  self._infer_jobname_prefix()
518
526
  else:
527
+ if "name" not in self.config or not self.config.name:
528
+ self.config["name"] = "PipenCliGbatchDaemon"
529
+
530
+ if not self.config.workdir and self.mount_as_cwd:
531
+ self.config.workdir = f"{self.mount_as_cwd}/.pipen"
532
+
519
533
  if not self.config.workdir or not isinstance(
520
534
  AnyPath(self.config.workdir),
521
535
  GSPath,
@@ -526,8 +540,6 @@ class CliGbatchDaemon:
526
540
  )
527
541
  sys.exit(1)
528
542
 
529
- if "name" not in self.config or not self.config.name:
530
- self.config["name"] = "PipenCliGbatchDaemon"
531
543
 
532
544
  async def run(self): # pragma: no cover
533
545
  """Execute the daemon pipeline based on configuration.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pipen-cli-gbatch
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: A pipen cli plugin to run command via Google Cloud Batch
5
5
  License: MIT
6
6
  Author: pwwang
@@ -0,0 +1,6 @@
1
+ pipen_cli_gbatch/__init__.py,sha256=xiYBNz3z3Eu8vmFECPFpOt1EE501T_gZx_iPUDajCd4,31309
2
+ pipen_cli_gbatch/daemon_args.toml,sha256=XrCDwTaJ7xPgGLtZev4qikjrZWqixdE8tqSsFnIvmjc,7381
3
+ pipen_cli_gbatch-0.0.7.dist-info/METADATA,sha256=pxmFaIpwMG6GU4wZF_1EBqtWa9l44KI-m1Lhi3TI1Dw,11301
4
+ pipen_cli_gbatch-0.0.7.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
5
+ pipen_cli_gbatch-0.0.7.dist-info/entry_points.txt,sha256=Z9NLeCpRo-rb8wss5mB5TBcG-_RbdlPA49b8Ma5pvQA,57
6
+ pipen_cli_gbatch-0.0.7.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- pipen_cli_gbatch/__init__.py,sha256=5ChKkEGzq1S2irrwHpNts2oqezfB1zKs5IA2i3YJd-c,30862
2
- pipen_cli_gbatch/daemon_args.toml,sha256=XrCDwTaJ7xPgGLtZev4qikjrZWqixdE8tqSsFnIvmjc,7381
3
- pipen_cli_gbatch-0.0.6.dist-info/METADATA,sha256=ZvlRbQNOG6k2EIe2UeE4f469VP8AZM_IcLDlkuw91wg,11301
4
- pipen_cli_gbatch-0.0.6.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
5
- pipen_cli_gbatch-0.0.6.dist-info/entry_points.txt,sha256=Z9NLeCpRo-rb8wss5mB5TBcG-_RbdlPA49b8Ma5pvQA,57
6
- pipen_cli_gbatch-0.0.6.dist-info/RECORD,,