gagneurlab / gagneurlab/wBuild
Parsing capability of the resource/params tag.
- Dominant language
- Python
- Stars
- 4
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
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:
#'---
```
Contributor guide
Research direction
Start by tracing the sm-tag parser, the existing ensureString() calls, and the SNAKEMAKE_FIELDS loop described in the issue. Use the supplied header example to check how params and other fields are handled; done means Python expressions are parsed consistently across the intended fields and the accepted field types are clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100