DOC Ensures that plot_roc_curve passes numpydoc validation#21547
DOC Ensures that plot_roc_curve passes numpydoc validation#21547ogrisel merged 16 commits intoscikit-learn:mainfrom MrinalTyagi:main
Conversation
Addresses #21350 This PR ensures precision_score is compatible with numpydoc: 1. Remove sklearn.metrics._plot.roc_curve.plot_roc_curve from DOCSTRING_IGNORE_LIST. 2. Verify that all tests are passing.
|
@thomasjpfan @glemaitre Can u help me fix the conflicts? |
sklearn/metrics/_plot/roc_curve.py
Outdated
| 1.2. Use one of the following class methods: | ||
| :func:`~sklearn.metrics.RocCurveDisplay.from_predictions` or | ||
| :func:`~sklearn.metrics.RocCurveDisplay.from_estimator`. | ||
|
|
There was a problem hiding this comment.
you need to move these lines as it was previously (see the diff).
There was a problem hiding this comment.
did as you directed but tests still failing
ogrisel
left a comment
There was a problem hiding this comment.
This separating blank line is still needed but you should not add trailing whitespace:
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
|
If i move the deprecation warning to the original position, tests fail on my local machine. @glemaitre |
Can you please share the error message or push the change so that we all see the error on the CI. I agree with @glemaitre that we want the deprecated directive after the main elements of the docstring. |
|
Hi @MrinalTyagi
If you can find some time to fix the lint error then tests will be run on the CI and it will be easier to find what is going wrong. Thanks! |
thank you for the help. :) |
|
Can someone merge this pr? |
There was a problem hiding this comment.
Can someone merge this pr?
No since you have not addressed this comment #21547 (comment) which is a rephrasing of the first comment of @glemaitre: #21547 (comment) (if I understand correctly).
Please move the deprecation directive lower in the docstring to keep the most important information first. If you get an error message you do not understand when you run the tests locally, please paste it here as a comment so that we can try to help you or just push the change to the PR so that we have an opportunity to read the message in the CI report.
|
Ok I understand the problem: the Since we already have the deprecation information in the altered docstring information from the We could probably improve the For now, let's just remove the redundant |
really sorry for not responding to the same as I thought all tests were clear so its all working fine. |
By this you mean to completely remove this section of text, right?
|
This reverts commit dced759.
|
@glemaitre can u update me if any changes is required as I by mistakenly pushed another issue work in this pr. Sorry for the inconvenience as I am new to this. |
|
@glemaitre @ogrisel any update on the pr? Let me know if I need to perform any modifications. |
|
@glemaitre @ogrisel Please tell me how to proceed with the following pr as I have already implemented all the changes requested |
|
@ogrisel Please tell me how to proceed. |
ogrisel
left a comment
There was a problem hiding this comment.
@MrinalTyagi +1 for completely removing the redundant section in the docstring and only keep the decorator.
Then LGTM (assuming CI is green).
glemaitre
left a comment
There was a problem hiding this comment.
The documentation looks much nicer.
LGTM. I will merge once all CI will be green.
Thanks @MrinalTyagi
|
Thanks :) |
|
Merged. Thanks again @MrinalTyagi and sorry for the slow reply. |
…arn#21547) Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
…arn#21547) Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Reference Issues/PRs
Addresses #21350
This PR ensures plot_roc_curve is compatible with numpydoc:
What does this implement/fix? Explain your changes.
Any other comments?