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
26 changes: 10 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,33 @@ concurrency:
on:
pull_request:
push:
branches: [main]
branches: [ main ]
workflow_dispatch:

jobs:
build:
# a pure Python package builds one wheel for every platform; pytest installs it on each OS
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python-version: ["3.10", "3.11", "3.12", "3.13"]
name: ${{ matrix.os }} - py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
name: ubuntu - py3.14
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Python ${{ matrix.python-version }}
- name: Setup Python 3.14
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
python-version: "3.14"
- name: Install dependencies
run: |
python -m pip install --progress-bar off --upgrade pip setuptools wheel
python -m pip install --progress-bar off .[build]
- name: Test package install
run: lapy-sys_info
- name: Remove package install
run: python -m pip uninstall -yq lapy
python -m pip install --progress-bar off --upgrade pip
python -m pip install --progress-bar off build twine
- name: Build package
run: python -m build
- name: Check package metadata
run: twine check --strict dist/*
- name: Install sdist
run: pip install ./dist/*.tar.gz
- name: Test sdist install
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,5 @@ jobs:
run: ruff check .
- name: Run codespell
uses: codespell-project/actions-codespell@master
- name: Run pydocstyle
run: pydocstyle .
- name: Run bibclean
run: bibclean-check doc/references.bib
39 changes: 37 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ on:
pull_request:
paths:
- '**.py'
- 'pyproject.toml'
- '.github/workflows/pytest.yml'
push:
branches: [main]
paths:
- '**.py'
- 'pyproject.toml'
- '.github/workflows/pytest.yml'
workflow_dispatch:

jobs:
Expand All @@ -18,8 +22,14 @@ jobs:
strategy:
fail-fast: false
matrix:
# oldest and newest Python on every OS, the versions in between on ubuntu only
os: [ubuntu, macos, windows]
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.11", "3.14"]
include:
- os: ubuntu
python-version: "3.12"
- os: ubuntu
python-version: "3.13"
name: ${{ matrix.os }} - py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
defaults:
Expand All @@ -41,7 +51,7 @@ jobs:
- name: Run pytest
run: pytest lapy --cov=lapy --cov-report=xml --cov-config=pyproject.toml
- name: Upload to codecov
if: ${{ matrix.os == 'ubuntu' && matrix.python-version == '3.10' && github.repository == 'Deep-MI/LaPy' }}
if: ${{ matrix.os == 'ubuntu' && matrix.python-version == '3.14' && github.repository == 'Deep-MI/LaPy' }}
uses: codecov/codecov-action@v7
with:
files: ./coverage.xml
Expand All @@ -51,3 +61,28 @@ jobs:
verbose: true # optional (default = false)
token: ${{ secrets.CODECOV_TOKEN }}
#slug: deep-mi/LaPy

pytest-min:
# the lowest versions of the dependencies that pyproject.toml allows
timeout-minutes: 30
name: ubuntu - py3.11 - minimum versions
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Python 3.11
uses: actions/setup-python@v7
with:
python-version: "3.11"
- name: Install package with minimum dependencies
run: |
python -m pip install --progress-bar off uv
uv pip install --system pytest pytest-timeout
uv pip install --system --resolution lowest-direct .
- name: Display system information
run: lapy-sys_info --developer
- name: Run pytest
run: pytest lapy
3 changes: 0 additions & 3 deletions doc/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@
.. autoclass:: {{ objname }}
:members:
:inherited-members:

.. minigallery:: {{ fullname }}
:add-heading:
3 changes: 0 additions & 3 deletions doc/_templates/autosummary/function.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@
.. currentmodule:: {{ module }}

.. autofunction:: {{ objname }}

.. minigallery:: {{ fullname }}
:add-heading:
4 changes: 0 additions & 4 deletions doc/changes/authors.inc

This file was deleted.

7 changes: 0 additions & 7 deletions doc/changes/index.rst

This file was deleted.

45 changes: 0 additions & 45 deletions doc/changes/latest.rst

This file was deleted.

38 changes: 0 additions & 38 deletions doc/changes/latest.rst.template

This file was deleted.

29 changes: 0 additions & 29 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
from importlib import import_module
from typing import Dict, Optional

from sphinx_gallery.sorting import FileNameSortKey

import lapy

# -- project information -----------------------------------------------------
Expand Down Expand Up @@ -46,8 +44,6 @@
"sphinxcontrib.bibtex",
"sphinx_copybutton",
"sphinx_design",
"sphinx_gallery.gen_gallery",
"sphinx_issues",
"nbsphinx",
"IPython.sphinxext.ipython_console_highlighting",
]
Expand All @@ -58,19 +54,13 @@
"Thumbs.db",
".DS_Store",
"**.ipynb_checkpoints",
"tutorials/examples/README.rst",
]

# Sphinx will warn about all references where the target cannot be found.
nitpicky = True
nitpick_ignore = []

show_warning_types = True
suppress_warnings = [
# Ignore new warning in Sphinx 7.3.0 while pickling environment:
# WARNING: cannot cache unpickable configuration value: 'sphinx_gallery_conf'
"config.cache",
]

# A list of ignored prefixes for module index sorting.
modindex_common_prefix = [f"{package}."]
Expand Down Expand Up @@ -124,9 +114,6 @@
}
intersphinx_timeout = 5

# -- sphinx-issues -----------------------------------------------------------
issues_github_path = gh_url.split("https://github.com/")[-1]

# -- autosectionlabels -------------------------------------------------------
autosectionlabel_prefix_document = True

Expand Down Expand Up @@ -241,22 +228,6 @@ def linkcode_resolve(domain: str, info: Dict[str, str]) -> Optional[str]:
return url


# -- sphinx-gallery ----------------------------------------------------------
sphinx_gallery_conf = {
"backreferences_dir": "generated/backreferences",
"doc_module": (f"{package}",),
"examples_dirs": ["../examples"],
"exclude_implicit_doc": {}, # set
"filename_pattern": r"\d{2}_",
"gallery_dirs": ["generated/examples"],
"line_numbers": False,
"plot_gallery": True,
"reference_url": {f"{package}": None},
"remove_config_comments": True,
"show_memory": True,
"within_subsection_order": FileNameSortKey,
}

# -- 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.
Expand Down
1 change: 0 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

api/index
tutorials/index
changes/index

LaPy is an `open-source Python package <project github_>`_ for differential
geometry on triangle and tetrahedra meshes. It includes an FEM solver to
Expand Down
2 changes: 0 additions & 2 deletions examples/README.rst

This file was deleted.

2 changes: 0 additions & 2 deletions lapy/utils/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def sys_info(fid: IO | None = None, developer: bool = False):
developer : bool, default=False
If True, display information about optional dependencies.
"""

ljust = 26
out = partial(print, end="", file=fid)
package = __package__.split(".")[0]
Expand Down Expand Up @@ -82,7 +81,6 @@ def _list_dependencies_info(out: Callable, ljust: int, dependencies: list[str]):
list of dependencies

"""

for dep in dependencies:
# handle dependencies with version specifiers
specifiers_pattern = r"(~=|==|!=|<=|>=|<|>|===)"
Expand Down
1 change: 0 additions & 1 deletion lapy/utils/_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def import_optional_dependency(
ImportError
dependency not found; see raise_error
"""

package_name = INSTALL_MAPPING.get(name)
install_name = package_name if package_name is not None else name

Expand Down
Loading
Loading