Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
2 changes: 0 additions & 2 deletions .codespellignore

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
name: ${{ matrix.os }} - py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
defaults:
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Python 3.10
- name: Setup Python 3.13
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.13'
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --progress-bar off --upgrade pip setuptools wheel
Expand All @@ -27,11 +28,6 @@ jobs:
run: ruff check .
- name: Run codespell
uses: codespell-project/actions-codespell@master
with:
check_filenames: true
check_hidden: true
skip: './.git,./build,./.mypy_cache,./.pytest_cache'
ignore_words_file: ./.codespellignore
- name: Run pydocstyle
run: pydocstyle .
- name: Run bibclean
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ jobs:
uses: actions/checkout@v6
with:
path: ./main
- name: Setup Python 3.10
- name: Setup Python 3.13
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.13'
cache: 'pip' # caching pip dependencies
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Install package
run: |
python -m pip install --progress-bar off --upgrade pip setuptools wheel
Expand All @@ -36,7 +41,9 @@ jobs:
uses: actions/upload-artifact@v6
with:
name: doc-dev
path: ./doc-build/dev
path: |
doc-build/dev
!doc-build/dev/.doctrees

deploy:
if: github.event_name == 'push'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Python 3.10
- name: Setup Python 3.13
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --progress-bar off --upgrade pip setuptools wheel
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python-version: ["3.9", "3.10", "3.11", "3.12"]
# some tests fail (numerical issues) in older python on mac, so we ...
exclude:
- os: macos
python-version: '3.9'
python-version: ["3.10", "3.11", "3.12", "3.13"]
name: ${{ matrix.os }} - py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
defaults:
Expand Down
43 changes: 15 additions & 28 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = "5.0"
needs_sphinx = "7.0"

# The document name of the “root” document, that is, the document that contains
# the root toctree directive.
Expand Down Expand Up @@ -87,7 +87,6 @@
"css/style.css",
]
html_title = project
html_show_sphinx = False

# Documentation to change footer icons:
# https://pradyunsg.me/furo/customisation/footer/#changing-footer-icons
Expand All @@ -110,10 +109,9 @@
autosummary_generate = True

# -- autodoc -----------------------------------------------------------------
autodoc_typehints = "none"
autodoc_typehints = "description"
autodoc_member_order = "groupwise"
autodoc_warningiserror = True
autoclass_content = "class"

# -- intersphinx -------------------------------------------------------------
intersphinx_mapping = {
Expand Down Expand Up @@ -143,6 +141,7 @@
# LaPy
"TetMesh": "lapy.TetMesh",
"TriaMesh": "lapy.TriaMesh",
"Polygon": "lapy.Polygon",
# Matplotlib
"Axes": "matplotlib.axes.Axes",
"Figure": "matplotlib.figure.Figure",
Expand Down Expand Up @@ -184,6 +183,12 @@
r"\.__iter__",
r"\.__div__",
r"\.__neg__",
# Imported third-party objects (not part of LaPy API)
r"\.Any$", # typing.Any
r"\.csr_matrix$", # scipy.sparse.csr_matrix
r"\.minimize$", # scipy.optimize.minimize
r"\.bisect$", # bisect.bisect
r"\.LinearSegmentedColormap$", # matplotlib.colors.LinearSegmentedColormap
}

# -- sphinxcontrib-bibtex ----------------------------------------------------
Expand Down Expand Up @@ -253,27 +258,9 @@ def linkcode_resolve(domain: str, info: Dict[str, str]) -> Optional[str]:
"within_subsection_order": FileNameSortKey,
}

# -- make sure pandoc gets installed -----------------------------------------
from inspect import getsourcefile
import os

# Get path to directory containing this file, conf.py.
DOCS_DIRECTORY = os.path.dirname(os.path.abspath(getsourcefile(lambda: 0)))

def ensure_pandoc_installed(_):
import pypandoc

# Download pandoc if necessary. If pandoc is already installed and on
# the PATH, the installed version will be used. Otherwise, we will
# download a copy of pandoc into docs/bin/ and add that to our PATH.
pandoc_dir = os.path.join(DOCS_DIRECTORY, "bin")
# Add dir containing pandoc binary to the PATH environment variable
if pandoc_dir not in os.environ["PATH"].split(os.pathsep):
os.environ["PATH"] += os.pathsep + pandoc_dir
pypandoc.ensure_pandoc_installed(
targetfolder=pandoc_dir,
delete_installer=True,
)

def setup(app):
app.connect("builder-inited", ensure_pandoc_installed)
# -- Pandoc requirement ------------------------------------------------------
# Note: Pandoc must be installed on the system for nbsphinx to convert notebooks.
# Install via system package manager (apt, brew, etc.) or conda/mamba.
# See: https://pandoc.org/installing.html
#
# For CI/CD, ensure pandoc is installed in the workflow (see .github/workflows/doc.yml)
Loading