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 9a6437b..aaa85a2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,24 @@ 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 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 -------------------------- Added @@ -508,7 +526,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'