Skip to content

Commit

Permalink
Dependencies: Update requirement aiida-core~=2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sphuber committed Apr 7, 2024
1 parent 31ebfbc commit 649074e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ classifiers = [
'Topic :: Scientific/Engineering'
]
dependencies = [
'aiida-core~=2.5',
'aiida-core@git+https://github.com/aiidateam/aiida-core@main',
'dill'
]
dynamic = ['description', 'version']
Expand Down
12 changes: 5 additions & 7 deletions src/aiida_shell/data/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
2 changes: 1 addition & 1 deletion src/aiida_shell/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 649074e

Please sign in to comment.