Skip to content
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

tobiasraabe Feb 14, 2022
Maintainer Author

@hmgaudecker
Comment options

@tobiasraabe
Comment options

tobiasraabe Feb 15, 2022
Maintainer Author

@tobiasraabe
Comment options

tobiasraabe Apr 19, 2022
Maintainer Author

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