From 9605f346a7194b4b626bccd3d86f42aeb2ac4cc1 Mon Sep 17 00:00:00 2001 From: Julian Rimoli Date: Mon, 19 Oct 2026 08:53:56 -0700 Subject: [PATCH 1/2] Version 1.6.1: install the numpy and MeshPy the package works with 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 releases for Python 3.13 and later, which MicroStructPy does not support yet. 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 --- CHANGELOG.rst | 15 ++++++++++++++- docs/source/sphinx_gallery/plot_demos.py | 2 +- setup.py | 4 ++-- src/microstructpy/__init__.py | 2 +- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9a6437b..a3f32aa 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,18 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog`_, and this project adheres to `Semantic Versioning`_. +`1.6.1`_ - 2026-10-19 +-------------------------- +Fixed +''''' +- ``pip install microstructpy`` installs versions of numpy and MeshPy that + the package works with: numpy below 2 and MeshPy below 2026. With numpy 2, + the text files of the meshes cannot be read back, since numpy writes + integers as ``np.int64(4)``, and ``tangent_sphere`` fails. With MeshPy + 2026, TetGen no longer keeps the elements of 3D meshes under + ``max_volume``. numpy below 2 has no releases for Python 3.13 and later, + which MicroStructPy does not support yet. + `1.6.0`_ - 2026-10-18 -------------------------- Added @@ -508,7 +520,8 @@ Added .. LINKS -.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.6.0...HEAD +.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.6.1...HEAD +.. _`1.6.1`: https://github.com/kip-hart/MicroStructPy/compare/v1.6.0...v1.6.1 .. _`1.6.0`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.9...v1.6.0 .. _`1.5.9`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.8...v1.5.9 .. _`1.5.8`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.7...v1.5.8 diff --git a/docs/source/sphinx_gallery/plot_demos.py b/docs/source/sphinx_gallery/plot_demos.py index b34a9b5..cb78bbc 100644 --- a/docs/source/sphinx_gallery/plot_demos.py +++ b/docs/source/sphinx_gallery/plot_demos.py @@ -24,7 +24,7 @@ # them is edited, and the build would serve stale figures. # # Managed by docs/example_digest.py. Do not edit by hand. -EXAMPLES_DIGEST = 'e16a7babf54a2cfe' +EXAMPLES_DIGEST = '1cc876c00916b073' example_dir = '../../../src/microstructpy/examples' diff --git a/setup.py b/setup.py index 12e16d2..672805f 100644 --- a/setup.py +++ b/setup.py @@ -81,8 +81,8 @@ def find_version(*fname): 'pybind11', # must come before meshpy for successful install 'lsq-ellipse', 'matplotlib>=3.4.0', - 'meshpy>=2018.2.1', - 'numpy>=1.22.2', + 'meshpy>=2018.2.1,<2026', # TetGen of 2026 exceeds max_volume + 'numpy>=1.22.2,<2', # numpy 2 breaks the mesh text files 'pygmsh>=7.0.2', 'pyquaternion', 'pyvoro-rimoli>=1.4.0', # pyvoro with the current Voro++ diff --git a/src/microstructpy/__init__.py b/src/microstructpy/__init__.py index a42448a..f383ffd 100644 --- a/src/microstructpy/__init__.py +++ b/src/microstructpy/__init__.py @@ -4,4 +4,4 @@ import microstructpy.seeding import microstructpy.verification -__version__ = '1.6.0' +__version__ = '1.6.1' From cbca8172bd22c56d893c346ad4448be60161795c Mon Sep 17 00:00:00 2001 From: Julian Rimoli Date: Mon, 19 Oct 2026 21:15:54 -0700 Subject: [PATCH 2/2] Test an installation without the pins of requirements.txt Every test job installed requirements.txt before the package, and its pins hid the versions that install_requires resolves to, so CI could not see that pip installed 1.6.0 with numpy 2.5 and MeshPy 2026.1, with which 13 tests fail. One more job, Python 3.12 on Ubuntu, now skips requirements.txt and installs the package alone, as pip install microstructpy does. It does not upload coverage, which the pinned job of the same Python and system already reports. The changelog also corrects its note on Python 3.13 and later: numpy below 2 has no wheels there, but pip builds it from source. On Python 3.14 that takes under a minute, and all the tests pass. Suggested by Kip Hart in the review of PR #120. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/python_package.yaml | 12 +++++++++++- CHANGELOG.rst | 10 ++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python_package.yaml b/.github/workflows/python_package.yaml index dd6f9b0..ed6a7b1 100644 --- a/.github/workflows/python_package.yaml +++ b/.github/workflows/python_package.yaml @@ -4,7 +4,7 @@ on: [push] jobs: pytest: - name: pytest for py${{ matrix.python-version }} on ${{ matrix.os }} + name: pytest for py${{ matrix.python-version }} on ${{ matrix.os }}${{ matrix.unpinned && ', unpinned' || '' }} runs-on: ${{ matrix.os }} strategy: @@ -12,6 +12,14 @@ jobs: matrix: python-version: [3.9, '3.10', '3.11', '3.12'] os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] + unpinned: [false] + include: + # One job installs the package without the pins of + # requirements.txt, as pip install microstructpy does, so that the + # tests see the dependency versions that users get. + - python-version: '3.12' + os: 'ubuntu-latest' + unpinned: true steps: - uses: actions/checkout@main @@ -33,6 +41,7 @@ jobs: pip install setuptools wheel pip install flake8 pytest pytest-cov coveralls - name: Install package requirements + if: ${{ !matrix.unpinned }} run: pip install -r requirements.txt - name: Install package run: pip install -e . @@ -47,6 +56,7 @@ jobs: run: pytest --cov=src tests/ - name: Coveralls + if: ${{ !matrix.unpinned }} env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} COVERALLS_FLAG_NAME: py${{ matrix.python-version }} on ${{ matrix.os }} diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a3f32aa..aaa85a2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,8 +15,14 @@ Fixed the text files of the meshes cannot be read back, since numpy writes integers as ``np.int64(4)``, and ``tangent_sphere`` fails. With MeshPy 2026, TetGen no longer keeps the elements of 3D meshes under - ``max_volume``. numpy below 2 has no releases for Python 3.13 and later, - which MicroStructPy does not support yet. + ``max_volume``. numpy below 2 has no wheels for Python 3.13 and later, so + pip builds it from source there, which needs a compiler. + +Changed +''''''' +- The continuous integration also runs the tests on an installation without + the pins of ``requirements.txt``, as ``pip install microstructpy`` does, so + that it sees the dependency versions that users get. `1.6.0`_ - 2026-10-18 --------------------------