-
Notifications
You must be signed in to change notification settings - Fork 6
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
Improve the coverage of the tests and fix some minor bugs #64
base: main
Are you sure you want to change the base?
Conversation
Tis pull request is complementary to the pull request on the estimators #58 and #59 for having coverage close to 99%. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #64 +/- ##
==========================================
+ Coverage 77.11% 80.19% +3.07%
==========================================
Files 46 45 -1
Lines 2465 2621 +156
==========================================
+ Hits 1901 2102 +201
+ Misses 564 519 -45 ☔ View full report in Codecov by Sentry. |
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.
Thx for taking care of that, this is super important.
Please take care of the syntax aspects.
How much does test time increase with this PR ? We need to be careful to keep it limited.
@@ -41,11 +43,18 @@ def multivariate_1D_simulation( | |||
|
|||
seed : int | |||
Seed used for generating design matrix and noise. | |||
|
|||
nb_group : int |
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.
nb_group : int | |
n_groups : int |
@@ -16,6 +16,8 @@ def multivariate_1D_simulation( | |||
rho=0.0, | |||
shuffle=True, | |||
seed=0, | |||
nb_group=0, |
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.
nb_group=0, | |
n_groups=0, |
result_th_screen_bad = dcrt_zero( | ||
X, | ||
y, | ||
screening_threshold = 0, |
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.
screening_threshold = 0, | |
screening_threshold=0, |
mu, Sigma = _estimate_distribution(X, cov_estimator="graph_lasso") | ||
|
||
def test_estimate_distribution_lasso(): | ||
SEED = 42 |
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.
capitalized variables are global in a module (constants), so it does not make sense to define such a variable in a function.
The time for the tests is still less than 5 min, as you can see in the report below. |
8min is still fine, but we must be super careful here, because these numbers increase steadily. |
I added in this pull request some simple tests (raise exceptions, used some options ...)
The aim of this pull request is to increase the coverage before starting to make a lot of modifications to the library.
The new tests are simple due to my lack of knowledge of the details of the different methods.
I don't take the time to format and comment on the additional tests; I will do it when I will reformat each method.