Closed wirespecter closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 3.66%. Comparing base (
2dd079e
) to head (6aae67f
).
It seems like we have some issues after the upgrade.
In particular, this workflow fails:
Snakefile
def get_all_inputs(wildcards):
import os
files = os.listdir("inputs")
full_files = [f"inputs/{file}" for file in files]
return full_files
rule all:
input:
"results/merged.txt"
rule merge:
input:
get_all_inputs
output:
"results/merged.txt"
container:
"docker://docker.io/library/ubuntu:20.04"
shell:
"mkdir results && echo done > {output}"
reana.yaml
inputs:
directories:
- inputs
files:
- Snakefile
workflow:
type: snakemake
file: Snakefile
File structure (input files are empty)
$ tree
.
├── inputs
│ ├── a.txt
│ ├── b.txt
│ └── c.txt
├── reana.yaml
└── Snakefile
2 directories, 5 files
Error reported by REANA
2024-07-25 15:32:02,164 | snakemake.logging | MainThread | CRITICAL | File path ' inputs/ a.txt ' ends with whitespace. This is likely unintended. It can also lead to inconsistent results of the file-matching approach used by Snakemake.
2024-07-25 15:32:02,168 | snakemake.logging | MainThread | ERROR | MissingInputException in rule merge in file /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/fbd5cc04-f1be-4078-b1db-4b55809d3b0b/Snakefile, line 11:
Missing input files for rule merge:
output: results/merged.txt
affected files:
inputs/ a.txt
inputs/ c.txt
inputs/ b.txt
For some reason, the files have whitespaces in their filename, we can have a look together
Edit: see also https://github.com/snakemake/snakemake/issues/2480
Closes https://github.com/reanahub/reana/issues/808 Old PR: https://github.com/reanahub/reana-workflow-engine-snakemake/pull/98