-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run test suite during release builds #12202
Comments
This issue is participating on UnitaryHack 2024, between May 29 and June 12, 2024. Because the nature of the event, there is no need to request to be assigned: just go ahead and PR your fix. The first/best PR can get the bounty (or it could be shared if they complement each other). |
Hi, I'm working on this issue as part of the unitaryHACK event. I'm unsure whether unittests and smoke tests (described as quicker tests for Tier 2 platforms) already exist in the Qiskit project and so we should just update cibuildwheel so that it runs the necessary unittests. Thank you in advance for your attention. |
The unit test suite does already exist, that's what we run on every CI test job already. The smoke tests I mentioned don't exist as a category yet. It would be about selecting a limited subset of the larger complete test suite to run. That way we have some test coverage coverage but also a reasonable runtime. |
Hi, I thought about performing the tests using the 'tox' command for Tier 1 and 'tox -- tests/smoke' for Tier 2 Linux aarch64, changing the pyproject.toml file like this:
|
That looks like the basic idea, the only issue is you can't use |
UnitaryHACK 2024 finished. So this issue goes back to standard status. |
Can I be assigned to this issue, I'd like to take a look at it! |
This commit updates the cibuildwheel configuration to run the unittests as the test/validation step after building and auditing the wheels. Previously we were running a standalone "example" script as the validation because at one time many years ago StochasticSwap was the only compiled code in qiskit so this was sufficient coverage. But now that Qiskit is >16% written in Rust as of this commit this script is not sufficient to validate the wheels are functional prior to uploading to pypi. For tier 1 platforms this updates the cibuildwheel configuration to run the full unit test suite, on tier 2 platforms (which is currently only linux aarch64) we run just the transpiler integration tests as we have more time pressure to run the tests on those platforms and don't have the budget to run the full test suite on all supported python versions. Fixes Qiskit#12202
This commit updates the cibuildwheel configuration to run the unittests as the test/validation step after building and auditing the wheels. Previously we were running a standalone "example" script as the validation because at one time many years ago StochasticSwap was the only compiled code in qiskit so this was sufficient coverage. But now that Qiskit is >16% written in Rust as of this commit this script is not sufficient to validate the wheels are functional prior to uploading to pypi. For tier 1 platforms this updates the cibuildwheel configuration to run the full unit test suite, on tier 2 platforms (which is currently only linux aarch64) we run just the transpiler integration tests as we have more time pressure to run the tests on those platforms and don't have the budget to run the full test suite on all supported python versions. Fixes Qiskit#12202
This commit updates the cibuildwheel configuration to run the unittests as the test/validation step after building and auditing the wheels. Previously we were running a standalone "example" script as the validation because at one time many years ago StochasticSwap was the only compiled code in qiskit so this was sufficient coverage. But now that Qiskit is >16% written in Rust as of this commit this script is not sufficient to validate the wheels are functional prior to uploading to pypi. For tier 1 platforms this updates the cibuildwheel configuration to run the full unit test suite, on tier 2 platforms (which is currently only linux aarch64) we run just the transpiler integration tests as we have more time pressure to run the tests on those platforms and don't have the budget to run the full test suite on all supported python versions. Fixes #12202
What should we add?
Currently our release builds are configured to run this small test script: https://github.com/Qiskit/qiskit/blob/main/examples/python/stochastic_swap.py which executes the
StochasticSwap
transpiler pass. This is an historical artifact from before the use of Rust by qiskit, the stochastic swap pass was our only compiled extension (written in Cython) and the script was exercising solely that to speed up the validation phase of release builds. However in the intervening years more and more of Qiskit is being written in rust (with the 1.1.0 release poised to be >10% written in Rust by lines of code). We should update our wheel build configuration to instead run the unittests to validate that the binaries we publish work on all our supported python versions more broadly than just a single transpiler pass.This primarily involves updating the
cibuildwheel
configuration:qiskit/pyproject.toml
Lines 136 to 163 in 9ede1b6
cibuildwheel
test phase.There is an open question, whether we should execute the full test suite or just a subset of the tests. I think for our tier 1 platforms (https://docs.quantum.ibm.com/start/install#operating-system-support) we probably should have enough CI time to run the full test suite. But for our tier 2 platforms this might be tricky because we run those builds under QEMU emulation. So for tier 2 platforms we might want a "smoke test" subset of the test suite that executes quicker because everything is very slow under emulation.
The text was updated successfully, but these errors were encountered: