Skip to content

Follow-up modernization: tests, cleanup, and CI improvements#18

Merged
MattShannon merged 6 commits intomasterfrom
claude/modernize-python-codebase-ur34X
Mar 15, 2026
Merged

Follow-up modernization: tests, cleanup, and CI improvements#18
MattShannon merged 6 commits intomasterfrom
claude/modernize-python-codebase-ur34X

Conversation

@MattShannon
Copy link
Copy Markdown
Owner

@MattShannon MattShannon commented Mar 15, 2026

Summary

  • Fix get_array_mem to normalize None strides from __array_interface__, so stride changes on contiguous arrays are always detected
  • Replace deprecated direct x.strides assignment with np.lib.stride_tricks.as_strided
  • Add python_requires='>=3.9' to setup.py
  • Remove stale AppVeyor script; fix MANIFEST.in to include .pyx instead of .c files
  • Add tests for example scripts (example.py, example_spg.py)
  • Improve CI: add macOS to test matrix, remove redundant installs, enable -W error::DeprecationWarning

claude added 6 commits March 15, 2026 07:23
Replace direct x.strides assignment (deprecated in NumPy 2.4) with
np.lib.stride_tricks.as_strided. Also re-enables the previously
commented-out assertion.

https://claude.ai/code/session_017xmjvL47SYtX11EZjQ2uSJ
Prevents pip from attempting to install on unsupported Python versions.
Python 3.9 is the minimum supported by our deps (numpy>=1.26, scipy>=1.12).

https://claude.ai/code/session_017xmjvL47SYtX11EZjQ2uSJ
- Delete orphaned .appveyor_update_version.ps1
- MANIFEST.in: include .pyx files instead of .c files in sdists,
  since Cython is now always used for building

https://claude.ai/code/session_017xmjvL47SYtX11EZjQ2uSJ
Runs example.py (which has its own assertions) and example_spg.py
as subprocess calls to catch any regressions.

https://claude.ai/code/session_017xmjvL47SYtX11EZjQ2uSJ
…ecations

- Add macOS to the test matrix (Linux + Windows + macOS)
- Remove redundant pip install of cython/numpy/scipy (handled by
  pyproject.toml and requirements.txt via pip install -e .)
- Run tests with -W error::DeprecationWarning to catch issues early

https://claude.ai/code/session_017xmjvL47SYtX11EZjQ2uSJ
__array_interface__ reports strides as None for C-contiguous arrays.
Normalize by filling in array.strides so stride changes are always
detected.

https://claude.ai/code/session_017xmjvL47SYtX11EZjQ2uSJ
@MattShannon MattShannon merged commit cfd3be3 into master Mar 15, 2026
15 checks passed
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