Repository navigation
Support SymPDE master - #17
Open
FrederikSchnack wants to merge 6 commits into
Open
FrederikSchnack wants to merge 6 commits into
FrederikSchnack wants to merge 6 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.apipyccel/sympde#194 removed the re-exports from the SymPDE subpackage initializers (
sympde.expr,sympde.topology,sympde.calculus,sympde.core, ...). It also added the public namespacesympde.api, which includes the 1D forms used by GeLaTo.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.corein the unit testsSymPDE master requires
sympy >= 1.12, < 1.15(pyccel/sympde#193). In these versionsfrom sympy import cachefails, which makes the teardown functions of the unit tests fail. They now usefrom sympy.core import cache, as SymPDE and PSYDAC do.3. Require SymPDE master and SymPy 1.12 to 1.14
setup.pynow requires the same SymPy range as SymPDE instead ofsympy>=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.