Skip to content

Commit 246664d

Browse files
authored
add support for Python 3.12 (#92)
1 parent b2d5710 commit 246664d

File tree

10 files changed

+21
-15
lines changed

10 files changed

+21
-15
lines changed

.github/workflows/python_package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ${{ matrix.os }}
1010
strategy:
1111
matrix:
12-
python-version: [3.8, 3.9, '3.10', '3.11']
12+
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
1313
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
1414

1515
steps:

CHANGELOG.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ 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-
`Unreleased`_
9+
`1.5.9`_ - 2023-10-05
1010
--------------------------
11+
Added
12+
'''''
13+
- Support for Python 3.12
14+
1115
Changed
1216
'''''''
1317
- Updated version numbers of dependencies per security report.
@@ -318,7 +322,8 @@ Added
318322

319323
.. LINKS
320324
321-
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.8...HEAD
325+
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.9...HEAD
326+
.. _`1.5.9`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.8...v1.5.9
322327
.. _`1.5.8`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.7...v1.5.8
323328
.. _`1.5.7`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.6...v1.5.7
324329
.. _`1.5.6`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.5...v1.5.6

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
gmsh==4.11.1
2-
matplotlib==3.7.2
3-
numpy==1.24.4
2+
matplotlib>=3.7.3
3+
numpy>=1.24.4
44
pybind11==2.4.3
55
setuptools>=65.5.1
66
sphinx==4.2.0

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
aabbtree==2.5.0
2-
matplotlib==3.7.2
2+
matplotlib>=3.7.3
33
pybind11==2.4.3
44
pygmsh==7.1.17
5-
MeshPy==2018.2.1
6-
numpy==1.24.4
5+
MeshPy==2022.1.3
6+
numpy>=1.24.4
77
pyquaternion==0.9.5
88
pyvoro-mmalahe==1.3.4
9-
scipy==1.10.1
9+
scipy>=1.10.1
1010
setuptools>=65.5.1
1111
xmltodict==0.12.0
1212
tox==3.14.0

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def find_version(*fname):
6161
'Programming Language :: Python :: 3.9',
6262
'Programming Language :: Python :: 3.10',
6363
'Programming Language :: Python :: 3.11',
64+
'Programming Language :: Python :: 3.12',
6465
'Topic :: Scientific/Engineering',
6566
'Topic :: Scientific/Engineering :: Mathematics',
6667
'Topic :: Scientific/Engineering :: Physics'

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.5.8'
7+
__version__ = '1.5.9'

src/microstructpy/examples/uniform_seeding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
norm = mpl.colors.Normalize(vmin=min_area, vmax=max_area)
6262
sm = plt.cm.ScalarMappable(cmap=cmap, norm=norm)
6363
sm.set_array([])
64-
cb = plt.colorbar(sm, ticks=[min_area, std_area, max_area],
64+
cb = plt.colorbar(sm, ticks=[min_area, std_area, max_area], ax=plt.gca(),
6565
orientation='horizontal', fraction=0.046, pad=0.08)
6666
cb.set_label('Cell Area')
6767

src/microstructpy/geometry/ellipse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def plot(self, **kwargs):
569569
570570
""" # NOQA: E501
571571
p = patches.Ellipse(self.center, 2 * self.a, 2 * self.b,
572-
self.angle_deg, **kwargs)
572+
angle=self.angle_deg, **kwargs)
573573
plt.gca().add_patch(p)
574574

575575
# ----------------------------------------------------------------------- #

src/microstructpy/geometry/rectangle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def plot(self, **kwargs):
396396
w = self.length
397397
h = self.width
398398
ang = self.angle
399-
c = patches.Rectangle(pt, w, h, ang, **kwargs)
399+
c = patches.Rectangle(pt, w, h, angle=ang, **kwargs)
400400
plt.gca().add_patch(c)
401401

402402

src/microstructpy/seeding/seedlist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def plot(self, index_by='seed', material=[], loc=0, **kwargs):
575575
rects = [Rectangle(xy=xyi, width=wi, height=hi, angle=ai) for
576576
xyi, wi, hi, ai in zip(rect_data['xy'], rect_data['w'],
577577
rect_data['h'], rect_data['angle'])]
578-
rc = collections.PatchCollection(rects, False, **rect_kwargs)
578+
rc = collections.PatchCollection(rects, match_original=False, **rect_kwargs)
579579
ax.add_collection(rc)
580580

581581
# Plot Polygons
@@ -1161,7 +1161,7 @@ def _plot_2d(ax, seeds, seed_args):
11611161

11621162
# Plot Rectangles
11631163
rects = [Rectangle(**rect_inps) for rect_inps in rect_data]
1164-
rc = collections.PatchCollection(rects, False, **rect_kwargs)
1164+
rc = collections.PatchCollection(rects, match_original=False, **rect_kwargs)
11651165
ax.add_collection(rc)
11661166

11671167
ax.autoscale_view()

0 commit comments

Comments
 (0)