Skip to content

Commit 6cff372

Browse files
authored
Merge pull request #31 from GeoStat-Framework/py13_support
Py13 support
2 parents e78f674 + 558a7f1 commit 6cff372

10 files changed

Lines changed: 163 additions & 66 deletions

File tree

.github/workflows/main.yml

Lines changed: 86 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,27 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: "0"
2224

23-
- name: Set up Python 3.9
25+
- name: Set up Python 3.11
2426
uses: actions/setup-python@v5
2527
with:
26-
python-version: 3.9
28+
python-version: 3.11
2729

2830
- name: Install dependencies
2931
run: |
3032
python -m pip install --upgrade pip
31-
pip install --editable .[check]
33+
pip install -v --editable '.[check]'
3234
3335
- name: black check
3436
run: |
3537
python -m black --check --diff --color .
3638
39+
- name: black preview
40+
run: |
41+
python -m black --preview --diff --color .
42+
3743
- name: isort check
3844
run: |
3945
python -m isort --check --diff --color .
@@ -47,84 +53,126 @@ jobs:
4753
cython-lint src/pentapy/
4854
4955
build_wheels:
50-
name: wheels for ${{ matrix.cfg.os }} / ${{ matrix.cfg.arch }}
51-
runs-on: ${{ matrix.cfg.os }}
56+
name: wheels for ${{ matrix.os }}
57+
runs-on: ${{ matrix.os }}
5258
strategy:
5359
fail-fast: false
5460
matrix:
55-
cfg:
56-
- { os: ubuntu-latest, arch: x86_64 }
57-
- { os: windows-latest, arch: AMD64 }
58-
- { os: macos-latest, arch: x86_64 }
59-
- { os: macos-latest, arch: arm64 }
60-
- { os: macos-latest, arch: universal2 }
61+
# macos-13 is an intel runner, macos-latest is apple silicon
62+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest]
6163

6264
steps:
6365
- uses: actions/checkout@v4
6466
with:
65-
fetch-depth: '0'
67+
fetch-depth: "0"
6668

6769
- name: Build wheels
68-
uses: pypa/cibuildwheel@v2.17.0
69-
env:
70-
CIBW_ARCHS: ${{ matrix.cfg.arch }}
70+
uses: pypa/cibuildwheel@v2.22.0
7171
with:
72-
output-dir: dist
72+
output-dir: dist-wheel-${{ matrix.os }}
7373

