From adc2c8cb5686b58779505e568bab2d1f4a70b701 Mon Sep 17 00:00:00 2001 From: Sebastiaan Huber Date: Sun, 3 Sep 2023 15:57:38 +0200 Subject: [PATCH 1/2] CLI: Remove loading backend for `verdi plugin list` This command doesn't need the storage backend and loading it adds significant unnecessary run time. --- aiida/cmdline/commands/cmd_plugin.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aiida/cmdline/commands/cmd_plugin.py b/aiida/cmdline/commands/cmd_plugin.py index 9f9a44d1e7..2bc4b457fc 100644 --- a/aiida/cmdline/commands/cmd_plugin.py +++ b/aiida/cmdline/commands/cmd_plugin.py @@ -13,7 +13,7 @@ import click from aiida.cmdline.commands.cmd_verdi import verdi -from aiida.cmdline.utils import decorators, echo +from aiida.cmdline.utils import echo from aiida.plugins.entry_point import ENTRY_POINT_GROUP_TO_MODULE_PATH_MAP @@ -25,7 +25,6 @@ def verdi_plugin(): @verdi_plugin.command('list') @click.argument('entry_point_group', type=click.Choice(list(ENTRY_POINT_GROUP_TO_MODULE_PATH_MAP)), required=False) @click.argument('entry_point', type=click.STRING, required=False) -@decorators.with_dbenv() def plugin_list(entry_point_group, entry_point): """Display a list of all available plugins.""" from aiida.cmdline.utils.common import print_process_info From 0494ef26c6b1d7f539669d08a45e0417de21473b Mon Sep 17 00:00:00 2001 From: Sebastiaan Huber Date: Sun, 3 Sep 2023 16:02:15 +0200 Subject: [PATCH 2/2] CLI: Add missing entry point groups for `verdi plugin list` The following groups were not part of the entry point group mapping: * `aiida.calculations.monitors` * `aiida.calculations.importers` This made that they were not available as subcommands to `verdi plugin list`. --- aiida/plugins/entry_point.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aiida/plugins/entry_point.py b/aiida/plugins/entry_point.py index 5e1c30521c..2c9eb67c0f 100644 --- a/aiida/plugins/entry_point.py +++ b/aiida/plugins/entry_point.py @@ -59,20 +59,22 @@ class EntryPointFormat(enum.Enum): ENTRY_POINT_GROUP_TO_MODULE_PATH_MAP = { 'aiida.calculations': 'aiida.orm.nodes.process.calculation.calcjob', + 'aiida.calculations.importers': 'aiida.calculations.importers', + 'aiida.calculations.monitors': 'aiida.calculations.monitors', + 'aiida.cmdline.computer.configure': 'aiida.cmdline.computer.configure', 'aiida.cmdline.data': 'aiida.cmdline.data', 'aiida.cmdline.data.structure.import': 'aiida.cmdline.data.structure.import', - 'aiida.cmdline.computer.configure': 'aiida.cmdline.computer.configure', 'aiida.data': 'aiida.orm.nodes.data', 'aiida.groups': 'aiida.orm.groups', 'aiida.node': 'aiida.orm.nodes', 'aiida.parsers': 'aiida.parsers.plugins', 'aiida.schedulers': 'aiida.schedulers.plugins', 'aiida.storage': 'aiida.storage', + 'aiida.transports': 'aiida.transports.plugins', 'aiida.tools.calculations': 'aiida.tools.calculations', 'aiida.tools.data.orbitals': 'aiida.tools.data.orbitals', 'aiida.tools.dbexporters': 'aiida.tools.dbexporters', 'aiida.tools.dbimporters': 'aiida.tools.dbimporters.plugins', - 'aiida.transports': 'aiida.transports.plugins', 'aiida.workflows': 'aiida.workflows', }