-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support result panel from multiple plugins, add `electronic_structure…
…` plugin (#522) This PR supports: - showing the result from multiple plugins. - only shows the result panel when it is available. - use `electronic_structure` plugin as an example, in which the result panel needs both `pdos` and `bands` plugin.
- Loading branch information
1 parent
b493ee8
commit 88e7e52
Showing
11 changed files
with
118 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from .result import Result | ||
|
||
electronic_structure = { | ||
"result": Result, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
def test_electronic_structure(generate_qeapp_workchain): | ||
"""Test the electronic structure tab.""" | ||
from aiida import engine | ||
|
||
from aiidalab_qe.app.result.workchain_viewer import WorkChainViewer | ||
|
||
wkchain = generate_qeapp_workchain() | ||
wkchain.node.set_exit_status(0) | ||
wkchain.node.set_process_state(engine.ProcessState.FINISHED) | ||
wcv = WorkChainViewer(wkchain.node) | ||
# find the tab with the identifier "electronic_structure" | ||
# the built-in summary and structure tabs is not a plugin panel, | ||
# thus don't have identifiers | ||
tab = [ | ||
tab | ||
for tab in wcv.result_tabs.children | ||
if getattr(tab, "identifier", "") == "electronic_structure" | ||
][0] | ||
# It should have two children: settings and the _bands_plot_view | ||
assert len(tab.children) == 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters