Skip to content

Support SymPDE master - #17

Open
FrederikSchnack wants to merge 6 commits into
pyccel:masterfrom
FrederikSchnack:update_sympde
Open

FrederikSchnack wants to merge 6 commits into
pyccel:masterfrom
FrederikSchnack:update_sympde

Conversation

@FrederikSchnack

@FrederikSchnack FrederikSchnack commented Nov 20, 2026 •

Copy link
Copy Markdown

Summary

This PR adapts GeLaTo to SymPDE master and to the SymPy versions it requires. All 27 unit tests pass with SymPDE master (pyccel/sympde@b22ced9) and SymPy 1.14.

Context

SymPDE will change further before its next release (for example the new multipatch API in pyccel/sympde#188). This PR is still needed now, because PSYDAC is being updated to SymPDE master, and PSYDAC imports GeLaTo in psydac.api: as long as GeLaTo doesn't work with SymPDE master, PSYDAC can't even be imported, let alone tested.

The SymPDE requirement is therefore a fixed commit of SymPDE master for now. When SymPDE is released, it will be replaced by that release, together with any changes needed for the later SymPDE PRs.

Changes

1. Import SymPDE objects from sympde.api

pyccel/sympde#194 removed the re-exports from the SymPDE subpackage initializers (sympde.expr, sympde.topology, sympde.calculus, sympde.core, ...). It also added the public namespace sympde.api, which includes the 1D forms used by GeLaTo.

from sympde.api import BilinearForm, TensorExpr, SymbolicExpr, SymbolicDeterminant
from sympde.api import Mass as MassForm

Every SymPDE object GeLaTo uses is in sympde.api, so no imports from internal SymPDE modules are needed.

2. Import the SymPy cache from sympy.core in the unit tests

SymPDE master requires sympy >= 1.12, < 1.15 (pyccel/sympde#193). In these versions from sympy import cache fails, which makes the teardown functions of the unit tests fail. They now use from sympy.core import cache, as SymPDE and PSYDAC do.

3. Require SymPDE master and SymPy 1.12 to 1.14

setup.py now requires the same SymPy range as SymPDE instead of sympy>=1.2. Since SymPDE master hasn't been released yet, it requires a fixed commit:

'sympde @ git+https://github.com/pyccel/sympde.git@b22ced9c0ebb78db31fea4fe70e27cc52e144000',

This must be replaced by the next SymPDE release before GeLaTo is released on PyPI, because PyPI rejects packages with direct URL dependencies (see the TODO in setup.py).

4. Fix CI

SymPDE requires Python >= 3.9, so the Python versions in the CI workflow change from 3.7–3.10 to 3.10–3.14. The workflow also installs pytest, which the current runner images no longer provide.

SymPDE master no longer re-exports objects from its subpackage
initializers (pyccel/sympde#194), so imports such as
`from sympde.expr import BilinearForm` fail. Import all SymPDE objects in
the library, the unit tests and the notebooks from the public namespace
`sympde.api`, which contains every object used by GeLaTo.
`from sympy import cache` fails with the SymPy versions required by
SymPDE master (1.12 to 1.14), which makes the teardown functions of the
unit tests fail. Import the module from `sympy.core`, as SymPDE and
PSYDAC do.
Require SymPDE at commit pyccel/sympde@b22ced9 of its master branch,
which provides `sympde.api`, and the SymPy versions it requires
(pyccel/sympde#193). The commit must be replaced by the next SymPDE
release before GeLaTo is released on PyPI, which rejects direct URL
dependencies.
SymPDE requires Python >= 3.9, so test the same Python versions as
SymPDE instead of 3.7 to 3.10.
The CI jobs fail with `pytest: command not found`, because the workflow
never installs pytest and the current runner images don't provide it.
Install it together with GeLaTo, and run it with `python -m pytest` to
use the Python version of the job.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant