Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 86 additions & 38 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,27 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"

- name: Set up Python 3.9
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --editable .[check]
pip install -v --editable '.[check]'

- name: black check
run: |
python -m black --check --diff --color .

- name: black preview
run: |
python -m black --preview --diff --color .

- name: isort check
run: |
python -m isort --check --diff --color .
Expand All @@ -47,84 +53,126 @@ jobs:
cython-lint src/pentapy/

build_wheels:
name: wheels for ${{ matrix.cfg.os }} / ${{ matrix.cfg.arch }}
runs-on: ${{ matrix.cfg.os }}
name: wheels for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-latest, arch: x86_64 }
- { os: windows-latest, arch: AMD64 }
- { os: macos-latest, arch: x86_64 }
- { os: macos-latest, arch: arm64 }
- { os: macos-latest, arch: universal2 }
# macos-13 is an intel runner, macos-latest is apple silicon
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
fetch-depth: "0"

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.cfg.arch }}
uses: pypa/[email protected]
with:
output-dir: dist
output-dir: dist-wheel-${{ matrix.os }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./dist/*.whl
name: dist-wheel-${{ matrix.os }}
path: ./dist-wheel-${{ matrix.os }}/*.whl

build_sdist:
name: sdist on ${{ matrix.os }} with py ${{ matrix.python-version }}
name: sdist on ${{ matrix.os }} with py ${{ matrix.ver.py }} numpy${{ matrix.ver.np }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.9]

os: [ubuntu-latest, windows-latest, macos-13, macos-14]
# https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg
ver:
- { py: "3.9", np: "==1.20.0" }
- { py: "3.10", np: "==1.21.6" }
- { py: "3.11", np: "==1.23.2" }
- { py: "3.12", np: "==1.26.2" }
- { py: "3.13", np: "==2.1.0" }
- { py: "3.13", np: ">=2.1.0" }
exclude:
- os: macos-14
ver: { py: "3.9", np: "==1.20.0" }
- os: macos-14
ver: { py: "3.10", np: "==1.21.6" }
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
fetch-depth: "0"

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.ver.py }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.ver.py }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build coveralls>=3.0.0
pip install --editable .[test]
pip install build

- name: Install pentapy
run: |
pip install -v --editable .[test]

- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pytest --cov pentapy --cov-report term-missing -v tests/
python -m coveralls --service=github
pip install "numpy${{ matrix.ver.np }}"
python -m pytest -v tests/

- name: Build sdist
run: |
# PEP 517 package builder from pypa
python -m build --sdist --outdir dist .
python -m build --sdist --outdir dist-sdist .

- uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest' && matrix.ver.py == '3.11'
with:
name: dist-sdist
path: dist-sdist/*.tar.gz

coverage:
name: coverage
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'

- uses: actions/upload-artifact@v3
# if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
path: dist/*.tar.gz
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "coveralls>=3.0.0"

- name: Install pentapy
env:
PENTAPY_CY_COV: 1
run: |
pip install -v --editable .[test]

- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install "numpy${{ matrix.ver.np }}"
python -m pytest --cov pentapy --cov-report term-missing -v tests/
python -m coveralls --service=github

upload_to_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
pattern: dist-*
merge-multiple: true
path: dist

- name: Publish to Test PyPI
Expand All @@ -143,4 +191,4 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
password: ${{ secrets.pypi_password }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,4 @@ src/pentapy/_version.py
# generated docs
docs/source/examples/
docs/source/api/
docs/source/sg_execution_times.rst
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build:
sphinx:
configuration: docs/source/conf.py

formats: all
formats: [pdf]

python:
install:
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@
All notable changes to **pentapy** will be documented in this file.


## [1.4.0] - 2025-05

See [#31](https://github.com/GeoStat-Framework/pentapy/pull/31)

### Enhancements
- added support for python 3.13
- adding [musllinux](https://musl.libc.org/) wheels
- adding PyPy wheels (pp39 and pp310)
- PyPy needs `setuptools<72.2`: https://github.com/pypa/distutils/issues/283
- adding 32bit Windows wheels again (still Tier 1 support in Python)
- adding aarch64 Linux wheels

### Changes
- dropped python 3.8 support

### Bugfixes
- use numpy solver for 3x3 matrices
- set `cdivision=False` in cython solver


## [1.3.0] - 2024-04

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


[1.4.0]: https://github.com/GeoStat-Framework/pentapy/compare/v1.3.0...v1.4.0
[1.3.0]: https://github.com/GeoStat-Framework/pentapy/compare/v1.2.0...v1.3.0
[1.2.0]: https://github.com/GeoStat-Framework/pentapy/compare/v1.1.2...v1.2.0
[1.1.2]: https://github.com/GeoStat-Framework/pentapy/compare/v1.1.1...v1.1.2
Expand Down
3 changes: 2 additions & 1 deletion docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.. mdinclude:: ../../CHANGELOG.md
.. include:: ../../CHANGELOG.md
:parser: myst_parser.docutils_
21 changes: 12 additions & 9 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def setup(app):
"sphinx.ext.napoleon", # parameters look better than with numpydoc only
"numpydoc",
"sphinx_gallery.gen_gallery",
"m2r2",
"myst_parser",
]

# autosummaries from source-files
Expand Down Expand Up @@ -89,7 +89,11 @@ def setup(app):

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
source_suffix = [".rst", ".md"]
source_suffix = {
".rst": "restructuredtext",
".md": "markdown",
}
# source_suffix = [".rst", ".md"]
# source_suffix = ".rst"

# The master toctree document.
Expand Down Expand Up @@ -143,7 +147,7 @@ def setup(app):
# 'canonical_url': '',
# 'analytics_id': '',
"logo_only": False,
"display_version": True,
"version_selector": True,
"prev_next_buttons_location": "top",
# 'style_external_links': False,
# 'vcs_pageview_mode': '',
Expand Down Expand Up @@ -192,11 +196,13 @@ def setup(app):
# latex_show_urls = 'footnote'
# http://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-latex-output
latex_elements = {
"preamble": r"""
"preamble": (
r"""
\setcounter{secnumdepth}{1}
\setcounter{tocdepth}{2}
\pagestyle{fancy}
""",
"""
),
"pointsize": "10pt",
"papersize": "a4paper",
"fncychap": "\\usepackage[Glenn]{fncychap}",
Expand Down Expand Up @@ -252,9 +258,6 @@ def setup(app):
"Sphinx": ("http://www.sphinx-doc.org/en/stable/", None),
}

# -- Sphinx Gallery Options
from sphinx_gallery.sorting import FileNameSortKey

sphinx_gallery_conf = {
# only show "print" output as output
"capture_repr": (),
Expand All @@ -267,7 +270,7 @@ def setup(app):
# Remove the "Download all examples" button from the top level gallery
"download_all_examples": False,
# Sort gallery example by file name instead of number of lines (default)
"within_subsection_order": FileNameSortKey,
"within_subsection_order": "FileNameSortKey",
# directory where function granular galleries are stored
"backreferences_dir": None,
# Modules for which function level galleries are created. In
Expand Down
Loading