From d4e2deb6bffab935afd9448568ab144f048a8f51 Mon Sep 17 00:00:00 2001 From: Marvin Poul Date: Tue, 25 Feb 2025 21:41:24 +0000 Subject: [PATCH 1/4] Bump pandas --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c35dadb..5ad1f61 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<=3.0', 'ruamel.yaml', 'psutil', 'scikit-learn<=1.4.2' From 2fe07c0e51c7405f6673e6a6803eff7eceaf599e Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 15 Jul 2026 17:24:07 +0000 Subject: [PATCH 2/4] Widen pandas requirement to >=2,<4 Static review and the test suite show no pandas 3 blockers: no removed APIs, no chained assignment (Copy-on-Write safe), all .map() usage is on Series, and legacy pickled dataframes still load. Verified by running the test suite under pandas 2.0.3 and 3.0.3. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01HuteAomkhXVg2b5vco62Xw --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5ad1f61..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<=3.0', + 'pandas>=2,<4', 'ruamel.yaml', 'psutil', 'scikit-learn<=1.4.2' From 63230d7acaa0870d86bed0dad29ca478b547ac8a Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 15 Jul 2026 17:51:39 +0000 Subject: [PATCH 3/4] Install vendored maxvolpy in CI pip install . does not run the custom setup.py install hook that installs lib/maxvolpy, so test collection failed with ModuleNotFoundError for test_activelearning and test_activeexploration. Install it explicitly after the main package. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01HuteAomkhXVg2b5vco62Xw --- .github/workflows/test.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 From cee0158e7fe023dd2cfc74b0de99aa183a447f79 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 15 Jul 2026 17:59:24 +0000 Subject: [PATCH 4/4] Fix UnitCellFilter import for newer ase UnitCellFilter moved from ase.constraints to ase.filters in ase 3.23; try the new location first and fall back for older ase. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01HuteAomkhXVg2b5vco62Xw --- tests/test_PyACECalculator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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")