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
22 changes: 20 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
os: [ubuntu-latest, macos-14]
version:
- { python: '3.12', resolution: highest }
- { python: '3.12', resolution: lowest-direct }
- { python: '3.13', resolution: highest }
- { python: '3.13', resolution: lowest-direct }
runs-on: ${{ matrix.os }}

Expand All @@ -37,7 +39,12 @@ jobs:
- name: Install torch_sim
run: |
uv pip install "torch>2" --index-url https://download.pytorch.org/whl/cpu --system
uv pip install -e ".[test]" --resolution=${{ matrix.version.resolution }} --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

- name: Run core tests
run: |
Expand All @@ -56,6 +63,8 @@ jobs:
os: [ubuntu-latest, macos-14]
version:
- { python: '3.12', resolution: highest }
- { python: '3.12', resolution: lowest-direct }
- { python: '3.13', resolution: highest }
- { python: '3.13', resolution: lowest-direct }
model:
- { name: fairchem, test_path: "tests/models/test_fairchem.py" }
Expand All @@ -72,8 +81,12 @@ jobs:
exclude:
- version: { python: '3.13', resolution: lowest-direct }
model: { name: orb, test_path: "tests/models/test_orb.py" }
- version: { python: '3.13', 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" }
runs-on: ${{ matrix.os }}

steps:
Expand Down Expand Up @@ -116,7 +129,12 @@ jobs:
- name: Install torch_sim with model dependencies
if: ${{ matrix.model.name != 'fairchem-legacy' }}
run: |
uv pip install -e ".[test,${{ matrix.model.name }}]" --resolution=${{ matrix.version.resolution }} --system
# 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" --resolution=${{ matrix.version.resolution }} --system
else
uv pip install -e ".[test,${{ matrix.model.name }}]" --resolution=${{ matrix.version.resolution }} --system
fi

- name: Run ${{ matrix.model.test_path }} tests
if: ${{ !contains(matrix.model.name, 'fairchem') || github.event.pull_request.head.repo.fork == false }}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers = [
requires-python = ">=3.12"
dependencies = [
"h5py>=3.12.1",
"numpy>=2",
"numpy>=1.26,<3",
"tables>=3.10.2",
"torch>=2",
"tqdm>=4.67",
Expand Down