Skip to content

Commit

Permalink
feat!: added common setting for defining whether workflow sources sha…
Browse files Browse the repository at this point in the history
…ll be deployed.
  • Loading branch information
johanneskoester committed Nov 20, 2023
1 parent fc37f38 commit 04319bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions snakemake_interface_executor_plugins/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ def incomplete_external_jobid(self, job: JobExecutorInterface) -> Optional[str]:
@abstractmethod
def get_sources(self) -> Iterable[str]:
...

@abstractmethod
def get_unneeded_temp_files(self, job: JobExecutorInterface) -> Iterable[str]:
...
1 change: 1 addition & 0 deletions snakemake_interface_executor_plugins/executors/real.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def get_job_args(self, job: JobExecutorInterface, **kwargs):
format_cli_arg("--cores", kwargs.get("cores", self.cores)),
format_cli_arg("--attempt", job.attempt),
format_cli_arg("--force-use-threads", not job.is_group()),
format_cli_arg("--unneeded-temp-files", self.workflow.dag.unneeded_temp_files(job)),
self.get_resource_declarations(job),
]
)
Expand Down
5 changes: 5 additions & 0 deletions snakemake_interface_executor_plugins/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class CommonSettings:
Whether to the executor implies to not have a shared file system.
dryrun_exec : bool
Whether to jobs will be executed in dry-run mode.
job_deploy_sources : bool
Whether to deploy workflow sources before job execution. This is e.g.
needed when remote jobs are guaranteed to be not executed on a shared
filesystem. For example, this is True in the kubernetes executor plugin.
touch_exec : bool
Whether job outputs will be touched only.
use_threads : bool
Expand All @@ -46,6 +50,7 @@ class CommonSettings:

non_local_exec: bool
implies_no_shared_fs: bool
job_deploy_sources: bool
dryrun_exec: bool = False
touch_exec: bool = False
use_threads: bool = False
Expand Down

0 comments on commit 04319bb

Please sign in to comment.