Skip to content

Commit

Permalink
Dependencies: Update requirement aiida-core~=2.4
Browse files Browse the repository at this point in the history
The signature of the callable `command` for `DynamicEntryPointCommandGroup`
changed to include the `click.Context` as the first positional argument.
  • Loading branch information
sphuber committed Nov 14, 2023
1 parent 0278aed commit a38946e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ classifiers = [
keywords = ['aiida', 'workflows', 's3']
requires-python = '>=3.9'
dependencies = [
'aiida-core~=2.2,<2.4',
'aiida-core~=2.4',
'azure-storage-blob',
'boto3',
]
Expand Down
8 changes: 7 additions & 1 deletion src/aiida_s3/cli/cmd_profile.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
"""CLI commands to create profiles."""
import typing as t

import click
from aiida.cmdline.groups import DynamicEntryPointCommandGroup

from . import cmd_root

if t.TYPE_CHECKING:
from aiida.orm.implementation.storage_backend import StorageBackend


@cmd_root.group('profile') # type: ignore[has-type]
def cmd_profile():
"""Commands to create profiles."""


def create_profile(cls, non_interactive, **kwargs):
def create_profile(ctx: click.Context, cls: 'StorageBackend', non_interactive: bool, **kwargs):
"""Set up a new profile with an ``aiida-s3`` storage backend."""
import contextlib
import io
Expand Down
2 changes: 1 addition & 1 deletion tests/cli/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_setup(aiida_instance, run_cli_command, monkeypatch, filepath_config):
"""Test the ``aiida-s3 profile setup`` command for all storage backends.
This will just verify that the command accepts the ``--config`` option with a valid YAML file containing the options
for the command and that it creates a new profile. The command normallyn also initialises the storage backend but
for the command and that it creates a new profile. The command normally also initialises the storage backend but
that usually requires credentials which are faked here and so the initialisation would fail. That is why the
:meth:`aiida.orm.implementation.storage_backend.StorageBackend.initialise` method is monkeypatched to be a no-op.
"""
Expand Down

0 comments on commit a38946e

Please sign in to comment.