Skip to content

Commit 6f0ce9e

Browse files
rimoliclaude
andauthored
Version 1.6.1: install the numpy and MeshPy the package works with (#120)
setup.py asked for numpy>=1.22.2 and meshpy>=2018.2.1, so pip installed microstructpy 1.6.0 with numpy 2.5 and MeshPy 2026.1, while the continuous integration installs requirements.txt, which pins numpy below 2 and MeshPy 2022.1.3. With those newest versions, 13 of the 224 tests fail. With numpy 2, the text files of the meshes cannot be read back (numpy writes integers as np.int64(4)) and tangent_sphere fails. With MeshPy 2026, TetGen lets 3D elements exceed max_volume. setup.py now asks for numpy<2 and meshpy<2026. Installed that way, pip takes numpy 1.26.4 and MeshPy 2025.1.1 (2022.1.3 on Python 3.9), and all 224 tests pass. numpy below 2 has no wheels for Python 3.13 and later, but pip builds it from source there; on Python 3.14 that takes under a minute, and all the tests pass. One more CI job, Python 3.12 on Ubuntu, skips requirements.txt and installs the package alone, as pip install microstructpy does, so that the tests see the dependency versions that users get. It does not upload coverage, which the pinned job of the same Python and system already reports. Suggested by Kip Hart in the review. The changelog has a 1.6.1 section, __version__ is 1.6.1, and the example digest of the documentation is updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 725a181 commit 6f0ce9e

5 files changed

Lines changed: 35 additions & 6 deletions

File tree

‎.github/workflows/python_package.yaml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,22 @@ on: [push]
44

55
jobs:
66
pytest:
7-
name: pytest for py${{ matrix.python-version }} on ${{ matrix.os }}
7+
name: pytest for py${{ matrix.python-version }} on ${{ matrix.os }}${{ matrix.unpinned && ', unpinned' || '' }}
88

99
runs-on: ${{ matrix.os }}
1010
strategy:
1111
fail-fast: false
1212
matrix:
1313
python-version: [3.9, '3.10', '3.11', '3.12']
1414
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
15+
unpinned: [false]
16+
include:
17+
# One job installs the package without the pins of
18+
# requirements.txt, as pip install microstructpy does, so that the
19+
# tests see the dependency versions that users get.
20+
- python-version: '3.12'
21+
os: 'ubuntu-latest'
22+
unpinned: true
1523

1624
steps:
1725
- uses: actions/checkout@main
@@ -33,6 +41,7 @@ jobs:
3341
pip install setuptools wheel
3442
pip install flake8 pytest pytest-cov coveralls
3543
- name: Install package requirements
44+
if: ${{ !matrix.unpinned }}
3645
run: pip install -r requirements.txt
3746
- name: Install package
3847
run: pip install -e .
@@ -47,6 +56,7 @@ jobs:
4756
run: pytest --cov=src tests/
4857

4958
- name: Coveralls
59+
if: ${{ !matrix.unpinned }}
5060
env:
5161
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
5262
COVERALLS_FLAG_NAME: py${{ matrix.python-version }} on ${{ matrix.os }}

‎CHANGELOG.rst‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@ All notable changes to this project will be documented in this file.
66
The format is based on `Keep a Changelog`_,
77
and this project adheres to `Semantic Versioning`_.
88

9+
`1.6.1`_ - 2026-10-19
10+
--------------------------
11+
Fixed
12+
'''''
13+
- ``pip install microstructpy`` installs versions of numpy and MeshPy that
14+
the package works with: numpy below 2 and MeshPy below 2026. With numpy 2,
15+
the text files of the meshes cannot be read back, since numpy writes
16+
integers as ``np.int64(4)``, and ``tangent_sphere`` fails. With MeshPy
17+
2026, TetGen no longer keeps the elements of 3D meshes under
18+
``max_volume``. numpy below 2 has no wheels for Python 3.13 and later, so
19+
pip builds it from source there, which needs a compiler.
20+
21+
Changed
22+
'''''''
23+
- The continuous integration also runs the tests on an installation without
24+
the pins of ``requirements.txt``, as ``pip install microstructpy`` does, so
25+
that it sees the dependency versions that users get.
26+
927
`1.6.0`_ - 2026-10-18
1028
--------------------------
1129
Added
@@ -508,7 +526,8 @@ Added
508526

509527
.. LINKS
510528
511-
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.6.0...HEAD
529+
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.6.1...HEAD
530+
.. _`1.6.1`: https://github.com/kip-hart/MicroStructPy/compare/v1.6.0...v1.6.1
512531
.. _`1.6.0`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.9...v1.6.0
513532
.. _`1.5.9`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.8...v1.5.9
514533
.. _`1.5.8`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.7...v1.5.8

‎docs/source/sphinx_gallery/plot_demos.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# them is edited, and the build would serve stale figures.
2525
#
2626
# Managed by docs/example_digest.py. Do not edit by hand.
27-
EXAMPLES_DIGEST = 'e16a7babf54a2cfe'
27+
EXAMPLES_DIGEST = '1cc876c00916b073'
2828

2929
example_dir = '../../../src/microstructpy/examples'
3030

‎setup.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ def find_version(*fname):
8181
'pybind11', # must come before meshpy for successful install
8282
'lsq-ellipse',
8383
'matplotlib>=3.4.0',
84-
'meshpy>=2018.2.1',
85-
'numpy>=1.22.2',
84+
'meshpy>=2018.2.1,<2026', # TetGen of 2026 exceeds max_volume
85+
'numpy>=1.22.2,<2', # numpy 2 breaks the mesh text files
8686
'pygmsh>=7.0.2',
8787
'pyquaternion',
8888
'pyvoro-rimoli>=1.4.0', # pyvoro with the current Voro++

‎src/microstructpy/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
import microstructpy.seeding
55
import microstructpy.verification
66

7-
__version__ = '1.6.0'
7+
__version__ = '1.6.1'

0 commit comments

Comments
 (0)