[TEST] Reduced warnings in test suite #847
The version juggling between sklearn versions in the code is getting annoying. I'll try to think of a more robust way to handle this in tests and in the CI.
Codecov Report
:x: Patch coverage is
70.00000% with 3 lines in your changes missing coverage. Please review.:white_check_mark: Project coverage is 97.42%. Comparing base (
1b50ff0) to head (ed74336).:warning: Report is 1 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/hidimstat/\_utils/utils.py | 70.00% | 3 Missing :warning: |
<details><summary>Additional details and impacted files</summary>
@@ Coverage Diff @@
## main #847 +/- ##
==========================================
- Coverage 97.53% 97.42% -0.11%
==========================================
Files 37 37
Lines 2592 2600 +8
==========================================
+ Hits 2528 2533 +5
- Misses 64 67 +3
</details>
:umbrella: View full report in Codecov by Harness.
:loudspeaker: Have feedback on the report? Share it here.
<details><summary> :rocket: New features to boost your workflow: </summary>
</details>
I don't understand why CodeCov doesn't detect that the new code is tested. I had to add these lines to make sure that the existing tests work.
Should we also comment that this will be removed in release v0.6?
Approved these changes.
LGTM, thx.
Yes, absolutely
jpaillard
GrituX
A lot of warnings issued in the test suite came from internal DeprecationWarnings, so I filtered those out. I also made a few fixes in
hidimstat._utils.utils._make_sklearn_estimator()function to handle deprecation warnings from the sklearn library, and attribute changes. This reduces all warnings from 977 to 239.The remaining ones are mostly issued in
test_knockoff.py, typically:UserWarning: The equi-correlated matrix for knockoffs is not positive definite. Reduce the value of distance by [...]ConvergenceWarning: Objective did not converge. You might want to increase the number of iterations, check the scale of the features or consider increasing regularisationdue toLassoCVnot converging.GaussianKnockoffs issue this UserWarning very often, because it happens in a loop. I think it might be a useful information to have once, but I don't know if it's useful to have it at each iteration of the algorithm.