74-
- uses: actions/upload-artifact@v3
74+
- uses: actions/upload-artifact@v4
7575
with:
76-
path: ./dist/*.whl
76+
name: dist-wheel-${{ matrix.os }}
77+
path: ./dist-wheel-${{ matrix.os }}/*.whl
7778

7879
build_sdist:
79-
name: sdist on ${{ matrix.os }} with py ${{ matrix.python-version }}
80+
name: sdist on ${{ matrix.os }} with py ${{ matrix.ver.py }} numpy${{ matrix.ver.np }}
8081
runs-on: ${{ matrix.os }}
8182
strategy:
8283
fail-fast: false
8384
matrix:
84-
os: [ubuntu-latest]
85-
python-version: [3.9]
86-
85+
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
86+
# https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg
87+
ver:
88+
- { py: "3.9", np: "==1.20.0" }
89+
- { py: "3.10", np: "==1.21.6" }
90+
- { py: "3.11", np: "==1.23.2" }
91+
- { py: "3.12", np: "==1.26.2" }
92+
- { py: "3.13", np: "==2.1.0" }
93+
- { py: "3.13", np: ">=2.1.0" }
94+
exclude:
95+
- os: macos-14
96+
ver: { py: "3.9", np: "==1.20.0" }
97+
- os: macos-14
98+
ver: { py: "3.10", np: "==1.21.6" }
8799
steps:
88100
- uses: actions/checkout@v4
89101
with:
90-
fetch-depth: '0'
102+
fetch-depth: "0"
91103

92-
- name: Set up Python ${{ matrix.python-version }}
104+
- name: Set up Python ${{ matrix.ver.py }}
93105
uses: actions/setup-python@v5
94106
with:
95-
python-version: ${{ matrix.python-version }}
107+
python-version: ${{ matrix.ver.py }}
96108

97109
- name: Install dependencies
98110
run: |
99111
python -m pip install --upgrade pip
100-
pip install build coveralls>=3.0.0
101-
pip install --editable .[test]
112+
pip install build
113+
114+
- name: Install pentapy
115+
run: |
116+
pip install -v --editable .[test]
102117
103118
- name: Run tests
104-
env:
105-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106119
run: |
107-
python -m pytest --cov pentapy --cov-report term-missing -v tests/
108-
python -m coveralls --service=github
120+
pip install "numpy${{ matrix.ver.np }}"
121+
python -m pytest -v tests/
109122
110123
- name: Build sdist
111124
run: |
112125
# PEP 517 package builder from pypa
113-
python -m build --sdist --outdir dist .
126+
python -m build --sdist --outdir dist-sdist .
127+
128+
- uses: actions/upload-artifact@v4
129+
if: matrix.os == 'ubuntu-latest' && matrix.ver.py == '3.11'
130+
with:
131+
name: dist-sdist
132+
path: dist-sdist/*.tar.gz
133+
134+
coverage:
135+
name: coverage
136+
runs-on: ubuntu-latest
137+
138+
steps:
139+
- uses: actions/checkout@v4
140+
with:
141+
fetch-depth: '0'
114142

115-
- uses: actions/upload-artifact@v3
116-
# if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
143+
- name: Set up Python 3.11
144+
uses: actions/setup-python@v5
117145
with:
118-
path: dist/*.tar.gz
146+
python-version: 3.11
147+
148+
- name: Install dependencies
149+
run: |
150+
python -m pip install --upgrade pip
151+
pip install "coveralls>=3.0.0"
152+
153+
- name: Install pentapy
154+
env:
155+
PENTAPY_CY_COV: 1
156+
run: |
157+
pip install -v --editable .[test]
158+
159+
- name: Run tests
160+
env:
161+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
162+
run: |
163+
pip install "numpy${{ matrix.ver.np }}"
164+
python -m pytest --cov pentapy --cov-report term-missing -v tests/
165+
python -m coveralls --service=github
119166
120167
upload_to_pypi:
121168
needs: [build_wheels, build_sdist]
122169
runs-on: ubuntu-latest
123170

124171
steps:
125-
- uses: actions/download-artifact@v3
172+
- uses: actions/download-artifact@v4
126173
with:
127-
name: artifact
174+
pattern: dist-*
175+
merge-multiple: true
128176
path: dist
129177

130178
- name: Publish to Test PyPI
@@ -143,4 +191,4 @@ jobs:
143191
uses: pypa/gh-action-pypi-publish@release/v1
144192
with:
145193
user: __token__
146-
password: ${{ secrets.pypi_password }}
194+
password: ${{ secrets.pypi_password }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,4 @@ src/pentapy/_version.py
119119
# generated docs
120120
docs/source/examples/
121121
docs/source/api/
122+
docs/source/sg_execution_times.rst

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build:
88
sphinx:
99
configuration: docs/source/conf.py
1010

11-
formats: all
11+
formats: [pdf]
1212

1313
python:
1414
install:

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,26 @@
33
All notable changes to **pentapy** will be documented in this file.
44

55

6+
## [1.4.0] - 2025-05
7+
8+
See [#31](https://github.com/GeoStat-Framework/pentapy/pull/31)
9+
10+
### Enhancements
11+
- added support for python 3.13
12+
- adding [musllinux](https://musl.libc.org/) wheels
13+
- adding PyPy wheels (pp39 and pp310)
14+
- PyPy needs `setuptools<72.2`: https://github.com/pypa/distutils/issues/283
15+
- adding 32bit Windows wheels again (still Tier 1 support in Python)
16+
- adding aarch64 Linux wheels
17+
18+
### Changes
19+
- dropped python 3.8 support
20+
21+
### Bugfixes
22+
- use numpy solver for 3x3 matrices
23+
- set `cdivision=False` in cython solver
24+
25+
626
## [1.3.0] - 2024-04
727

828
See [#21](https://github.com/GeoStat-Framework/pentapy/pull/21)
@@ -100,6 +120,7 @@ This is the first release of pentapy, a python toolbox for solving pentadiagonal
100120
The solver is implemented in cython, which makes it really fast.
101121

102122

123+
[1.4.0]: https://github.com/GeoStat-Framework/pentapy/compare/v1.3.0...v1.4.0
103124
[1.3.0]: https://github.com/GeoStat-Framework/pentapy/compare/v1.2.0...v1.3.0
104125
[1.2.0]: https://github.com/GeoStat-Framework/pentapy/compare/v1.1.2...v1.2.0
105126
[1.1.2]: https://github.com/GeoStat-Framework/pentapy/compare/v1.1.1...v1.1.2

docs/source/changelog.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.. mdinclude:: ../../CHANGELOG.md
1+
.. include:: ../../CHANGELOG.md
2+
:parser: myst_parser.docutils_

docs/source/conf.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def setup(app):
6060
"sphinx.ext.napoleon", # parameters look better than with numpydoc only
6161
"numpydoc",
6262
"sphinx_gallery.gen_gallery",
63-
"m2r2",
63+
"myst_parser",
6464
]
6565

6666
# autosummaries from source-files
@@ -89,7 +89,11 @@ def setup(app):
8989

9090
# The suffix(es) of source filenames.
9191
# You can specify multiple suffix as a list of string:
92-
source_suffix = [".rst", ".md"]
92+
source_suffix = {
93+
".rst": "restructuredtext",
94+
".md": "markdown",
95+
}
96+
# source_suffix = [".rst", ".md"]
9397
# source_suffix = ".rst"
9498

9599
# The master toctree document.
@@ -143,7 +147,7 @@ def setup(app):
143147
# 'canonical_url': '',
144148
# 'analytics_id': '',
145149
"logo_only": False,
146-
"display_version": True,
150+
"version_selector": True,
147151
"prev_next_buttons_location": "top",
148152
# 'style_external_links': False,
149153
# 'vcs_pageview_mode': '',
@@ -192,11 +196,13 @@ def setup(app):
192196
# latex_show_urls = 'footnote'
193197
# http://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-latex-output
194198
latex_elements = {
195-
"preamble": r"""
199+
"preamble": (
200+
r"""
196201
\setcounter{secnumdepth}{1}
197202
\setcounter{tocdepth}{2}
198203
\pagestyle{fancy}
199-
""",
204+
"""
205+
),
200206
"pointsize": "10pt",
201207
"papersize": "a4paper",
202208
"fncychap": "\\usepackage[Glenn]{fncychap}",
@@ -252,9 +258,6 @@ def setup(app):
252258
"Sphinx": ("http://www.sphinx-doc.org/en/stable/", None),
253259
}
254260

255-
# -- Sphinx Gallery Options
256-
from sphinx_gallery.sorting import FileNameSortKey
257-
258261
sphinx_gallery_conf = {
259262
# only show "print" output as output
260263
"capture_repr": (),
@@ -267,7 +270,7 @@ def setup(app):
267270
# Remove the "Download all examples" button from the top level gallery
268271
"download_all_examples": False,
269272
# Sort gallery example by file name instead of number of lines (default)
270-
"within_subsection_order": FileNameSortKey,
273+
"within_subsection_order": "FileNameSortKey",
271274
# directory where function granular galleries are stored
272275
"backreferences_dir": None,
273276
# Modules for which function level galleries are created. In

0 commit comments

Comments
 (0)