Skip to content

Commit 8b7c9f8

Browse files
authored
add python 3.11 support (#77)
1 parent 4b1acb6 commit 8b7c9f8

File tree

7 files changed

+27
-14
lines changed

7 files changed

+27
-14
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']
12+
python-version: [3.8, 3.9, '3.10', '3.11']
1313
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
1414

1515
steps:

CHANGELOG.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ 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.5.8`_ - 2023-08-25
10+
--------------------------
11+
Added
12+
'''''
13+
- Support for Python 3.11
14+
15+
Fixed
16+
'''''''
17+
- Errors associated with using keyword arguments in ``plt.gca()`` deprecated in matplotlib 3.4.
18+
19+
920
`1.5.7`_ - 2023-08-06
1021
--------------------------
1122
Fixed
@@ -300,7 +311,8 @@ Added
300311

301312
.. LINKS
302313
303-
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.7...HEAD
314+
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.8...HEAD
315+
.. _`1.5.8`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.7...v1.5.8
304316
.. _`1.5.7`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.6...v1.5.7
305317
.. _`1.5.6`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.5...v1.5.6
306318
.. _`1.5.5`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.4...v1.5.5

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ generator in Python, *SoftwareX*, 12 (2020), 100595.
152152
(`BibTeX <https://github.com/kip-hart/MicroStructPy/raw/master/docs/publications/swx2020.bib>`__)
153153
(`DOI <https://doi.org/10.1016/j.softx.2020.100595>`__)
154154

155-
The news article `AE Doctoral Student Kenneth A. Hart Presents MicroStructPy to the World <https://www.ae.gatech.edu/news/2020/07/ae-doctoral-student-kenneth-hart-presents-microstructpy-world>`__,
155+
The news article `AE Doctoral Student Kenneth A. Hart Presents MicroStructPy to the World <https://www.ae.gatech.edu/news/2020/07/kip-hart>`__,
156156
written by the School of Aerospace Engineering at Georgia Tech,
157157
describes MicroStructPy for a general audience.
158158

@@ -177,17 +177,17 @@ advised by Prof. Julian Rimoli.
177177

178178
.. LINKS
179179
180-
.. _`Contributing Guidelines`: https://github.com/kip-hart/MicroStructPy/blob/dev/.github/CONTRIBUTING.md
180+
.. _`Contributing Guidelines`: https://github.com/kip-hart/MicroStructPy/blob/master/.github/CONTRIBUTING.md
181181

182182
.. external-images
183183
184-
.. |l-github| image:: https://api.iconify.design/octicon:mark-github.svg?color=black0&inline=true&height=16
184+
.. |l-github| image:: https://github.com/kip-hart/MicroStructPy/raw/master/docs/source/_static/github.svg
185185
:alt: GitHub
186186

187-
.. |l-rtd| image:: https://api.iconify.design/simple-icons:readthedocs.svg?color=black&inline=true&height=16
187+
.. |l-rtd| image:: https://github.com/kip-hart/MicroStructPy/raw/master/docs/source/_static/rtd.svg
188188
:alt: ReadTheDocs
189189

190-
.. |l-pypi| image:: https://api.iconify.design/mdi:cube-outline.svg?color=black&inline=true&height=16
190+
.. |l-pypi| image:: https://github.com/kip-hart/MicroStructPy/raw/master/docs/source/_static/pypi.svg
191191
:alt: PyPI
192192

193193

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pygmsh==7.1.17
55
MeshPy==2018.2.1
66
numpy==1.24.4
77
pyquaternion==0.9.5
8-
pyvoro-mmalahe==1.3.3
8+
pyvoro-mmalahe==1.3.4
99
scipy==1.10.1
1010
xmltodict==0.12.0
1111
tox==3.14.0

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def find_version(*fname):
6060
'Programming Language :: Python :: 3.8',
6161
'Programming Language :: Python :: 3.9',
6262
'Programming Language :: Python :: 3.10',
63+
'Programming Language :: Python :: 3.11',
6364
'Topic :: Scientific/Engineering',
6465
'Topic :: Scientific/Engineering :: Mathematics',
6566
'Topic :: Scientific/Engineering :: Physics'
@@ -84,7 +85,7 @@ def find_version(*fname):
8485
'numpy>=1.13.0',
8586
'pygmsh>=7.0.2',
8687
'pyquaternion',
87-
'pyvoro-mmalahe', # install issue with pyvoro
88+
'pyvoro-mmalahe>=1.3.4', # install issue with pyvoro
8889
'scipy',
8990
'xmltodict'
9091
],

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

src/microstructpy/seeding/seedlist.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -670,10 +670,10 @@ def plot_breakdown(self, index_by='seed', material=[], loc=0, **kwargs):
670670
seed_args[seed_num][key] = val
671671

672672
n = self[0].geometry.n_dim
673-
if n == 2:
673+
if n == 2 or plt.gca().get_axes():
674674
ax = plt.gca()
675675
else:
676-
ax = plt.gcf().gca(projection=Axes3D.name)
676+
ax = plt.gcf().add_subplot(projection=Axes3D.name)
677677
n_obj = _misc.ax_objects(ax)
678678
if n_obj > 0:
679679
xlim = ax.get_xlim()
@@ -1072,10 +1072,10 @@ def _plt_args(seeds, index_by, kwargs):
10721072

10731073

10741074
def _get_axes(n):
1075-
if n == 2:
1075+
if n == 2 or plt.gcf().get_axes():
10761076
ax = plt.gca()
10771077
else:
1078-
ax = plt.gcf().gca(projection=Axes3D.name)
1078+
ax = plt.gcf().add_subplot(projection=Axes3D.name)
10791079
n_obj = _misc.ax_objects(ax)
10801080
if n_obj > 0:
10811081
xlim = ax.get_xlim()

0 commit comments

Comments
 (0)