Skip to content

Commit

Permalink
build: clean up environment.yaml and reorganize pyproject.toml (#28)
Browse files Browse the repository at this point in the history
* clean up environment.yaml and reorganize pyproject.toml

* clean up environment.yaml

* add MANIFEST.in and configure the files to copy for building distribution

* update installation instruction in README.md

* update building workflow

* add 5M checkpoint

---------

Co-authored-by: Han Yang <[email protected]>
  • Loading branch information
yanghan234 and yanghan-microsoft authored Dec 2, 2024
1 parent da834e5 commit 548c40f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 18 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ jobs:

- name: Install dependencies
run: |
micromamba run -n mattersim pip install -e .
micromamba run -n mattersim uv pip install -e .
- name: Install test dependencies
run: |
micromamba run -n mattersim pip install -e ".[dev]"
micromamba run -n mattersim uv pip install -e ".[dev]"
- name: Build extension
run: |
micromamba run -n mattersim python setup.py build_ext --inplace
- name: Run tests
run: |
micromamba run -n mattersim pytest -s tests
micromamba run -n mattersim pytest -s tests
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include src/mattersim/pretrained_models/*.pth
include src/mattersim/datasets/utils/*.pyx
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ To install the package, run the following command under the root of the folder:
```bash
mamba env create -f environment.yaml
mamba activate mattersim
pip install -e .
uv pip install -e .
python setup.py build_ext --inplace
```

Expand Down
16 changes: 5 additions & 11 deletions environment.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
name: mattersim
channels:
- pyg
- pytorch
- conda-forge
- nvidia
dependencies:
- python=3.9
- pytorch-sparse
- pytorch-scatter
- pytorch==2.2.0
- torchvision==0.17.0
- torchaudio==2.2.0
- pytorch-cuda=11.8
- ca-certificates
- openssl
- numpy<2
- phonopy==2.14.0
- phono3py==2.3.0
- cython
- loguru
- cython>=0.29.32
- setuptools>=45
- wheel
- pip:
- uv
12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ dependencies = [
"seekpath",
"numpy<2",
"pymatgen",
"torch_geometric==2.5.3",
"loguru",
"torch==2.2.0",
"torchvision==0.17.0",
"torchaudio==2.2.0",
"torch_runstats==0.2.0",
"torch_geometric==2.5.3",
"torchmetrics>=0.10.0",
"torch-ema==0.3",
"opt_einsum_fx",
Expand All @@ -41,8 +44,11 @@ dependencies = [
[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"pytest-testmon",
"pre-commit"
"pre-commit",
"ipython",
"ipykernel"
]


Expand All @@ -55,4 +61,4 @@ package-dir = {"" = "src"}

[tool.setuptools.packages.find]
where = ["src"]
include = ["mattersim", "mattersim.*"]
include = ["mattersim", "mattersim.*"]
Binary file not shown.

0 comments on commit 548c40f

Please sign in to comment.