Skip to content
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

Add HAS_PYGMENTS lazy tester #9944

Merged
merged 4 commits into from
Jul 10, 2023
Merged

Conversation

jakelishman
Copy link
Member

Summary

This somehow slipped through my nets when I added all the lazy testers. We hope to drop support for the custom Pygments lexers in the future, but in the mean time, this is the correct way to test for things, and having an extra lazy tester doesn't hurt us.

Details and comments

Part of preparing to remove the built-in OpenQASM 2 Pygments tooling (and the qiskit.qasm package as a whole).

@jakelishman jakelishman added the Changelog: New Feature Include in the "Added" section of the changelog label Apr 11, 2023
@jakelishman jakelishman added this to the 0.25.0 milestone Apr 11, 2023
@jakelishman jakelishman requested review from a team and woodsp-ibm as code owners April 11, 2023 15:25
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

This somehow slipped through my nets when I added all the lazy testers.
We hope to drop support for the custom Pygments lexers in the future,
but in the mean time, this is the correct way to test for things, and
having an extra lazy tester doesn't hurt us.
@coveralls
Copy link

coveralls commented Apr 11, 2023

Pull Request Test Coverage Report for Build 5489481952

  • 7 of 24 (29.17%) changed or added relevant lines in 6 files are covered.
  • 35 unchanged lines in 9 files lost coverage.
  • Overall coverage decreased (-0.03%) to 85.946%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/qasm/init.py 4 6 66.67%
qiskit/qasm/pygments/init.py 0 3 0.0%
qiskit/qasm/pygments/lexer.py 0 3 0.0%
qiskit/tools/jupyter/library.py 0 4 0.0%
qiskit/circuit/quantumcircuit.py 2 7 28.57%
Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 93.76%
qiskit/qasm/pygments/init.py 1 0%
qiskit/tools/jupyter/library.py 1 0%
qiskit/transpiler/passes/synthesis/unitary_synthesis.py 1 90.39%
qiskit/circuit/quantumcircuit.py 2 94.05%
qiskit/extensions/quantum_initializer/squ.py 2 80.0%
crates/qasm2/src/lex.rs 4 90.38%
qiskit/qasm/pygments/lexer.py 11 0%
crates/qasm2/src/parse.rs 12 96.65%
Totals Coverage Status
Change from base Build 5488180890: -0.03%
Covered Lines: 71495
Relevant Lines: 83186

💛 - Coveralls

mtreinish
mtreinish previously approved these changes Jul 5, 2023
Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this seems fairly straightforward. I wonder if there are any other optional dependencies hiding without dedicated checkers elsewhere in the repo.

@mtreinish mtreinish added this pull request to the merge queue Jul 10, 2023
Merged via the queue into Qiskit:main with commit 645eb0e Jul 10, 2023
@jakelishman jakelishman deleted the has-pygments branch July 10, 2023 17:10
ElePT pushed a commit to ElePT/qiskit-algorithms that referenced this pull request Jul 27, 2023
* Add `HAS_PYGMENTS` lazy tester

This somehow slipped through my nets when I added all the lazy testers.
We hope to drop support for the custom Pygments lexers in the future,
but in the mean time, this is the correct way to test for things, and
having an extra lazy tester doesn't hurt us.

* Remove unused import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants