8000 Use new plugin API from QE app by edan-bainglass · Pull Request #17 · aiidalab/aiidalab-qe-hp · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ name = 'aiidalab-qe-hp'
readme = 'README.md'
requires-python = '>=3.12'

[project.entry-points."aiidalab_qe.properties"]
"hp" = "aiidalab_qe_hp:hp"
[project.entry-points."aiidalab_qe.plugins"]
"hp" = "aiidalab_qe_hp:HpPlugin"

[project.optional-dependencies]
dev = [
Expand Down
65 changes: 36 additions & 29 deletions src/aiidalab_qe_hp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
"""AiiDALab plugin for Quantum ESPRESSO Hubbard parameters (HP) calculations."""
"""AiiDALab QE plugin for computing Hubbard parameters (HP)."""

from aiidalab_qe.common.panel import PluginOutline

from .model import HpSettingsModel
from .resources import HpResourceSettingsModel, HpResourceSettingsPanel
from .results import HpResultsModel, HpResultsPanel
from .settings import HpSettingsPanel
from .workchain import workchain_and_builder
from aiidalab_qe.plugins import QeAppPlugin

__version__ = '0.1.6'


class HpPluginOutline(PluginOutline):
title = 'Hubbard parameter (HP)'
help = """"""


hp = {
'outline': HpPluginOutline,
'configuration': {
'panel': HpSettingsPanel,
'model': HpSettingsModel,
},
'resources': {
'panel': HpResourceSettingsPanel,
'model': HpResourceSettingsModel,
},
'workchain': workchain_and_builder,
'result': {
'panel': HpResultsPanel,
'model': HpResultsModel,
},
}
class HpPlugin(QeAppPlugin):
@property
def outline(self) -> str:
return 'Hubbard parameter (HP)'

def configuration(self):
from .model import HpSettingsModel
from .settings import HpSettingsPanel

return {
'panel': HpSettingsPanel,
'model': HpSettingsModel,
}

def resources(self):
from .resources import HpResourceSettingsModel, HpResourceSettingsPanel

return {
'panel': HpResourceSettingsPanel,
'model': HpResourceSettingsModel,
}

def workchain(self):
from .workchain import workchain_and_builder

return workchain_and_builder

def result(self):
from .results import HpResultsModel, HpResultsPanel

return {
'panel': HpResultsPanel,
'model': HpResultsModel,
}
Loading
0