Skip to content

Commit

Permalink
add support for Python 3.12 (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
kip-hart authored Oct 5, 2023
1 parent b2d5710 commit 246664d
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', '3.11']
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']

steps:
Expand Down
9 changes: 7 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ 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`_.

`Unreleased`_
`1.5.9`_ - 2023-10-05
--------------------------
Added
'''''
- Support for Python 3.12

Changed
'''''''
- Updated version numbers of dependencies per security report.
Expand Down Expand Up @@ -318,7 +322,8 @@ Added

.. LINKS
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.8...HEAD
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.9...HEAD
.. _`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
.. _`1.5.7`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.6...v1.5.7
.. _`1.5.6`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.5...v1.5.6
Expand Down
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
gmsh==4.11.1
matplotlib==3.7.2
numpy==1.24.4
matplotlib>=3.7.3
numpy>=1.24.4
pybind11==2.4.3
setuptools>=65.5.1
sphinx==4.2.0
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
aabbtree==2.5.0
matplotlib==3.7.2
matplotlib>=3.7.3
pybind11==2.4.3
pygmsh==7.1.17
MeshPy==2018.2.1
numpy==1.24.4
MeshPy==2022.1.3
numpy>=1.24.4
pyquaternion==0.9.5
pyvoro-mmalahe==1.3.4
scipy==1.10.1
scipy>=1.10.1
setuptools>=65.5.1
xmltodict==0.12.0
tox==3.14.0
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def find_version(*fname):
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Physics'
Expand Down
2 changes: 1 addition & 1 deletion src/microstructpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
import microstructpy.seeding
import microstructpy.verification

__version__ = '1.5.8'
__version__ = '1.5.9'
2 changes: 1 addition & 1 deletion src/microstructpy/examples/uniform_seeding.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
norm = mpl.colors.Normalize(vmin=min_area, vmax=max_area)
sm = plt.cm.ScalarMappable(cmap=cmap, norm=norm)
sm.set_array([])
cb = plt.colorbar(sm, ticks=[min_area, std_area, max_area],
cb = plt.colorbar(sm, ticks=[min_area, std_area, max_area], ax=plt.gca(),
orientation='horizontal', fraction=0.046, pad=0.08)
cb.set_label('Cell Area')

Expand Down
2 changes: 1 addition & 1 deletion src/microstructpy/geometry/ellipse.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def plot(self, **kwargs):
""" # NOQA: E501
p = patches.Ellipse(self.center, 2 * self.a, 2 * self.b,
self.angle_deg, **kwargs)
angle=self.angle_deg, **kwargs)
plt.gca().add_patch(p)

# ----------------------------------------------------------------------- #
Expand Down
2 changes: 1 addition & 1 deletion src/microstructpy/geometry/rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def plot(self, **kwargs):
w = self.length
h = self.width
ang = self.angle
c = patches.Rectangle(pt, w, h, ang, **kwargs)
c = patches.Rectangle(pt, w, h, angle=ang, **kwargs)
plt.gca().add_patch(c)


Expand Down
4 changes: 2 additions & 2 deletions src/microstructpy/seeding/seedlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def plot(self, index_by='seed', material=[], loc=0, **kwargs):
rects = [Rectangle(xy=xyi, width=wi, height=hi, angle=ai) for
xyi, wi, hi, ai in zip(rect_data['xy'], rect_data['w'],
rect_data['h'], rect_data['angle'])]
rc = collections.PatchCollection(rects, False, **rect_kwargs)
rc = collections.PatchCollection(rects, match_original=False, **rect_kwargs)
ax.add_collection(rc)

# Plot Polygons
Expand Down Expand Up @@ -1161,7 +1161,7 @@ def _plot_2d(ax, seeds, seed_args):

# Plot Rectangles
rects = [Rectangle(**rect_inps) for rect_inps in rect_data]
rc = collections.PatchCollection(rects, False, **rect_kwargs)
rc = collections.PatchCollection(rects, match_original=False, **rect_kwargs)
ax.add_collection(rc)

ax.autoscale_view()
Expand Down

0 comments on commit 246664d

Please sign in to comment.