diff --git a/aiida_test_cache/mock_code/_fixtures.py b/aiida_test_cache/mock_code/_fixtures.py index bd81a33..f74aecb 100644 --- a/aiida_test_cache/mock_code/_fixtures.py +++ b/aiida_test_cache/mock_code/_fixtures.py @@ -11,9 +11,7 @@ import click import pytest -from aiida import __version__ as aiida_version from aiida.orm import Code -from pkg_resources import parse_version from .._config import CONFIG_FILE_NAME, Config, ConfigActions from ._env_keys import MockVariables @@ -251,19 +249,10 @@ def _get_mock_code( # Monkeypatch MPI behavior of code class, if requested either directly via `--mock-disable-mpi` or # indirectly via `--mock-fail-on-missing` (no need to use MPI in this case) if _disable_mpi or _fail_on_missing: - is_mpi_disable_supported = parse_version(aiida_version) >= parse_version('2.1.0') - - if not is_mpi_disable_supported: - if _disable_mpi: - raise ValueError( - "Upgrade to AiiDA >= 2.1.0 in order to use `--mock-disable-mpi`" - ) - # if only _fail_on_missing, we silently do not disable MPI - else: - monkeypatch.setattr( - code.__class__, 'get_prepend_cmdline_params', - _forget_mpi_decorator(code.__class__.get_prepend_cmdline_params) - ) + monkeypatch.setattr( + code.__class__, 'get_prepend_cmdline_params', + _forget_mpi_decorator(code.__class__.get_prepend_cmdline_params) + ) return code diff --git a/pyproject.toml b/pyproject.toml index 8fdbbca..e0d08e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,12 +40,10 @@ keywords = [ ] urls = {Homepage = "https://aiida-testing.readthedocs.io/"} requires-python = ">=3.9" -# Note the dependency on setuptools due to pkg_resources dependencies = [ - "aiida-core>=2.0,<2.6", + "aiida-core>=2.1,<2.6", "pytest>=7.0", "voluptuous~=0.12", - "setuptools", ] [project.optional-dependencies] @@ -60,7 +58,6 @@ tests = [ pre_commit = [ "pre-commit", "mypy==1.13", - "types-setuptools==65.7.0.3", "types-PyYAML", ] dev = [ diff --git a/tests/mock_code/test_diff.py b/tests/mock_code/test_diff.py index 4e256df..397cef5 100644 --- a/tests/mock_code/test_diff.py +++ b/tests/mock_code/test_diff.py @@ -9,10 +9,8 @@ from pathlib import Path import pytest -from aiida import __version__ as aiida_version from aiida.engine import run_get_node from aiida.plugins import CalculationFactory -from pkg_resources import parse_version CALC_ENTRY_POINT = 'diff' @@ -211,9 +209,6 @@ def test_regenerate_test_data_executable(mock_code_factory, generate_diff_inputs assert (datadir / 'file1.txt').is_file() -@pytest.mark.skipif( - parse_version(aiida_version) < parse_version('2.1.0'), reason='requires AiiDA v2.1.0+' -) def test_disable_mpi(mock_code_factory, generate_diff_inputs): """ Check that disabling MPI is respected.