Skip to content
Closed
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 .github/actions/install-aiida-core/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Install aiida-core package and its Python dependencies
inputs:
python-version:
description: Python version
default: '3.9' # Lowest supported version
default: '3.10' # Lowest supported version
required: false
extras:
description: list of optional dependencies
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.13']
python-version: ['3.10', '3.14']
database-backend: [psql]

services:
Expand Down Expand Up @@ -72,14 +72,14 @@ jobs:
AIIDA_TEST_PROFILE: test_aiida
AIIDA_WARN_v3: 1
run: |
pytest -n auto --db-backend ${{ matrix.database-backend }} -m 'not nightly' tests/ ${{ matrix.python-version == '3.13' && '--cov aiida' || '' }}
pytest -n auto --db-backend ${{ matrix.database-backend }} -m 'not nightly' tests/ ${{ matrix.python-version == '3.14' && '--cov aiida' || '' }}

- name: Upload coverage report
if: matrix.python-version == 3.13 && github.repository == 'aiidateam/aiida-core'
if: matrix.python-version == 3.14 && github.repository == 'aiidateam/aiida-core'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: aiida-pytests-py3.13
name: aiida-pytests-py3.14
files: ./coverage.xml
fail_ci_if_error: false # don't fail job, if coverage upload fails

Expand All @@ -90,7 +90,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.9']
python-version: ['3.10']
database-backend: [sqlite]

services:
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
- name: Install aiida-core
uses: ./.github/actions/install-aiida-core
with:
python-version: '3.13'
python-version: '3.14'

- name: Setup SSH on localhost
run: .github/workflows/setup_ssh.sh
Expand All @@ -159,7 +159,7 @@ jobs:
- name: Install aiida-core
uses: ./.github/actions/install-aiida-core
with:
python-version: '3.13'
python-version: '3.14'
from-lock: 'true'
extras: ''

Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
- name: Install aiida-core
uses: ./.github/actions/install-aiida-core
with:
python-version: '3.9'
python-version: '3.10'
from-lock: 'true'
extras: tests

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install aiida-core and docs deps
uses: ./.github/actions/install-aiida-core
with:
python-version: '3.9'
python-version: '3.10'
extras: docs,tests,rest,atomic_tools
from-lock: 'false'

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v6

- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.10'

- name: Check tag
run: python .github/workflows/check_release_tag.py $GITHUB_REF
Expand Down Expand Up @@ -95,10 +95,10 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v6
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.10'
- name: Install flit
run: pip install flit~=3.4
- name: Build
Expand All @@ -123,10 +123,10 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v6
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.10'
- name: Install flit
run: pip install flit~=3.4
- name: Build
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.10'

- name: Pip install
id: pip_install
Expand All @@ -111,7 +111,7 @@ jobs:
fail-fast: false
matrix:

python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']

# Not being able to install with conda on a specific Python version is
# not sufficient to fail the run, but something we want to be aware of.
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']

