diff --git a/pyproject.toml b/pyproject.toml index 490b66d..6f5b805 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ classifiers = [ 'Topic :: Scientific/Engineering' ] dependencies = [ - 'aiida-core~=2.5', + 'aiida-core~=2.6', 'dill' ] dynamic = ['description', 'version'] diff --git a/src/aiida_shell/data/code.py b/src/aiida_shell/data/code.py index f264e18..780d935 100644 --- a/src/aiida_shell/data/code.py +++ b/src/aiida_shell/data/code.py @@ -16,6 +16,11 @@ class ShellCode(InstalledCode): calculation job as well. """ + class Model(InstalledCode.Model): + """Model describing required information to create an instance.""" + + default_calc_job_plugin: t.Optional[str] = 'core.shell' + def __init__(self, *args: t.Any, default_calc_job_plugin: str = 'core.shell', **kwargs: t.Any) -> None: """Construct a new instance.""" self.validate_default_calc_job_plugin(default_calc_job_plugin) @@ -31,10 +36,3 @@ def validate_default_calc_job_plugin(default_calc_job_plugin: str) -> None: """ if default_calc_job_plugin != 'core.shell': raise ValueError(f'`default_calc_job_plugin` has to be `core.shell`, but got: {default_calc_job_plugin}') - - @classmethod - def _get_cli_options(cls) -> dict[str, t.Any]: - """Return the CLI options that would allow to create an instance of this class.""" - options = super()._get_cli_options() - options['default_calc_job_plugin']['default'] = 'core.shell' - return options diff --git a/src/aiida_shell/launch.py b/src/aiida_shell/launch.py index f91155f..4b7810f 100644 --- a/src/aiida_shell/launch.py +++ b/src/aiida_shell/launch.py @@ -83,7 +83,7 @@ def launch_shell_job( # noqa: PLR0913 if submit: current_process = Process.current() if current_process is not None and isinstance(current_process, WorkChain): - return {}, current_process.submit(ShellJob, **inputs) + return {}, current_process.submit(ShellJob, inputs) return {}, launch.submit(ShellJob, inputs) results, node = launch.run_get_node(ShellJob, inputs)