Skip to content

Commit

Permalink
add python 3.11 support (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
kip-hart authored Aug 26, 2023
1 parent 4b1acb6 commit 8b7c9f8
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 14 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']
python-version: [3.8, 3.9, '3.10', '3.11']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']

steps:
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ 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.5.8`_ - 2023-08-25
--------------------------
Added
'''''
- Support for Python 3.11

Fixed
'''''''
- Errors associated with using keyword arguments in ``plt.gca()`` deprecated in matplotlib 3.4.


`1.5.7`_ - 2023-08-06
--------------------------
Fixed
Expand Down Expand Up @@ -300,7 +311,8 @@ Added

.. LINKS
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.7...HEAD
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.8...HEAD
.. _`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
.. _`1.5.5`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.4...v1.5.5
Expand Down
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ generator in Python, *SoftwareX*, 12 (2020), 100595.
(`BibTeX <https://github.com/kip-hart/MicroStructPy/raw/master/docs/publications/swx2020.bib>`__)
(`DOI <https://doi.org/10.1016/j.softx.2020.100595>`__)

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>`__,
The news article `AE Doctoral Student Kenneth A. Hart Presents MicroStructPy to the World <https://www.ae.gatech.edu/news/2020/07/kip-hart>`__,
written by the School of Aerospace Engineering at Georgia Tech,
describes MicroStructPy for a general audience.

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

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

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

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

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


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pygmsh==7.1.17
MeshPy==2018.2.1
numpy==1.24.4
pyquaternion==0.9.5
pyvoro-mmalahe==1.3.3
pyvoro-mmalahe==1.3.4
scipy==1.10.1
xmltodict==0.12.0
tox==3.14.0
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def find_version(*fname):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Physics'
Expand All @@ -84,7 +85,7 @@ def find_version(*fname):
'numpy>=1.13.0',
'pygmsh>=7.0.2',
'pyquaternion',
'pyvoro-mmalahe', # install issue with pyvoro
'pyvoro-mmalahe>=1.3.4', # install issue with pyvoro
'scipy',
'xmltodict'
],
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.7'
__version__ = '1.5.8'
8 changes: 4 additions & 4 deletions src/microstructpy/seeding/seedlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,10 +670,10 @@ def plot_breakdown(self, index_by='seed', material=[], loc=0, **kwargs):
seed_args[seed_num][key] = val

n = self[0].geometry.n_dim
if n == 2:
if n == 2 or plt.gca().get_axes():
ax = plt.gca()
else:
ax = plt.gcf().gca(projection=Axes3D.name)
ax = plt.gcf().add_subplot(projection=Axes3D.name)
n_obj = _misc.ax_objects(ax)
if n_obj > 0:
xlim = ax.get_xlim()
Expand Down Expand Up @@ -1072,10 +1072,10 @@ def _plt_args(seeds, index_by, kwargs):


def _get_axes(n):
if n == 2:
if n == 2 or plt.gcf().get_axes():
ax = plt.gca()
else:
ax = plt.gcf().gca(projection=Axes3D.name)
ax = plt.gcf().add_subplot(projection=Axes3D.name)
n_obj = _misc.ax_objects(ax)
if n_obj > 0:
xlim = ax.get_xlim()
Expand Down

0 comments on commit 8b7c9f8

Please sign in to comment.