Skip to content

Commit

Permalink
feat: add unparse_func
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester committed Sep 28, 2023
1 parent 976c05e commit b5cd066
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions poetry_snakemake_plugin/templates/executor-plugins/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ class ExecutorSettings(ExecutorSettingsBase):
# for setting defaults
# (https://snakemake.readthedocs.io/en/stable/executing/cli.html#profiles).
"env_var": False,
# Optionally specify a function that parses the value given by the user.
# This is useful to create complex types from the user input.
"parse_func": ...,
# If a parse_func is specified, you also have to specify an unparse_func
# that converts the parsed value back to a string.
"unparse_func": ...,
# Optionally specify that setting is required when the executor is in use.
"required": True,
},
Expand Down
3 changes: 3 additions & 0 deletions poetry_snakemake_plugin/templates/storage-plugins/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class StorageProviderSettings(StorageProviderSettingsBase):
# Optionally specify a function that parses the value given by the user.
# This is useful to create complex types from the user input.
"parse_func": ...,
# If a parse_func is specified, you also have to specify an unparse_func
# that converts the parsed value back to a string.
"unparse_func": ...,
# Optionally specify that setting is required when the executor is in use.
"required": True,
},
Expand Down

0 comments on commit b5cd066

Please sign in to comment.