When using the workflow_file parameter of create_workflow_from_json, snakemake workflows (and probably also the others) do not run correctly as the Snakemake specification is never loaded:
From reana-demo-helloword:
import os
import yaml
from reana_client.api.client import (
create_workflow_from_json,
upload_to_server,
start_workflow,
)
WORKFLOW_NAME = "api-client-snakemake"
REANA_ACCESS_TOKEN = os.environ["REANA_ACCESS_TOKEN"]
REANA_YAML = "reana-snakemake.yaml"
with open(REANA_YAML) as f:
spec = yaml.safe_load(f)
create_workflow_from_json(
workflow_file=spec["workflow"]["file"],
name=WORKFLOW_NAME,
access_token=REANA_ACCESS_TOKEN,
parameters=spec["inputs"],
workflow_engine=spec["workflow"]["type"],
outputs=spec["outputs"],
)
abs_path_to_input_files = [os.path.abspath(f) for f in spec["inputs"]["files"]]
upload_to_server(WORKFLOW_NAME, abs_path_to_input_files, REANA_ACCESS_TOKEN)
start_workflow(WORKFLOW_NAME, REANA_ACCESS_TOKEN, {})
When using the
workflow_file
parameter ofcreate_workflow_from_json
, snakemake workflows (and probably also the others) do not run correctly as the Snakemake specification is never loaded:From reana-demo-helloword: