Skip to content

Commit

Permalink
Merge branch 'main' into update_docker_image
Browse files Browse the repository at this point in the history
  • Loading branch information
superstar54 authored Jan 14, 2025
2 parents f4ce470 + 37a230f commit 4182484
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 11 deletions.
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ install_requires =
filelock~=3.8
importlib-resources~=5.2
aiida-wannier90-workflows==2.3.0
pymatgen==2024.5.1
anywidget==0.9.13
table_widget~=0.0.2

Expand Down
4 changes: 3 additions & 1 deletion src/aiidalab_qe/app/result/components/status/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ def _render(self):
self.to_advanced_view_button.on_click(self._switch_to_advanced_view)

simplified_tree_container = ipw.VBox(
children=[self.simplified_process_tree],
children=[
self.simplified_process_tree,
],
)

simplified_tree_node_view_container = ipw.VBox(
Expand Down
34 changes: 29 additions & 5 deletions src/aiidalab_qe/app/result/components/status/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,32 @@ def _render(self):
self.children = [
self.collapse_button,
self.trunk,
ipw.HTML("""
<div style="margin-top: 5px; font-style: italic;">
*workflow will re-submit failed calculations
</div>
"""),
ipw.HBox(
children=[
ipw.HTML(
value="*",
layout=ipw.Layout(margin="0"),
),
ipw.HTML(
value="""
<div style="font-style: italic;">
workflow will automatically re-submit failed calculations
<br>
<b>(advanced users)</b> click
<a
href="https://aiida.readthedocs.io/projects/aiida-core/en/stable/howto/workchains_restart.html"
target="_blank"
>here</a> to learn how AiiDA handles errors
</div>
""",
layout=ipw.Layout(margin="0"),
),
],
layout=ipw.Layout(
align_items="flex-start",
margin="5px 0 0 0",
),
),
]

def _update(self):
Expand All @@ -108,12 +129,14 @@ class ProcessTreeNode(ipw.VBox, t.Generic[ProcessNodeType]):
"nscf": "NSCF workflow",
"bands": "Bands workflow",
"relax": "Structure relaxation workflow",
"md": "Molecular dynamics workflow",
},
"PwCalculation": {
"scf": "Run SCF cycle",
"nscf": "Run NSCF cycle",
"bands": "Compute bands",
"relax": "Optimize structure geometry",
"md": "Run molecular dynamics simulation",
},
"DosCalculation": "Compute density of states",
"ProjwfcCalculation": "Compute projections",
Expand Down Expand Up @@ -186,6 +209,7 @@ def _get_human_readable_title(self):
if label in ("PwBaseWorkChain", "PwCalculation"):
inputs = node.inputs.pw if label == "PwBaseWorkChain" else node.inputs
calculation: str = inputs.parameters.get_dict()["CONTROL"]["calculation"]
calculation = calculation.replace("vc-", "")
return self._TITLE_MAPPING.get(label, {}).get(calculation, label)
return self._TITLE_MAPPING.get(label, label)

Expand Down
13 changes: 9 additions & 4 deletions src/aiidalab_qe/app/static/styles/status.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
}
}

.simplified-view .widget-button {
min-height: 28px;
}

.filename-display {
min-height: 32px;
}

/* Process tree */

.rolling-output {
Expand Down Expand Up @@ -50,10 +58,6 @@
line-height: 1.5;
}

.simplified-process-tree .widget-button {
height: fit-content;
}

.simplified-process-tree .tree-node-toggle:focus:enabled,
.simplified-process-tree .tree-node-toggle:hover:enabled,
.simplified-process-tree .tree-node-toggle:active:enabled,
Expand Down Expand Up @@ -96,6 +100,7 @@

.simplified-process-tree .calculation-link {
color: var(--color-link);
margin: 0 2px;
}

.simplified-process-tree .calculation-link:hover:enabled,
Expand Down
1 change: 1 addition & 0 deletions src/aiidalab_qe/common/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def __init__(self, max_width=None, **kwargs):
self.max_width = max_width
self._html = ipw.HTML()
super().__init__([self._html], **kwargs)
self.add_class("filename-display")

@traitlets.observe("value")
def _observe_filename(self, change):
Expand Down

0 comments on commit 4182484

Please sign in to comment.