diff --git a/.github/workflows/unittest.yaml b/.github/workflows/unittest.yaml index 857bf894..66db384c 100644 --- a/.github/workflows/unittest.yaml +++ b/.github/workflows/unittest.yaml @@ -7,12 +7,17 @@ on: jobs: pytest-container: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.8','3.9','3.10','3.11','3.12'] steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - name: checkout + uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: ${{ matrix.python-version }} cache: "pip" - name: Install requirements diff --git a/mace/calculators/mace.py b/mace/calculators/mace.py index dcd2b8e5..0b801baf 100644 --- a/mace/calculators/mace.py +++ b/mace/calculators/mace.py @@ -8,7 +8,7 @@ import logging from glob import glob from pathlib import Path -from typing import Union +from typing import List, Union import numpy as np import torch @@ -51,7 +51,7 @@ class MACECalculator(Calculator): def __init__( self, model_paths: Union[list, str, None] = None, - models: Union[list[torch.nn.Module], torch.nn.Module, None] = None, + models: Union[List[torch.nn.Module], torch.nn.Module, None] = None, device: str = "cpu", energy_units_to_eV: float = 1.0, length_units_to_A: float = 1.0,