Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies: Update requirement aiida-core~=2.6 #88

Merged
merged 1 commit into from
Jul 1, 2024
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
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~=2.6',
'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
Loading