Skip to content

Commit

Permalink
[Fix] Resolve missing XPS resource (#1071)
Browse files Browse the repository at this point in the history
* Add xps resource
* Remove `structure` from XAS title
  • Loading branch information
superstar54 authored Jan 10, 2025
1 parent 07593e3 commit 75a792d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/aiidalab_qe/plugins/xas/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class XasResourceSettingsModel(PluginResourceSettingsModel):
"""Model for the XAS plugin."""

title = "XAS Structure"
title = "XAS"
identifier = "xas"

def __init__(self, **kwargs):
Expand Down
5 changes: 5 additions & 0 deletions src/aiidalab_qe/plugins/xps/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from aiidalab_qe.common.panel import PluginOutline

from .model import XpsConfigurationSettingsModel
from .resources import XpsResourceSettingsModel, XpsResourceSettingsPanel
from .result import XpsResultsModel, XpsResultsPanel
from .setting import XpsConfigurationSettingsPanel
from .structure_examples import structure_examples
Expand All @@ -18,6 +19,10 @@ class XpsPluginOutline(PluginOutline):
"panel": XpsConfigurationSettingsPanel,
"model": XpsConfigurationSettingsModel,
},
"resources": {
"panel": XpsResourceSettingsPanel,
"model": XpsResourceSettingsModel,
},
"result": {
"panel": XpsResultsPanel,
"model": XpsResultsModel,
Expand Down
32 changes: 32 additions & 0 deletions src/aiidalab_qe/plugins/xps/resources.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""Resource panel for XPS plugin."""

from aiidalab_qe.common.code.model import PwCodeModel
from aiidalab_qe.common.panel import (
PluginResourceSettingsModel,
PluginResourceSettingsPanel,
)


class XpsResourceSettingsModel(PluginResourceSettingsModel):
"""Model for the XPS plugin."""

title = "XPS"
identifier = "xps"

def __init__(self, **kwargs):
super().__init__(**kwargs)
self.add_models(
{
"pw": PwCodeModel(
name="pw.x",
description="pw.x",
default_calc_job_plugin="quantumespresso.pw",
),
}
)


class XpsResourceSettingsPanel(
PluginResourceSettingsPanel[XpsResourceSettingsModel],
):
"""Panel for configuring the XPS plugin."""

0 comments on commit 75a792d

Please sign in to comment.