Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing capability of the resource/params tag. #14

Open
c-mertes opened this issue Aug 22, 2018 · 0 comments
Open

Parsing capability of the resource/params tag. #14

c-mertes opened this issue Aug 22, 2018 · 0 comments

Comments

@c-mertes
Copy link
Contributor

c-mertes commented Aug 22, 2018

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:
#'---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant