unitaryfund / mitiq

Mitiq is an open source toolkit for implementing error mitigation techniques on most current intermediate-scale quantum computers.
https://mitiq.readthedocs.io
GNU General Public License v3.0
359 stars 157 forks source link

Remove duplicate import #2312

Closed cosenal closed 5 months ago

cosenal commented 5 months ago

Description

  1. Removes a duplicate import (and sort them while we are at it)
  2. Rename a test folder to tests otherwise the tests themselves are picked up by codecov, because of this: https://github.com/unitaryfund/mitiq/blob/8c24a9bddd4d6213cdd39fae2d750e55247e82a9/.coveragerc#L3
codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.23%. Comparing base (5365e7a) to head (98f2080). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2312 +/- ## ========================================== - Coverage 98.32% 98.23% -0.10% ========================================== Files 91 87 -4 Lines 4308 4068 -240 ========================================== - Hits 4236 3996 -240 Misses 72 72 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cosenal commented 5 months ago

The codecov/project failure looks like a hiccup on codecov side. Upon inspection of the coverage report there are no files affected.

jordandsullivan commented 5 months ago

Hm, do you know why codecov is complaining that this line was an "indirect change?" https://app.codecov.io/gh/unitaryfund/mitiq/pull/2312/indirect-changes

cosenal commented 5 months ago

Hm, do you know why codecov is complaining that this line was an "indirect change?" https://app.codecov.io/gh/unitaryfund/mitiq/pull/2312/indirect-changes

It's unrelated to this PR. What is happening is that the order in which the tests get executed affects that line. Since the order test is random, that line ends up being covered or not. In fact, if you look at the list of recent coverage reports, you can see the score oscillates between 98.29% and 98.33%. I will try to find the root cause of this "non-determinism"

cosenal commented 5 months ago

@jordandsullivan Please take another look. This time the codecov makes sense, as I removed those 4 test files from the coverage.