Skip to content

Commit

Permalink
Expand on the docstring explaining plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
tkkuehn committed Mar 7, 2023
1 parent bc0100d commit eb447b0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion snakebids/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,15 @@ def add_plugins(
"""Supply list of methods to be called after cli parsing
Each callable in ``plugins`` should take, as a single argument, a
reference to the ``SnakeBidsApp``, and should not return anything.
reference to the ``SnakeBidsApp``, and should return either:
- Nothing, in which case any changes to the SnakeBidsApp need to
come from mutating it.
- A ``SnakeBidsApp``, which will be used to call Snakemake. Note
that in this case, any processing of CLI arguments and
configuration must already be handled, so it is recommended to
use ``copy.deepcopy`` to copy the original ``SnakeBidsApp``.
Plugins may perform any arbitrary side effects, including validation,
optimization, other other enhancements to the snakebids app.
Expand Down

0 comments on commit eb447b0

Please sign in to comment.