Skip to content

Commit 3a381a7

Browse files
chore: update readme
1 parent c51e47b commit 3a381a7

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ from snakemake_interface_executor_plugins.jobs import (
2727
# of None or anything else that makes sense in your case.
2828
@dataclass
2929
class ExecutorSettings(ExecutorSettingsBase):
30-
myparam: Optional[int]=field(
30+
myparam: Optional[int] = field(
3131
default=None,
3232
metadata={
33-
"help": "Some help text",
33+
"help": "Some help text",
3434
# Optionally request that setting is also available for specification
3535
# via an environment variable. The variable will be named automatically as
3636
# SNAKEMAKE_<executor-name>_<param-name>, all upper case.
@@ -39,9 +39,15 @@ class ExecutorSettings(ExecutorSettingsBase):
3939
# for setting defaults
4040
# (https://snakemake.readthedocs.io/en/stable/executing/cli.html#profiles).
4141
"env_var": False,
42+
# Optionally specify a function that parses the value given by the user.
43+
# This is useful to create complex types from the user input.
44+
"parse_func": ...,
45+
# If a parse_func is specified, you also have to specify an unparse_func
46+
# that converts the parsed value back to a string.
47+
"unparse_func": ...,
4248
# Optionally specify that setting is required when the executor is in use.
43-
"required": True
44-
}
49+
"required": True,
50+
},
4551
)
4652

4753

0 commit comments

Comments
 (0)