Skip to content

Parsing capability of the resource/params tag. #14

Description

@c-mertes

Lets have a proper issue for this PR. #11

So currently it is not possible to create resources or params tags with python code (sm tags).
This is because only the output and input fields are parsed for the sm tag. To enable all fields to contain python code through the sm tag all fields have to be checked with ensureString().

Im not sure if you created the stacktrace with the new version and also with the above yaml header. Since the old code only checks output and input. Therefore you also get only those calls.

Thats ways I looped over the SNAKEMAKE_FIELDS and call the ensureString() function.

If you want to make sure that the user provided the correct input for each tag, then I guess you have to create a dict with the allowed type for each tag and check this before.

Here again the header file

#'---
#' title: Example
#' author: Christian Mertes
#' wb:
#'  params: 
#'    a: '`sm config["MY_VALUE"]`'
#'    b: "ABC"
#'    c: "HELLO"
#'  input: 
#'  output:
#'---

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions