Skip to content
Merged
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
60 changes: 15 additions & 45 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
version:
- { python: '3.12', resolution: highest }
- { python: '3.12', resolution: lowest-direct }
- { python: '3.13', resolution: highest }
- { python: '3.13', resolution: lowest-direct }
- { python: '3.14', resolution: highest }
- { python: '3.14', resolution: lowest-direct }
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -39,12 +39,7 @@ jobs:
- name: Install torch_sim
run: |
uv pip install "torch>2" --index-url https://download.pytorch.org/whl/cpu --system
# always use numpy>=2 with Python 3.13
if [ "${{ matrix.version.python }}" = "3.13" ]; then
uv pip install -e ".[test]" "numpy>=2" --resolution=${{ matrix.version.resolution }} --system
else
uv pip install -e ".[test]" --resolution=${{ matrix.version.resolution }} --system
fi
uv pip install -e ".[test]" --resolution=${{ matrix.version.resolution }} --system

- name: Run core tests
run: |
Expand All @@ -63,7 +58,7 @@ jobs:
os: [ubuntu-latest, macos-14]
version:
- { python: '3.12', resolution: lowest-direct }
- { python: '3.13', resolution: highest }
- { python: '3.14', resolution: highest }
model:
- { name: fairchem, test_path: "tests/models/test_fairchem.py" }
- { name: fairchem-legacy, test_path: "tests/models/test_fairchem_legacy.py" }
Expand All @@ -77,34 +72,14 @@ jobs:
- { name: orb, test_path: "tests/models/test_orb.py" }
- { name: sevenn, test_path: "tests/models/test_sevennet.py" }
exclude:
- version: { python: '3.13', resolution: lowest-direct }
model: { name: orb, test_path: 'tests/models/test_orb.py' }
- version: { python: '3.13', resolution: highest }
- version: { python: '3.14', resolution: highest }
model: { name: orb, test_path: 'tests/models/test_orb.py' }
- version: { python: '3.13', resolution: lowest-direct }
model:
{
name: fairchem-legacy,
test_path: 'tests/models/test_fairchem_legacy.py',
}
- version: { python: '3.13', resolution: highest }
model:
{
name: fairchem-legacy,
test_path: 'tests/models/test_fairchem_legacy.py',
}
- version: { python: '3.13', resolution: lowest-direct }
model:
{
name: nequip,
test_path: 'tests/models/test_nequip_framework.py',
}
- version: { python: '3.13', resolution: highest }
model:
{
name: nequip,
test_path: 'tests/models/test_nequip_framework.py',
}
- version: { python: '3.14', resolution: highest }
model: { name: fairchem, test_path: 'tests/models/test_fairchem.py'}
- version: { python: '3.14', resolution: highest }
model: { name: fairchem-legacy, test_path: 'tests/models/test_fairchem_legacy.py'}
- version: { python: '3.14', resolution: highest }
model: { name: nequip, test_path: 'tests/models/test_nequip_framework.py'}
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -124,13 +99,13 @@ jobs:
with:
python-version: ${{ matrix.version.python }}

- name: Set up uv
uses: astral-sh/setup-uv@v6

- name: Install HDF5 on macOS
if: runner.os == 'macOS'
run: brew install hdf5

- name: Set up uv
uses: astral-sh/setup-uv@v6

- name: Install legacy fairchem repository and dependencies
if: ${{ matrix.model.name == 'fairchem-legacy' }}
run: |
Expand All @@ -150,12 +125,7 @@ jobs:
run: |
# setuptools <82 provides pkg_resources needed by mattersim and fairchem (via torchtnt).
# setuptools 82+ removed pkg_resources. Remove pin once those packages migrate.
# always use numpy>=2 with Python 3.13
if [ "${{ matrix.version.python }}" = "3.13" ]; then
uv pip install -e ".[test,${{ matrix.model.name }}]" "numpy>=2" "setuptools>=70,<82" --resolution=${{ matrix.version.resolution }} --system
else
uv pip install -e ".[test,${{ matrix.model.name }}]" "setuptools>=70,<82" --resolution=${{ matrix.version.resolution }} --system
fi
uv pip install -e ".[test,${{ matrix.model.name }}]" "setuptools>=70,<82" --resolution=${{ matrix.version.resolution }} --system

- name: Run ${{ matrix.model.test_path }} tests
if: ${{ !contains(matrix.model.name, 'fairchem') || github.event.pull_request.head.repo.fork == false }}
Expand Down
13 changes: 6 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,18 @@ classifiers = [
]
requires-python = ">=3.12"
dependencies = [
"h5py>=3.12.1",
"numpy>=1.26,<3",
"h5py>=3.15.1",
"numpy>=1.26,<3; python_version < '3.13'",
"numpy>=2.3.2,<3; python_version >= '3.13'",
"nvalchemi-toolkit-ops>=0.2.0",
"tables>=3.10.2,<3.11",
"tables>=3.11.1",
"torch>=2",
"tqdm>=4.67",
]

[project.optional-dependencies]
test = [
"ase>=3.26",
"moyopy>=0.3",
"phonopy>=2.37.0",
"torch-sim-atomistic[io,symmetry]",
"platformdirs>=4.0.0",
"psutil>=7.0.0",
"pymatgen>=2025.6.14",
Expand All @@ -48,7 +47,7 @@ test = [
"spglib>=2.6",
]
io = ["ase>=3.26", "phonopy>=2.37.0", "pymatgen>=2025.6.14"]
symmetry = ["moyopy>=0.3"]
symmetry = ["moyopy>=0.7.8"]
mace = ["mace-torch>=0.3.15"]
mattersim = ["mattersim>=0.1.2"]
metatomic = ["metatomic-torch>=0.1.3", "metatrain[pet]>=2025.12"]
Expand Down
Loading