Skip to content

Commit

Permalink
Merge pull request #64 from nipreps/fix/loading-plugins-bug
Browse files Browse the repository at this point in the history
FIX: Plugin inclusion via main bootstrap file did not work
  • Loading branch information
oesteban authored Mar 25, 2023
2 parents 7424386 + 0fc5d62 commit 2269b86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions nireports/assembler/data/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,5 @@ sections:

# Example pluging specification in bootstrap file:
# plugins:
# - rating-widget:
# module: nireports.assembler
# path: data/rating-widget/bootstrap.yml
# - module: nireports.assembler
# path: data/rating-widget/bootstrap.yml
2 changes: 1 addition & 1 deletion nireports/assembler/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def __init__(
self.index(settings)

# Override plugins specified in the bootstrap with arg
if plugins is not None:
if plugins is not None or (plugins := settings.get("plugins", [])):
settings["plugins"] = [
load(Path(pkgrf(plugin["module"], plugin["path"])).read_text())
for plugin in plugins
Expand Down

0 comments on commit 2269b86

Please sign in to comment.