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

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

You must be logged in to vote
4 replies
@tobiasraabe

tobiasraabe Feb 14, 2022
Maintainer Author

@hmgaudecker

@tobiasraabe

tobiasraabe Feb 15, 2022
Maintainer Author

@tobiasraabe

tobiasraabe Apr 19, 2022
Maintainer Author

Answer selected by tobiasraabe

You must be logged in to vote
0 replies

You must be logged in to vote
3 replies
@hmgaudecker

@janosg

@hmgaudecker

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