ITADN

Use planarity python package to implement sage.graphs.planarity

#42470Openorlitzky 创建于 2026-07-01
O
orlitzkycommented
We have our own cython wrapper for [EAPS](https://github.com/graph-algorithms/edge-addition-planarity-suite), used to implement `is_planar()` in [sage.graphs.planarity](https://github.com/sagemath/sage/blob/develop/src/sage/graphs/planarity.pyx). Upstream however recently released an [official python interface package](https://pypi.org/project/planarity/). We should gradually replace our custom interface with the official one. This will improve compile time for developers, and isolate any ABI/API changes from Sage. It will also become more convenient to use other EAPS functionality. First, the new python package should be supported on the platforms where Sage is supported: - [ ] Conda - [ ] Debian - [ ] Fedora - [ ] Gentoo - [ ] Sage distro - [ ] Ubuntu Afterwards, we can - [ ] Require the new python package by adding it to pyproject.toml - [ ] Replace our planarity.pyx with planarity.py, and rewrite as necessary - [ ] Optionally add a `-Dplanarity` flag to the build system to control the dependency (we don't have this now, but I was planning it)
4 条评论