diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 512f43a..e8c8cc4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,10 +38,17 @@ jobs: #python setup.py install pip install . - name: Install python-ace - run: | + run: | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi #python setup.py install - pip install . + pip install . + - name: Install maxvolpy + run: | + # pip install . does not run the setup.py install hook that installs + # the vendored maxvolpy, so install it explicitly. Its setup.py imports + # Cython and numpy at the top level, hence no build isolation. + pip install cython + pip install --no-build-isolation ./lib/maxvolpy - name: Test with python-ace with tensorpotential run: | python -m pytest tests/ --runtensorpot diff --git a/setup.py b/setup.py index c35dadb..44db3f2 100644 --- a/setup.py +++ b/setup.py @@ -194,7 +194,7 @@ def build_extension(self, ext: CMakeExtension) -> None: url='https://github.com/ICAMS/python-ace', install_requires=['numpy<=1.26.4', 'ase', - 'pandas<=2.0', + 'pandas>=2,<4', 'ruamel.yaml', 'psutil', 'scikit-learn<=1.4.2' diff --git a/tests/test_PyACECalculator.py b/tests/test_PyACECalculator.py index 2f71236..d18c183 100644 --- a/tests/test_PyACECalculator.py +++ b/tests/test_PyACECalculator.py @@ -188,7 +188,11 @@ def test_fcc_stress(): def test_relaxation(): - from ase.constraints import UnitCellFilter + try: + from ase.filters import UnitCellFilter + except ImportError: + # ase < 3.23 + from ase.constraints import UnitCellFilter from ase.optimize import QuasiNewton calc = PyACECalculator(basis_set="tests/Al.pbe.rhocore-v2.ace")