Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
5.28k stars 2.37k forks source link

Skip uninstallable tags in QPY backwards compatibility tests #13202

Closed jakelishman closed 1 month ago

jakelishman commented 2 months ago

Summary

When a tag has been made, but the package has not yet landed on PyPI, the QPY job fails in the environment-building step. This is not actually a failure of the QPY backwards-compatibility guarantees, and it isn't the job of the QPY tests to detect a bad tag anyway.

Details and comments

Since this commit is an acknowledgement that not every tag might be a valid version, and my editor was complaining about the safety of the various script calls, I made the variable expansion safe against word splitting, just in case.

qiskit-bot commented 2 months ago

One or more of the following people are relevant to this code:

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 11013854521

Details


Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.02%
qiskit/transpiler/passes/synthesis/unitary_synthesis.py 2 88.26%
crates/qasm2/src/lex.rs 6 92.23%
qiskit/synthesis/two_qubit/xx_decompose/decomposer.py 7 90.91%
crates/qasm2/src/parse.rs 18 96.23%
<!-- Total: 34 -->
Totals Coverage Status
Change from base Build 10966478124: -0.04%
Covered Lines: 73460
Relevant Lines: 82764

💛 - Coveralls
jakelishman commented 1 month ago

For the bash scripts venv renaming: the main problem for me locally was that they were all making a lot of strong assumptions about the working directory they were executed from, and one of them was making assumptions about the existence of a Python venv at a particular relative path, which meant I had to keep recreating the entire CI setup in order to test a single script. I generally agree the changes make it not as pleasant to read, but they decouple the scripts from particular working directories, and let me pass more information explicitly into each script, so it was easier to run things locally.

jakelishman commented 1 month ago

@Mergifyio backport stable/1.2 stable/0.46

mergify[bot] commented 1 month ago

backport stable/1.2 stable/0.46

✅ Backports have been created

* [#13216 Skip uninstallable tags in QPY backwards compatibility tests (backport #13202)](https://github.com/Qiskit/qiskit/pull/13216) has been created for branch `stable/1.2` but encountered conflicts * [#13217 Skip uninstallable tags in QPY backwards compatibility tests (backport #13202)](https://github.com/Qiskit/qiskit/pull/13217) has been created for branch `stable/0.46` but encountered conflicts