Skip to content

Commit

Permalink
test against various python versiosn
Browse files Browse the repository at this point in the history
  • Loading branch information
alinelena committed Nov 14, 2024
1 parent bd41231 commit 72a8b6d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/unittest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions mace/calculators/mace.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 72a8b6d

Please sign in to comment.