From 9408918a3c172936e49e423be3b88810db385df3 Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Tue, 14 Jul 2026 09:45:55 +0200 Subject: [PATCH 1/8] =?UTF-8?q?=F0=9F=A7=AA=20Drop=20Python=203.9,=20add?= =?UTF-8?q?=203.14=20in=20CI=20(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Raise the minimum supported Python version to 3.10 and update the project classifiers accordingly. Also extend the CI matrices to cover Python 3.14. --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 2 +- pyproject.toml | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 457aab2..bea93b3 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -52,7 +52,7 @@ jobs: strategy: matrix: - python-version: ['3.9', '3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.14'] services: rabbitmq: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ec676a..74a71fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: strategy: matrix: - python-version: ['3.9', '3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.14'] services: rabbitmq: diff --git a/pyproject.toml b/pyproject.toml index ee780be..bca79a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,10 +13,11 @@ classifiers = [ 'Operating System :: POSIX :: Linux', 'Operating System :: MacOS :: MacOS X', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', 'Topic :: Scientific/Engineering' ] dependencies = [ @@ -28,7 +29,7 @@ keywords = ['aiida', 'workflows'] license = {file = 'LICENSE.txt'} name = 'aiida-shell' readme = 'README.md' -requires-python = '>=3.9' +requires-python = '>=3.10' [project.entry-points.'aiida.calculations'] 'core.shell' = 'aiida_shell.calculations.shell:ShellJob' From e39edc1b8dab7cab1d060e224225ea8b748ed07a Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Fri, 17 Jul 2026 08:59:40 +0200 Subject: [PATCH 2/8] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Update=20pytest=20for?= =?UTF-8?q?=20Python=203.14=20(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump the pytest requirement in the development dependencies so the test environment works with Python 3.14. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bca79a9..444ee20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ requires-python = '>=3.10' dev = [ 'mypy==1.6.1', 'pre-commit', - 'pytest~=6.2', + 'pytest~=8.4', 'pytest-regressions' ] docs = [ From 73604eb5ecaef50ceff7d75c6fbd172c5c4e4f1b Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Fri, 17 Jul 2026 08:39:43 +0200 Subject: [PATCH 3/8] =?UTF-8?q?=F0=9F=A7=AA=20Run=20pre-commit=20on=20Pyth?= =?UTF-8?q?on=203.11=20(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update the pre-commit CI job to use Python 3.11 instead of 3.10. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74a71fc..34bd917 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' cache: pip cache-dependency-path: pyproject.toml From 300af3cb1bc57db991dec993f0525d48d451cb57 Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Mon, 20 Jul 2026 10:38:40 +0200 Subject: [PATCH 4/8] =?UTF-8?q?=F0=9F=A7=AA=20Update=20ruff=20pre-commit?= =?UTF-8?q?=20hook=20(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump the ruff-pre-commit hook to a newer release so the pre-commit environment understands newer Ruff rule selectors used by the project configuration. --- .github/workflows/validate_release_tag.py | 1 + .pre-commit-config.yaml | 2 +- docs/source/conf.py | 1 + docs/source/examples/include/scripts/gromacs.py | 2 ++ docs/source/examples/include/scripts/lammps.py | 2 ++ docs/source/examples/include/scripts/qe.py | 2 ++ src/aiida_shell/__init__.py | 5 +++-- src/aiida_shell/calculations/__init__.py | 1 + src/aiida_shell/calculations/shell.py | 1 + src/aiida_shell/data/__init__.py | 1 + src/aiida_shell/data/code.py | 1 + src/aiida_shell/data/entry_point.py | 1 + src/aiida_shell/data/pickled.py | 1 + src/aiida_shell/launch.py | 1 + src/aiida_shell/parsers/__init__.py | 1 + src/aiida_shell/parsers/shell.py | 1 + tests/calculations/test_shell.py | 2 ++ tests/conftest.py | 2 ++ tests/data/test_code.py | 2 ++ tests/data/test_entry_point.py | 4 +++- tests/data/test_pickled.py | 2 ++ tests/parsers/test_shell.py | 2 ++ tests/test_launch.py | 2 ++ tests/test_version.py | 4 +++- 24 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validate_release_tag.py b/.github/workflows/validate_release_tag.py index 21bdc51..7843a8f 100644 --- a/.github/workflows/validate_release_tag.py +++ b/.github/workflows/validate_release_tag.py @@ -1,4 +1,5 @@ """Validate that the version in the tag label matches the version of the package.""" + import argparse import ast from pathlib import Path diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8fd0462..b1b1704 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: flynt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.3 + rev: v0.8.6 hooks: - id: ruff-format - id: ruff diff --git a/docs/source/conf.py b/docs/source/conf.py index ca87772..1ef7bed 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -3,6 +3,7 @@ This file only contains a selection of the most common options. For a full list see the documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html """ + import aiida_shell project = 'aiida-shell' diff --git a/docs/source/examples/include/scripts/gromacs.py b/docs/source/examples/include/scripts/gromacs.py index 9299ecc..0d821c0 100755 --- a/docs/source/examples/include/scripts/gromacs.py +++ b/docs/source/examples/include/scripts/gromacs.py @@ -1,8 +1,10 @@ #!/usr/bin/env runaiida """Simulation of lysozyme protein dynamics using GROMACS.""" + import urllib.request from aiida import engine, orm + from aiida_shell import launch_shell_job # Download the lysozyme protein structure. diff --git a/docs/source/examples/include/scripts/lammps.py b/docs/source/examples/include/scripts/lammps.py index 75d7bf5..915655f 100755 --- a/docs/source/examples/include/scripts/lammps.py +++ b/docs/source/examples/include/scripts/lammps.py @@ -1,6 +1,8 @@ #!/usr/bin/env runaiida """Simulation of Lennard-Jones fluid using LAMMPS.""" + from aiida import orm + from aiida_shell import launch_shell_job script = """ diff --git a/docs/source/examples/include/scripts/qe.py b/docs/source/examples/include/scripts/qe.py index 9a5bf18..31c84cf 100755 --- a/docs/source/examples/include/scripts/qe.py +++ b/docs/source/examples/include/scripts/qe.py @@ -1,8 +1,10 @@ #!/usr/bin/env runaiida """Simulation of electronic band structure of GaAs using Quantum ESPRESSO.""" + import urllib.request from aiida import engine, orm + from aiida_shell import launch_shell_job # Generate a folder with the required pseudopotentials diff --git a/src/aiida_shell/__init__.py b/src/aiida_shell/__init__.py index 8f54f2e..bfc8211 100644 --- a/src/aiida_shell/__init__.py +++ b/src/aiida_shell/__init__.py @@ -1,4 +1,5 @@ """AiiDA plugin that makes running shell commands easy.""" + __version__ = '0.8.2' from .calculations import ShellJob @@ -7,10 +8,10 @@ from .parsers import ShellParser __all__ = ( - 'ShellJob', 'EntryPointData', 'PickledData', 'ShellCode', - 'launch_shell_job', + 'ShellJob', 'ShellParser', + 'launch_shell_job', ) diff --git a/src/aiida_shell/calculations/__init__.py b/src/aiida_shell/calculations/__init__.py index b0d1008..cad805d 100644 --- a/src/aiida_shell/calculations/__init__.py +++ b/src/aiida_shell/calculations/__init__.py @@ -1,4 +1,5 @@ """Module for :mod:`aiida_shell.calculations`.""" + from .shell import ShellJob __all__ = ('ShellJob',) diff --git a/src/aiida_shell/calculations/shell.py b/src/aiida_shell/calculations/shell.py index da62e7d..bbf76e3 100644 --- a/src/aiida_shell/calculations/shell.py +++ b/src/aiida_shell/calculations/shell.py @@ -1,4 +1,5 @@ """Implementation of :class:`aiida.engine.CalcJob` to make it easy to run an arbitrary shell command on a computer.""" + from __future__ import annotations import inspect diff --git a/src/aiida_shell/data/__init__.py b/src/aiida_shell/data/__init__.py index c1d345d..a853e6d 100644 --- a/src/aiida_shell/data/__init__.py +++ b/src/aiida_shell/data/__init__.py @@ -1,4 +1,5 @@ """Module for :mod:`aiida_shell.data`.""" + from .code import ShellCode from .entry_point import EntryPointData from .pickled import PickledData diff --git a/src/aiida_shell/data/code.py b/src/aiida_shell/data/code.py index 31cfa2c..85cd563 100644 --- a/src/aiida_shell/data/code.py +++ b/src/aiida_shell/data/code.py @@ -1,4 +1,5 @@ """Code that represents a shell command.""" + from __future__ import annotations import typing as t diff --git a/src/aiida_shell/data/entry_point.py b/src/aiida_shell/data/entry_point.py index 64d1096..973e731 100644 --- a/src/aiida_shell/data/entry_point.py +++ b/src/aiida_shell/data/entry_point.py @@ -1,4 +1,5 @@ """Data plugin to store a reference to an entry point.""" + from __future__ import annotations import typing as t diff --git a/src/aiida_shell/data/pickled.py b/src/aiida_shell/data/pickled.py index f03262b..d98ee1b 100644 --- a/src/aiida_shell/data/pickled.py +++ b/src/aiida_shell/data/pickled.py @@ -1,4 +1,5 @@ """Data plugin to store (almost) any Python object by pickling it.""" + from __future__ import annotations import importlib.metadata diff --git a/src/aiida_shell/launch.py b/src/aiida_shell/launch.py index 7fe811e..f59212b 100644 --- a/src/aiida_shell/launch.py +++ b/src/aiida_shell/launch.py @@ -1,4 +1,5 @@ """Convenience wrapper function to simplify the interface to launch a :class:`aiida_shell.ShellJob` job.""" + from __future__ import annotations import logging diff --git a/src/aiida_shell/parsers/__init__.py b/src/aiida_shell/parsers/__init__.py index 12c7bd2..7176c75 100644 --- a/src/aiida_shell/parsers/__init__.py +++ b/src/aiida_shell/parsers/__init__.py @@ -1,4 +1,5 @@ """Module for :mod:`aiida_shell.parsers`.""" + from .shell import ShellParser __all__ = ('ShellParser',) diff --git a/src/aiida_shell/parsers/shell.py b/src/aiida_shell/parsers/shell.py index fef695e..aadea1f 100644 --- a/src/aiida_shell/parsers/shell.py +++ b/src/aiida_shell/parsers/shell.py @@ -7,6 +7,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Parser for a :class:`aiida_shell.ShellJob` job.""" + from __future__ import annotations import pathlib diff --git a/tests/calculations/test_shell.py b/tests/calculations/test_shell.py index 96318c5..5185f46 100644 --- a/tests/calculations/test_shell.py +++ b/tests/calculations/test_shell.py @@ -1,4 +1,5 @@ """Tests for the :mod:`aiida_shell.calculations.shell` module.""" + import pathlib import shlex @@ -6,6 +7,7 @@ from aiida.common.datastructures import CodeInfo from aiida.engine import run_get_node from aiida.orm import Data, Float, FolderData, Int, List, RemoteData, SinglefileData, Str + from aiida_shell.calculations.shell import ShellJob from aiida_shell.data import EntryPointData, PickledData diff --git a/tests/conftest.py b/tests/conftest.py index 5dd2df4..d541420 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ """Module with test fixtures.""" + from __future__ import annotations import collections @@ -18,6 +19,7 @@ from aiida.manage.manager import get_manager from aiida.orm import CalcJobNode, Computer, FolderData from aiida.plugins import CalculationFactory, ParserFactory + from aiida_shell import ShellCode pytest_plugins = 'aiida.tools.pytest_fixtures' diff --git a/tests/data/test_code.py b/tests/data/test_code.py index f0aeab9..b174f40 100644 --- a/tests/data/test_code.py +++ b/tests/data/test_code.py @@ -1,5 +1,7 @@ """Tests for :mod:`aiida_shell.data.code`.""" + import pytest + from aiida_shell.data.code import ShellCode diff --git a/tests/data/test_entry_point.py b/tests/data/test_entry_point.py index 9a85186..c1ea5f0 100644 --- a/tests/data/test_entry_point.py +++ b/tests/data/test_entry_point.py @@ -1,10 +1,12 @@ """Tests for the :mod:`aiida_shell.data.entry_point` module.""" + import pytest from aiida.orm import load_node from aiida.plugins.entry_point import get_entry_point -from aiida_shell.data.entry_point import EntryPointData from importlib_metadata import EntryPoint +from aiida_shell.data.entry_point import EntryPointData + InvalidEntryPoint = EntryPoint('b', 'a', group='c') InconsistentEntryPoint = EntryPoint('b', 'aiida_shell.data.pickled:PickledData', group='c') DifferentEntryPoint = EntryPoint('core.entry_point', 'aiida_shell.data.pickled:PickledData', group='aiida.data') diff --git a/tests/data/test_pickled.py b/tests/data/test_pickled.py index 3df3677..fc77375 100644 --- a/tests/data/test_pickled.py +++ b/tests/data/test_pickled.py @@ -1,7 +1,9 @@ """Tests for the :mod:`aiida_shell.data.pickled` module.""" + import dill import pytest from aiida.orm import Node, load_node + from aiida_shell.data.pickled import PickledData diff --git a/tests/parsers/test_shell.py b/tests/parsers/test_shell.py index 176c6ef..f8c8e01 100644 --- a/tests/parsers/test_shell.py +++ b/tests/parsers/test_shell.py @@ -1,9 +1,11 @@ """Tests for the :mod:`aiida_shell.parsers.shell` module.""" + import copy import pathlib import pytest from aiida.orm import FolderData, List, SinglefileData + from aiida_shell.calculations.shell import ShellJob diff --git a/tests/test_launch.py b/tests/test_launch.py index bad05ed..fda8ba1 100644 --- a/tests/test_launch.py +++ b/tests/test_launch.py @@ -1,4 +1,5 @@ """Tests for the :mod:`aiida_shell.launch` module.""" + import datetime import json import pathlib @@ -7,6 +8,7 @@ import pytest from aiida.engine import WorkChain, run_get_node, workfunction from aiida.orm import AbstractCode, Computer, Float, Int, RemoteData, SinglefileData, Str + from aiida_shell.calculations.shell import ShellJob from aiida_shell.launch import launch_shell_job, prepare_computer diff --git a/tests/test_version.py b/tests/test_version.py index 8286775..a0446c5 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -1,7 +1,9 @@ """Tests for the :mod:`aiida_shell` module.""" -import aiida_shell + from packaging.version import Version, parse +import aiida_shell + def test_version(): """Test that :attr:`aiida_shell.__version__` is a PEP-440 compatible version identifier.""" From 3c90998cd846f37b7b4b52273d0ce1007dd8f98b Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Mon, 20 Jul 2026 10:49:20 +0200 Subject: [PATCH 5/8] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Update=20mypy=20to=202?= =?UTF-8?q?.3=20(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump the development dependency from mypy 1.6.1 to 2.3. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 444ee20..77e54a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ requires-python = '>=3.10' [project.optional-dependencies] dev = [ - 'mypy==1.6.1', + 'mypy~=2.3.0', 'pre-commit', 'pytest~=8.4', 'pytest-regressions' From b5702de41c8807fbff13aa5770ce681aa61618a5 Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Mon, 20 Jul 2026 11:06:10 +0200 Subject: [PATCH 6/8] =?UTF-8?q?=F0=9F=94=A7=20Apply=20`pyupgrade=20--py310?= =?UTF-8?q?-plus`=20(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/validate_release_tag.py | 4 ++-- tests/conftest.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/validate_release_tag.py b/.github/workflows/validate_release_tag.py index 7843a8f..3180fd0 100644 --- a/.github/workflows/validate_release_tag.py +++ b/.github/workflows/validate_release_tag.py @@ -13,7 +13,7 @@ def get_version_from_module(content: str) -> str: try: module = ast.parse(content) except SyntaxError as exception: - raise IOError('Unable to parse module.') from exception + raise OSError('Unable to parse module.') from exception try: return next( @@ -24,7 +24,7 @@ def get_version_from_module(content: str) -> str: if isinstance(target, ast.Name) and target.id == '__version__' ) except StopIteration as exception: - raise IOError('Unable to find the `__version__` attribute in the module.') from exception + raise OSError('Unable to find the `__version__` attribute in the module.') from exception if __name__ == '__main__': diff --git a/tests/conftest.py b/tests/conftest.py index d541420..1e0b153 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -88,7 +88,7 @@ def factory( manager = get_manager() runner = manager.get_runner() - process_class: t.Type['CalcJob'] = CalculationFactory(entry_point_name) # type: ignore[assignment] + process_class: t.Type[CalcJob] = CalculationFactory(entry_point_name) # type: ignore[assignment] process: CalcJob = instantiate_process(runner, process_class, **inputs or {}) # type: ignore[assignment] if presubmit: From 4b21dde692e11716f9777c45bc855e34fcd4a4e0 Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Fri, 17 Jul 2026 09:26:44 +0200 Subject: [PATCH 7/8] =?UTF-8?q?=F0=9F=A7=AA=20Match=20remote-data=20tests?= =?UTF-8?q?=20to=20localhost=20(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Create the code on the same localhost computer fixture that is used by the RemoteData inputs so the expected computer UUIDs match in the generated CalcInfo. --- tests/calculations/test_shell.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/calculations/test_shell.py b/tests/calculations/test_shell.py index 5185f46..97ce6db 100644 --- a/tests/calculations/test_shell.py +++ b/tests/calculations/test_shell.py @@ -92,7 +92,7 @@ def test_nodes_folder_data(generate_calc_job, generate_code, tmp_path): def test_nodes_remote_data(generate_calc_job, generate_code, tmp_path, aiida_localhost, use_symlinks): """Test the ``nodes`` input with ``RemoteData`` nodes.""" inputs = { - 'code': generate_code(), + 'code': generate_code(computer_label=aiida_localhost.label), 'arguments': [], 'nodes': { 'remote': RemoteData(remote_path=str(tmp_path.absolute()), computer=aiida_localhost), @@ -121,7 +121,7 @@ def test_nodes_remote_data_filename(generate_calc_job, generate_code, tmp_path, remote_data_b = RemoteData(remote_path=str(remote_path_b.absolute()), computer=aiida_localhost) inputs = { - 'code': generate_code(), + 'code': generate_code(computer_label=aiida_localhost.label), 'arguments': ['{remote_a}'], 'nodes': { 'remote_a': remote_data_a, From b0cd908e04a501ddadb4b3c3b838fb67da083356 Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Fri, 17 Jul 2026 09:26:47 +0200 Subject: [PATCH 8/8] =?UTF-8?q?=F0=9F=A7=AA=20Assert=20shell=20warning=20v?= =?UTF-8?q?ia=20node=20logs=20(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the node log records instead of pytest log capture for this assertion. The warning is still emitted, but it no longer reliably appears in captured log records with the recent AiiDA logging changes. --- tests/calculations/test_shell.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/calculations/test_shell.py b/tests/calculations/test_shell.py index 97ce6db..7b91e24 100644 --- a/tests/calculations/test_shell.py +++ b/tests/calculations/test_shell.py @@ -6,7 +6,7 @@ import pytest from aiida.common.datastructures import CodeInfo from aiida.engine import run_get_node -from aiida.orm import Data, Float, FolderData, Int, List, RemoteData, SinglefileData, Str +from aiida.orm import Data, Float, FolderData, Int, List, Log, RemoteData, SinglefileData, Str from aiida_shell.calculations.shell import ShellJob from aiida_shell.data import EntryPointData, PickledData @@ -453,7 +453,7 @@ def parser(dirpath): assert node.outputs.string == value -def test_input_output_filename_overlap(generate_calc_job, generate_code, tmp_path, caplog): +def test_input_output_filename_overlap(generate_calc_job, generate_code, tmp_path): """Test functionality when input and output filenames overlap.""" code = generate_code() @@ -481,18 +481,22 @@ def test_input_output_filename_overlap(generate_calc_job, generate_code, tmp_pat # If the filename clash is due to an "implicit" filename, instead of raising, the filename of the node should be # automatically made unique and a warning logged to make the user aware. - dirpath, calc_info = generate_calc_job( - 'core.shell', - inputs={ + def generate_inputs(): + return { 'code': code, 'nodes': {'file': SinglefileData.from_string('content', filename='stdout')}, - }, - ) + } + + dirpath, calc_info = generate_calc_job('core.shell', inputs=generate_inputs()) + process = generate_calc_job('core.shell', inputs=generate_inputs(), return_process=True) + code_info = calc_info.codes_info[0] filenames = [p.name for p in dirpath.iterdir()] assert code_info.stdout_name not in filenames assert code_info.stderr_name not in filenames - assert 'filename `stdout` for node `file` overlaps' in caplog.records[0].message + + message = 'filename `stdout` for node `file` overlaps' + assert any(message in entry.message for entry in Log.collection.get_logs_for(process.node)) # If the contents of a ``FolderData`` overlap with a reserved filename, an exception is raised. This is done because # not doing everything will most likely fail the calculation as some input files will be overwritten. The plugin can