Skip to content

Support up to pandas 3#100

Open
pmrv wants to merge 4 commits into
ICAMS:masterfrom
pmrv:claude/sleepy-dijkstra-luopd2
Open

Support up to pandas 3#100
pmrv wants to merge 4 commits into
ICAMS:masterfrom
pmrv:claude/sleepy-dijkstra-luopd2

Conversation

@pmrv

@pmrv pmrv commented Jul 15, 2026

Copy link
Copy Markdown

Pull Request Template

Thank you for contributing to our project! Please review the checklist and fill out the details below.

Description of Changes

Widens the pandas requirement in setup.py from pandas<=2.0 to pandas>=2,<4, covering the whole pandas 2.x and 3.x series.

The codebase was audited for pandas 3 blockers; none were found:

No use of APIs removed in pandas 2/3 (DataFrame.append, applymap, Series.iteritems, delim_whitespace, .ix).
No chained assignment — all DataFrame writes go through df[col] = ... or df.loc[mask, col] = ..., so pandas 3's enforced Copy-on-Write does not change behavior.
All .map() calls operate on Series/Index objects, so nothing depends on DataFrame.map (introduced in 2.1), keeping the 2.0 lower bound valid.
Legacy pickled reference DataFrames (tests/*.pckl.gzip, [data/exmpl_df.pckl.gzip](https://github.com/pmrv/python-ace/blob/claude/sleepy-dijkstra-luopd2/data/exmpl_df.pckl.gzip)) load correctly under pandas 3, with object dtype preserved.
The existing numpy<=1.26.4 pin satisfies pandas 3's numpy ≥1.26 requirement.

Also installs the vendored lib/maxvolpy explicitly in the test workflow: pip install . does not run the custom setup.py install hook, so test_activelearning/test_activeexploration failed collection in CI with ModuleNotFoundError: maxvolpy.

Checklist

  • Code is well-documented.
  • All tests have been run and passed.
  • Relevant documentation has been updated if necessary.

License Agreement

By submitting this pull request, I agree that:

  • The code submitted in this pull request will be distributed under the Academic Software License (free for academic non-commercial use, not free for commercial use), see LICENSE.md for more details.
  • The copyright for the code, including the submitted code, remains with Ruhr University Bochum. Ruhr University Bochum retains the right to transfer or modify the copyright.

Thank you for your contribution!

pmrv and others added 4 commits February 25, 2025 21:41
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HuteAomkhXVg2b5vco62Xw
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HuteAomkhXVg2b5vco62Xw
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HuteAomkhXVg2b5vco62Xw
@pmrv pmrv changed the title Claude/sleepy dijkstra luopd2 Support up to pandas 3 Jul 15, 2026
@pmrv

pmrv commented Jul 15, 2026

Copy link
Copy Markdown
Author

There's some drive-by fixes for the CI too. Not sure if those were only important for my repo or also here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants