Skip to content

Commit 939895c

Browse files
committed
Merge branch 'master' of github.com:materialsproject/pymatgen
2 parents 4c79587 + e714e2b commit 939895c

File tree

8 files changed

+33
-163
lines changed

8 files changed

+33
-163
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Run the complete test suite incl. many external command line dependencies (like Openbabel)
2-
32
# as well as the pymatgen.ext package. Coverage used to be computed based on this workflow.
43
name: test
54

@@ -77,27 +76,6 @@ jobs:
7776
- name: Install uv
7877
uses: astral-sh/setup-uv@v4
7978

80-
- name: Install ZEO++ (Linux and macOS)
81-
if: matrix.config.os == 'ubuntu-latest' || matrix.config.os == 'macos-latest'
82-
run: |
83-
# Download and extract ZEO++
84-
wget -q http://www.zeoplusplus.org/zeo++-0.3.tar.gz
85-
tar -xzf zeo++-0.3.tar.gz
86-
87-
# Compile Voro++ library first
88-
cd zeo++-0.3/voro++/src
89-
make
90-
91-
# Add Voro++ to PATH
92-
echo "$(pwd)" >> $GITHUB_PATH
93-
94-
# Compile ZEO++
95-
cd ../../
96-
make
97-
98-
# Add ZEO++ to PATH
99-
echo "$(pwd)" >> $GITHUB_PATH
100-
10179
- name: Install pymatgen and dependencies via uv
10280
run: |
10381
micromamba activate pmg
@@ -115,19 +93,23 @@ jobs:
11593
pip install --upgrade matgl>=1.2.6
11694
pip install torch==2.2.0 torchdata==0.7.1
11795
118-
- name: Install optional Ubuntu dependencies
119-
if: matrix.config.os == 'ubuntu-latest'
96+
- name: Install optional Ubuntu and macOS dependencies
97+
if: matrix.config.os == 'ubuntu-latest' || matrix.config.os == 'macos-latest'
12098
run: |
12199
# Install BoltzTraP
122100
wget -q -O BoltzTraP.tar.bz2 https://owncloud.tuwien.ac.at/index.php/s/s2d55LYlZnioa3s/download
123-
tar -jxf BoltzTraP.tar.bz2
124-
echo "$(realpath boltztrap-1.2.5/src/)" >> $GITHUB_PATH
101+
tar -jxf BoltzTraP.tar.bz2 && realpath boltztrap-1.2.5/src/ >> $GITHUB_PATH
125102
126103
# Install Vampire 5.0
127104
wget -q https://vampire.york.ac.uk/resources/release-5/vampire-5.0-linux.tar.gz
128-
tar -zxf vampire-5.0-linux.tar.gz
129-
mv linux vampire-5.0
130-
echo "$(realpath vampire-5.0/)" >> $GITHUB_PATH
105+
tar -zxf vampire-5.0-linux.tar.gz && mv linux vampire-5.0
106+
realpath vampire-5.0/ >> $GITHUB_PATH
107+
108+
# Install Voro++ and ZEO++
109+
wget -q http://www.zeoplusplus.org/zeo++-0.3.tar.gz && tar -xzf zeo++-0.3.tar.gz
110+
111+
cd zeo++-0.3/voro++/src && make -s CFLAGS="-w" && realpath . >> $GITHUB_PATH && cd ../..
112+
make -s CFLAGS="-w" && realpath . >> $GITHUB_PATH
131113
132114
- name: pytest split ${{ matrix.split }}
133115
env:
@@ -136,11 +118,6 @@ jobs:
136118
PMG_TEST_FILES_DIR: "${{ github.workspace }}/tests/files"
137119
run: |
138120
micromamba activate pmg
139-
# Print environment info and if ZEO++ is available
140-
if [ "${{ matrix.config.os }}" == "ubuntu-latest" ] || [ "${{ matrix.config.os }}" == "macos-latest" ]; then
141-
which network || echo "ZEO++ not found in PATH"
142-
python -c "try: import zeo; print('ZEO++ Python module found'); except ImportError: print('ZEO++ Python module not found')"
143-
fi
144121
145122
pytest --splits 10 --group ${{ matrix.split }} --durations-path tests/files/.pytest-split-durations tests
146123

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ electronic_structure = ["fdint>=2.0.2"]
9393
mlp = ["matgl>=1.2.5"]
9494
numba = ["numba>=0.55"]
9595
numpy-v1 = ["numpy>=1.25.0,<2"] # Test NP1 on Windows (quite buggy ATM)
96-
zeopp = ["pyzeo"] # Note: requires voro++ and zeo++ to be installed as binaries
96+
zeopp = ["pyzeo"] # Note: requires voro++ and zeo++ to be installed
9797
optional = [
9898
"pymatgen[abinit,ase,mlp,tblite]",
9999
"beautifulsoup4",
100-
# BoltzTraP2 build fails on Windows GitHub runners
101-
"BoltzTraP2>=24.9.4 ; platform_system != 'Windows'",
100+
# PR4347: BoltzTraP2 needs to bump cmake version for spglib build
101+
# "BoltzTraP2>=24.9.4",
102102
"chemview>=0.6",
103103
"f90nml>=1.1.2",
104104
"galore>=0.6.1",

src/pymatgen/analysis/gb/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/pymatgen/analysis/gb/grain.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/pymatgen/core/lattice.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from collections import defaultdict
1212
from fractions import Fraction
1313
from functools import reduce
14-
from typing import TYPE_CHECKING, cast
14+
from typing import TYPE_CHECKING
1515

1616
import numpy as np
1717
from monty.dev import deprecated
@@ -183,7 +183,7 @@ def pbc(self, pbc: PbcLike) -> None:
183183
if len(pbc) != 3 or any(item not in {True, False} for item in pbc):
184184
raise ValueError(f"pbc must be a tuple of three True/False values, got {pbc}")
185185

186-
self._pbc = cast("tuple[bool, bool, bool]", tuple(pbc))
186+
self._pbc = tuple(bool(item) for item in pbc)
187187

188188
@property
189189
def is_3d_periodic(self) -> bool:

0 commit comments

Comments
 (0)