Skip to content

Commit f511ab0

Browse files
committed
Minor update to the Snakemake documentation and test code
1 parent 10a0384 commit f511ab0

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

tests/translators_loggers/test_translators_loggers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def run_workflow_makeflow(container, num_tasks, str_dirpath):
223223

224224
def run_workflow_snakemake(container, num_tasks, str_dirpath):
225225
# Run the workflow (with full logging)
226-
exit_code, output = container.exec_run(cmd=["bash", "-c", "snakemake -s ./workflow.smk --cores 1 --logger snkmt --logger-snkmt-db ./snkmt.sqlite"],
226+
exit_code, output = container.exec_run(cmd=["bash", "-c", "snakemake -s ./workflow.smk --cores 1 --logger snkmt --logger-snkmt-db --no-temp ./snkmt.sqlite"],
227227
user="wfcommons", stdout=True, stderr=True)
228228
# Check sanity
229229
assert (exit_code == 0)

wfcommons/wfinstances/logs/snakemake.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
class SnakemakeLogsParser(LogsParser):
3030
"""
3131
Parse a Snakemake execution directory to generate workflow instance. It requires the path of
32-
a sqlite database file generated by the `snkmt` logger plugin when the workflow is executed
33-
as `snakemake ----logger snkmt --logger-snkmt-db ./snkmt.sqlite ...`
32+
a sqlite database file generated by the `snkmt` logger plugin. It also requires that all temp
33+
files be preserved. In other words the workflow should be executed as
34+
as `snakemake --logger snkmt --logger-snkmt-db ./snkmt.sqlite --no-temp ...`
3435
3536
:param execution_dir: Snakemake execution dir (all workflow input/output file, and also typically the Snakefile).
3637
:type execution_dir: pathlib.Path
@@ -187,4 +188,4 @@ def _create_tasks(self):
187188
for input_idx in input_to:
188189
for output_idx in output_from:
189190
# print(f"Adding dependency: {self.task_map[output_idx]} --> {self.task_map[input_idx]}")
190-
self.workflow.add_dependency(self.task_map[output_idx], self.task_map[input_idx])
191+
self.workflow.add_dependency(self.task_map[output_idx], self.task_map[input_idx])

0 commit comments

Comments
 (0)