Skip to content

Commit

Permalink
Add modules from all contexts in the kitchen sink example (#135)
Browse files Browse the repository at this point in the history
* Add modules from all contexts to kitchen sink example

* Address code review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: Bradley Dice <bdice@bradleydice.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed May 27, 2022
1 parent 0fd1bb9 commit 63f7ef6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/kitchen-sink/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ class Project(FlowProject):
}

modules = []
if "dashboard" not in project.document:
# Initialize a new Dashboard using all modules with default settings
for m in signac_dashboard.modules.__all__:
modules.append(getattr(signac_dashboard.modules, m).__call__())
# Initialize a new Dashboard using all modules with default settings
for m in signac_dashboard.modules.__all__:
module = getattr(signac_dashboard.modules, m)
for c in module._supported_contexts:
modules.append(module(context=c))
Dashboard(config=config, modules=modules, project=Project.get_project()).main()

0 comments on commit 63f7ef6

Please sign in to comment.