services:
postgres:
Expand Down
2 changes: 1 addition & 1 deletion .molecule/default/setup_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
pip:
chdir: '{{ aiida_core_dir }}'
# TODO dynamically change for python version
requirements: requirements/requirements-py-3.9.txt
requirements: requirements/requirements-py-3.10.txt
executable: '{{ venv_bin }}/pip'
extra_args: --cache-dir {{ aiida_pip_cache }}
register: pip_install_deps
Expand Down
5 changes: 2 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ channels:
- conda-forge
- defaults
dependencies:
- python~=3.9
- python~=3.10
- alembic~=1.8
- archive-path~=0.4.2
- asyncssh~=2.19.0
- asyncssh~=2.22.0
- circus~=0.19.0
- click-spinner~=0.1.8
- click<8.3,>=8.1.0
- disk-objectstore~=1.4.0
- docstring_parser
- get-annotations~=0.1
- python-graphviz~=0.19
- plumpy~=0.25.0
- ipython>=7.6
Expand Down
30 changes: 15 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,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'
]
# NOTE: When updating versions of some packages, such as requests or paramiko,
Expand All @@ -31,13 +31,12 @@ classifiers = [
dependencies = [
'alembic~=1.8',
'archive-path~=0.4.2',
"asyncssh~=2.19.0",
"asyncssh~=2.22.0",
'circus~=0.19.0',
'click-spinner~=0.1.8',
'click>=8.1.0,<8.3',
'disk-objectstore~=1.4.0',
'docstring-parser',
'get-annotations~=0.1;python_version<"3.10"',
'graphviz~=0.19',
'plumpy~=0.25.0',
'ipython>=7.6',
Expand Down Expand Up @@ -68,7 +67,7 @@ keywords = ['aiida', 'workflows']
license = {file = 'LICENSE.txt'}
name = 'aiida-core'
readme = 'README.md'
requires-python = '>=3.9'
requires-python = '>=3.10'

[project.entry-points.'aiida.brokers']
'core.rabbitmq' = 'aiida.brokers.rabbitmq.broker:RabbitmqBroker'
Expand Down Expand Up @@ -260,7 +259,7 @@ pre-commit = [
'types-requests~=2.0'
]
rest = [
'flask-cors~=3.0',
'flask-cors~=3.0,>=3.0.8',
'flask-restful~=0.3.10',
'flask~=2.3.3',
'pyparsing~=3.1',
Expand Down Expand Up @@ -378,7 +377,6 @@ module = [
'bs4.*',
'circus.*',
'flask_restful.*',
'get_annotations.*',
'graphviz.*',
'kiwipy.*',
'mayavi.*',
Expand Down Expand Up @@ -487,38 +485,39 @@ extend-generics = ["aiida.orm.entities.Entity", "aiida.orm.entities.Collection"]
legacy_tox_ini = """
[tox]
minversion = 3.18.0
envlist = py39
envlist = py310

[testenv]
usedevelop=True
deps =
py39: -rrequirements/requirements-py-3.9.txt
py310: -rrequirements/requirements-py-3.10.txt
py311: -rrequirements/requirements-py-3.11.txt
py312: -rrequirements/requirements-py-3.12.txt
py313: -rrequirements/requirements-py-3.13.txt
py314: -rrequirements/requirements-py-3.14.txt

[testenv:py{39,310,311,312}-presto]
[testenv:py{310,311,312,313,314}-presto]
passenv =
PYTHONASYNCIODEBUG
setenv =
AIIDA_WARN_v3 =
commands = pytest -m 'presto' {posargs}

[testenv:py{39,310,311,312}]
[testenv:py{310,311,312,313,314}]
passenv =
PYTHONASYNCIODEBUG
setenv =
AIIDA_WARN_v3 =
commands = pytest {posargs}

[testenv:py{39,310,311,312}-verdi]
[testenv:py{310,311,312,313,314}-verdi]
passenv =
AIIDA_TEST_BACKEND
setenv =
AIIDA_PATH = {toxinidir}/.tox/.aiida
commands = verdi {posargs}

[testenv:py{39,310,311,312}-docs-{clean,update}]
[testenv:py{310,311,312,313,314}-docs-{clean,update}]
description =
clean: Build the documentation (remove any existing build)
update: Build the documentation (modify any existing build)
Expand All @@ -531,14 +530,15 @@ commands =
clean: make clean
make debug

[testenv:py{39,310,311,312}-docs-live]
[testenv:py{310,311,312,313,314}-docs-live]
# tip: remove apidocs before using this feature (`cd docs; make clean`)
description = Build the documentation and launch browser (with live updates)
deps =
py39: -rrequirements/requirements-py-3.9.txt
py310: -rrequirements/requirements-py-3.10.txt
py311: -rrequirements/requirements-py-3.11.txt
py312: -rrequirements/requirements-py-3.12.txt
py313: -rrequirements/requirements-py-3.13.txt
py314: -rrequirements/requirements-py-3.14.txt
sphinx-autobuild
setenv =
RUN_APIDOC = False
Expand All @@ -548,7 +548,7 @@ commands =
--port 0 --open-browser \
-n -b {posargs:html} docs/source/ docs/build/{posargs:html}

[testenv:py{39,310,311,312}-pre-commit]
[testenv:py{310,311,312,313,314}-pre-commit]
description = Run the pre-commit checks
extras = pre-commit
commands = pre-commit run {posargs}
Expand Down
4 changes: 2 additions & 2 deletions src/aiida/calculations/importers/arithmetic/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path
from re import match
from tempfile import NamedTemporaryFile
from typing import Dict, Union
from typing import Dict

from aiida.engine import CalcJobImporter
from aiida.orm import Int, Node, RemoteData
Expand All @@ -13,7 +13,7 @@ class ArithmeticAddCalculationImporter(CalcJobImporter):
"""Importer for the :class:`aiida.calculations.arithmetic.add.ArithmeticAddCalculation` plugin."""

@staticmethod
def parse_remote_data(remote_data: RemoteData, **kwargs) -> Dict[str, Union[Node, Dict]]:
def parse_remote_data(remote_data: RemoteData, **kwargs) -> Dict[str, Node | Dict]:
"""Parse the input nodes from the files in the provided ``RemoteData``.

:param remote_data: the remote data node containing the raw input files.
Expand Down
4 changes: 2 additions & 2 deletions src/aiida/calculations/stash.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from __future__ import annotations

import json
from typing import Any, Optional
from typing import Any

from aiida import orm
from aiida.common import AIIDA_LOGGER
Expand All @@ -21,7 +21,7 @@
EXEC_LOGGER = AIIDA_LOGGER.getChild('StashCalculation')


def validate_source_node(source_node: Any, _: Any) -> Optional[str]:
def validate_source_node(source_node: Any, _: Any) -> str | None:
"""Validate the ``source_node`` input.

Checks that the creator of the source_node (i.e., the CalcJob that produced this RemoteData)
Expand Down
2 changes: 1 addition & 1 deletion src/aiida/cmdline/params/options/callable.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CallableDefaultOption(click.Option):
https://github.com/pallets/click/issues/2614
"""

def get_default(self, ctx: click.Context, call: bool = True) -> t.Optional[t.Union[t.Any, t.Callable[[], t.Any]]]:
def get_default(self, ctx: click.Context, call: bool = True) -> t.Any | t.Callable[[], t.Any] | None:
"""Return default unless in tab-completion context."""
if ctx.resilient_parsing:
return None
Expand Down
2 changes: 1 addition & 1 deletion src/aiida/cmdline/params/types/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

URL_TIMEOUT_SECONDS = 10

PathType = t.Union[str, bytes, os.PathLike[str]]
PathType = str | bytes | os.PathLike[str]


def check_timeout_seconds(timeout_seconds: float) -> int:
Expand Down
4 changes: 2 additions & 2 deletions src/aiida/cmdline/params/types/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def shell_complete(
return results

@shim_add_ctx
def get_missing_message(self, param: click.Parameter, ctx: click.Context | None) -> str:
def get_missing_message(self, param: click.Parameter, ctx: click.Context | None) -> str: # type: ignore[override]
return 'Possible arguments are:\n\n' + '\n'.join(self.get_valid_arguments())

def get_entry_point_from_string(self, entry_point_string: str) -> EntryPoint:
Expand Down Expand Up @@ -235,7 +235,7 @@ def validate_entry_point_group(self, group: str) -> None:

def convert( # type: ignore[override]
self, value: t.Any, param: click.Parameter | None, ctx: click.Context | None
) -> t.Union[EntryPoint, t.Any]:
) -> EntryPoint | t.Any:
"""Convert the string value to an entry point instance, if the value can be successfully parsed
into an actual entry point. Will raise click.BadParameter if validation fails.
"""
Expand Down
4 changes: 2 additions & 2 deletions src/aiida/cmdline/utils/echo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import logging
import sys
from collections.abc import Sequence
from typing import Any, Callable, NoReturn, Optional
from typing import Any, Callable, NoReturn

import click

Expand Down Expand Up @@ -71,7 +71,7 @@ def highlight_string(string: str, color: str = 'highlight') -> str:
return click.style(string, fg=COLORS[color])


def echo(message: Any, fg: Optional[str] = None, bold: bool = False, nl: bool = True, err: bool = False) -> None:
def echo(message: Any, fg: str | None = None, bold: bool = False, nl: bool = True, err: bool = False) -> None:
"""Log a message to the cmdline logger.

.. note:: The message will be logged at the ``REPORT`` level but always without the log level prefix.
Expand Down
Loading