-
Notifications
You must be signed in to change notification settings - Fork 65
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
Pytest Warnings #212
Pytest Warnings #212
Conversation
Codecov Report
@@ Coverage Diff @@
## master #212 +/- ##
========================================
- Coverage 96.0% 95.9% -0.1%
========================================
Files 146 146
Lines 2954 2956 +2
Branches 728 728
========================================
- Hits 2838 2837 -1
- Misses 71 74 +3
Partials 45 45
... and 1 file with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
122ba3f
to
d6ccaad
Compare
0734f09
to
07f8154
Compare
957863b
to
e2acc0d
Compare
e2acc0d
to
6a3f236
Compare
https://github.com/vprusso/toqito/actions/runs/6799327748/job/18485402911#step:5:668 Edit: |
@vprusso There are 3 warnings raised in the virtual environment by 2 third-party packages which are still unresolved. Based on your previous comment, I am marking this PR ready for review. |
c59a709
to
c2dfa0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few minor comments in the diff, but overall, I think it looks good!
I'll approve for now modulo some of those minor changes. Feel free to reach out and ask any questions or respond with any disagreements you may have about my comments!
pyproject.toml
Outdated
@@ -68,3 +68,8 @@ sphinx_rtd_theme = "*" | |||
[build-system] | |||
requires = ["setuptools","poetry>=0.12"] | |||
build-backend = "poetry.masonry.api" | |||
|
|||
[tool.pytest.ini_options] | |||
filterwarnings = ["ignore:::cvxpy"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I'm not sure if we want to ignore the CVXPY stuff. Should we keep these warnings in just in case they are actually useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the third party package deprecation warnings cannot be handled on our end. I feel it does clog up the pytest-cov output. The way I understand this, all the deprecations related to cvxpy dependencies will be ignored. But we should still be able to get the Deprecation warnings from cvxpy itself. I'll double check and link somethings I found later.
Edit: @vprusso you are right. I think this does ignore the warnings that we would prefer to not ignore. Will work on these.
tests/test_matrix_props/test_is_block_positive.py::test_swap_operator_is_block_positive[4]
tests/test_matrix_props/test_is_block_positive.py::test_is_block_positive
tests/test_state_props/test_has_symmetric_extension.py::test_has_symmetric_extension_level_2_entangled_false_ppt
/home/runner/.cache/pypoetry/virtualenvs/toqito-QfgmswsN-py3.10/lib/python3.10/site-packages/cvxpy/problems/problem.py:164: UserWarning: Constraint #2 contains too many subexpressions. Consider vectorizing your CVXPY code to speed up compilation.
warnings.warn(f"Constraint #{i} contains too many subexpressions. "
tests/test_matrix_props/test_is_block_positive.py::test_choi_is_block_positive
tests/test_matrix_props/test_is_block_positive.py::test_is_block_positive
tests/test_state_props/test_has_symmetric_extension.py::test_has_symmetric_extension_level_2_entangled_false_ppt
/home/runner/.cache/pypoetry/virtualenvs/toqito-QfgmswsN-py3.10/lib/python3.10/site-packages/cvxpy/problems/problem.py:164: UserWarning: Constraint #4 contains too many subexpressions. Consider vectorizing your CVXPY code to speed up compilation.
warnings.warn(f"Constraint #{i} contains too many subexpressions. "
tests/test_matrix_props/test_is_block_positive.py::test_is_block_positive
tests/test_state_props/test_has_symmetric_extension.py::test_has_symmetric_extension_level_2_entangled_false_ppt
/home/runner/.cache/pypoetry/virtualenvs/toqito-QfgmswsN-py3.10/lib/python3.10/site-packages/cvxpy/problems/problem.py:164: UserWarning: Constraint #3 contains too many subexpressions. Consider vectorizing your CVXPY code to speed up compilation.
warnings.warn(f"Constraint #{i} contains too many subexpressions. "
tests/test_state_props/test_has_symmetric_extension.py::test_has_symmetric_extension_level_2_entangled_false_ppt
/home/runner/.cache/pypoetry/virtualenvs/toqito-QfgmswsN-py3.10/lib/python3.10/site-packages/cvxpy/problems/problem.py:164: UserWarning: Constraint #5 contains too many subexpressions. Consider vectorizing your CVXPY code to speed up compilation.
warnings.warn(f"Constraint #{i} contains too many subexpressions. "
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. For the "too many subexpressions" it's arguable whether we want to solve them in this diff or not. If it looks like doing that would be a rabbit hole, I'd say just keep the warnings as we might be able to address this later in another diff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the warning from cvxpy
is not that helpful because they are not pointing to which exact function/constraint is problematic. It's a rabbit hole because the problematic line is not pointed out.
Edit: Decided to create a separate issue for this.
tests/test_channel_metrics/test_completely_bounded_trace_norm.py
Outdated
Show resolved
Hide resolved
Note : I have commented out a test in c2d8d89 because it was failing. This is the same test as in the description of another issue. #204 (comment) I will tackle this problem after this PR's objective is completed (needed builds to pass). Changing package versions finally led to the failure that I was observing locally. Adding an older comment for previously observed behavior:
|
8c800c0
to
22c4430
Compare
That is odd. Your approach sounds good though. Solving it here is outside of scope, but so long as it's tagged in another issue and dealt with there, that makes sense! |
Merging this. Two unfinished changes have their own issues. |
Awesome. Great work, @purva-thakre ! |
Description
Fixes #196
Second attempt to fix this. Previous PR (#210) had ended up with commits from other branches in a git rebase.
Todos
Notable points that this PR has either accomplished or will accomplish.
Questions
Status