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. #11

Closed

Conversation

c-mertes
Copy link
Contributor

The resource and params tag of the snakemake field can be a dict. And also they can be quoted by the '`sm' tag.

To enable all fields to be parsed with python code we need to loop over all fields and convert the dictionaries into strings to write them out later into the rule.

Hope this helps to go into the right direction.

I guess the exception to catch if the 'output' of the knitr part is wrong indented has to go somewhere else, but I do not know where.

The resource and params tag of the snakemake field can be a dict. And also they can be quoted by the '`sm' tag. Therefore the loop over the snakemake fields.
@c-mertes
Copy link
Contributor Author

This would be an example header. The same goes for resources

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

Snakemake needs a named array instead of a dict in the rule for params and resources
@stefanches7
Copy link
Collaborator

You're right about the possibility of dicts under tags generally. However, the ensureString() is only calles on "input" and "output" tags:
image
Therefore, it's same to assume that we catch exactly the bug with high probability.

@kTakumo
Copy link
Contributor

kTakumo commented Sep 26, 2019

Now implemented.

@kTakumo kTakumo closed this Sep 26, 2019
This pull request was closed.
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

Successfully merging this pull request may close these issues.

3 participants