Qiskit / rustworkx

A high performance Python graph library implemented in Rust.
https://www.rustworkx.org
Apache License 2.0
966 stars 140 forks source link

Add Rust beta + Python beta to the test matrix #1220

Open IvanIsCoding opened 2 weeks ago

IvanIsCoding commented 2 weeks ago

After #1064 we no longer depend on new PyO3 releases to support newer Python versions. Hence this is an attempt to use the latest versions of Rust and Python to catch issues early

IvanIsCoding commented 2 weeks ago

I need to handle SciPy and possibly NumPy not being available. It seemed to easy to be true, but oh well

jakelishman commented 1 week ago

Iirc, Numpy and SciPy started publishing test wheels for 3.12 for their releases after 3.12rc1 came out in early August 2023 (that's the point at which CPython guarantees ABI stability). 3.13rc1 is due on the 30th of July this year.

IvanIsCoding commented 1 week ago

Iirc, Numpy and SciPy started publishing test wheels for 3.12 for their releases after 3.12rc1 came out in early August 2023 (that's the point at which CPython guarantees ABI stability). 3.13rc1 is due on the 30th of July this year.

I will try to make a weekly build with an image that has the toolchain to compile NumPy. I don’t think we need to wait for NumPy pre-built wheels, ideally we’d be able to test 3.14 alpha the day it is available for GitHub actions

jakelishman commented 1 week ago

That's fair, though if you want to go that way, it might be faster to pull the pre-built nightlies from the conda nightlies: https://anaconda.org/scientific-python-nightly-wheels/numpy (etc for scipy).

jakelishman commented 1 week ago

ofc that means also dealing with numpy.next in addition to python.next and rust.next, but that might actually be a good thing, given your intent here?

IvanIsCoding commented 1 week ago

That's fair, though if you want to go that way, it might be faster to pull the pre-built nightlies from the conda nightlies: https://anaconda.org/scientific-python-nightly-wheels/numpy (etc for scipy).

That is a clever idea, I don’t mind using Conda as it is a non-blocking test. We no longer depend on SciPy so it’s just NumPy.

Overall my goal is to test how true our ABI compatibility is. We released 0.15 tested with 3.8-3.12 today but it might run with 3.13 or even with 3.14.

jakelishman commented 1 week ago

I don't think you need to use conda as your package manager - there's a PyPI-compatible interface at https://pypi.anaconda.org/scientific-python-nightly-wheels/simple, so you can point pip at it with pip install -i <url> numpy scipy. I can't remember what the rules on repo fallback are, and there was some sort of supply-chain attack based on that premise within the last year, so it might have changed - if so, you might need to ensure your other dependencies are manually satisfied from regular PyPI first.