Skip to content

Commit d548f41

Browse files
authored
feat: benefit from mlip v0.1.4 release & add tox (#70)
* feat: allow for newer versions of numpy/jax * ci: add tox in CI * ci: fix tox * ci: make sure git is available for our tox runs * ci: update tox.ini * ci: update tox.ini * ci: g++ install, too for py313 tox * ci: only run tox on main and develop branches
1 parent 0ea8aa9 commit d548f41

File tree

5 files changed

+103
-7
lines changed

5 files changed

+103
-7
lines changed

.github/workflows/tox_tests.yaml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Tox 🧪
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
7+
jobs:
8+
tox_py310:
9+
runs-on: instadeep-ci-4
10+
container:
11+
image: python:3.10-slim-bullseye
12+
13+
steps:
14+
- name: Git setup
15+
run: |
16+
apt-get update && apt-get install -y coreutils git
17+
18+
- name: Checkout code 📦
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: '0'
22+
23+
- name: Run tests with tox 🧪
24+
run: |
25+
pip install tox==4.30.3
26+
tox -e py310
27+
28+
tox_py311:
29+
runs-on: instadeep-ci-4
30+
container:
31+
image: python:3.11-slim-bullseye
32+
33+
steps:
34+
- name: Git setup
35+
run: |
36+
apt-get update && apt-get install -y coreutils git
37+
38+
- name: Checkout code 📦
39+
uses: actions/checkout@v4
40+
with:
41+
fetch-depth: '0'
42+
43+
- name: Run tests with tox 🧪
44+
run: |
45+
pip install tox==4.30.3
46+
tox -e py311
47+
48+
tox_py312:
49+
runs-on: instadeep-ci-4
50+
container:
51+
image: python:3.12-slim-bullseye
52+
53+
steps:
54+
- name: Git setup
55+
run: |
56+
apt-get update && apt-get install -y coreutils git
57+
58+
- name: Checkout code 📦
59+
uses: actions/checkout@v4
60+
with:
61+
fetch-depth: '0'
62+
63+
- name: Run tests with tox 🧪
64+
run: |
65+
pip install tox==4.30.3
66+
tox -e py312
67+
68+
tox_py313:
69+
runs-on: instadeep-ci-4
70+
container:
71+
image: python:3.13-slim-bullseye
72+
73+
steps:
74+
- name: Git and compiler setup
75+
run: |
76+
apt-get update && apt-get install -y coreutils git gcc g++
77+
78+
- name: Checkout code 📦
79+
uses: actions/checkout@v4
80+
with:
81+
fetch-depth: '0'
82+
83+
- name: Run tests with tox 🧪
84+
run: |
85+
pip install tox==4.30.3
86+
tox -e py313

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ directly from the GitHub repository.
3434
Therefore, we recommend running
3535

3636
```bash
37-
pip install -U "jax[cuda12]==0.4.33" git+https://github.com/jax-md/jax-md.git
37+
pip install -U "jax[cuda12]" git+https://github.com/jax-md/jax-md.git
3838
```
3939

4040
to install both of these additional packages.

docs/source/installation/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ At time of release, the following install command is supported:
2222

2323
.. code-block:: bash
2424
25-
pip install -U "jax[cuda12]==0.4.33"
25+
pip install -U "jax[cuda12]"
2626
2727
Also, some benchmarks require `JAX-MD <https://github.com/jax-md/jax-md>`_ as a
2828
dependency. As the newest

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "mlipaudit"
33
version = "0.1.0"
4-
description = "Add your description here"
4+
description = "Library and CLI tool for benchmarking ML Interatomic Potentials"
55
readme = "README.md"
66
authors = [
77
{ name = "InstaDeep", email = "[email protected]" }
@@ -10,12 +10,12 @@ requires-python = ">=3.10"
1010
dependencies = [
1111
"huggingface-hub>=0.33.4",
1212
"mdtraj>=1.10.3",
13-
"mlip>=0.1.2",
13+
"mlip>=0.1.4",
1414
"scikit-learn>=1.7.0",
1515
"streamlit>=1.46.1",
1616
"vl-convert-python>=1.8.0",
1717
"mdtraj>=1.10.3",
18-
"tmtools==0.2.0",
18+
"tmtools>=0.2.0",
1919
]
2020

2121
[project.scripts]
@@ -40,8 +40,8 @@ scripts = [
4040
"requests>=2.32.4",
4141
]
4242
gpu = [
43-
"jax[cuda12]==0.4.33",
44-
"jaxlib==0.4.33"
43+
"jax[cuda12]>=0.4.33",
44+
"jaxlib>=0.4.33"
4545
]
4646
jax_md = [
4747
"jax-md",

tox.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[tox]
2+
isolated_build = True
3+
env_list = py{310,311,312,313}
4+
5+
[testenv]
6+
deps =
7+
pytest>=8.4.1
8+
pytest-mock>=3.14.1
9+
git+https://github.com/jax-md/jax-md.git
10+
commands = pytest {posargs}

0 commit comments

Comments
 (0)