Skip to content

How to pass deps, products, other objects to pytask-{r|julia|stata} #203

Closed Answered by tobiasraabe
tobiasraabe asked this question in Ideas
Discussion options

You must be logged in to vote

Exporting inputs to the script to JSON, yaml, etc.

This idea was raised by @hmgaudecker and has two elements.

The decorator

The decorator of the specific packages, @pytask.mark.r or @pytask.mark.julia only accepts options to the executable.

In addition to that, the decorator accepts two arguments. The first is a function for converting the file arguments to some format like yaml. The second provides the appropriate file ending.

Thus, a decorator has the following signature.

def julia(
    *,
    script: str | Path,
    options: Iterable[str],
    converter: Callable[Any, str] | None = None,
    file_suffix: str | None = None
):
    ...

There will be builtin converters for yaml, json, toml…

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@tobiasraabe
Comment options

@hmgaudecker
Comment options

@tobiasraabe
Comment options

@tobiasraabe
Comment options

Answer selected by tobiasraabe
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@hmgaudecker
Comment options

@janosg
Comment options

@hmgaudecker
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants