Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC ensures that sklearn.metrics.cluster._supervised.adjusted_rand_score passes numpydoc validation. #24185

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

Closed
wants to merge 6 commits into from

Conversation

zadilkhwaja
Copy link
Contributor

Reference Issues/PRs

Adressess #21350

What does this implement/fix? Explain your changes.

This PR ensures that sklearn.metrics.cluster._supervised.adjusted_rand_score passes numpydoc validation.

  • Remove function from the list FUNCTION_DOCSTRING_IGNORE_LIST
  • Added periods

    @cmarmo cmarmo added No Changelog Needed Validation related to input validation labels Aug 29, 2022
    @Micky774 Micky774 added Documentation and removed Validation related to input validation labels Aug 31, 2022
    @Micky774
    Copy link
    Contributor

    Hey there @zadilkhwaja, thanks for the PR (and sorry for the delay)! Could you update your title as specified in the issue? Specifically:

    1. "Include the function name in the title of the pull request. For example: "DOC Ensures that config_context passes numpydoc validation".

    And you still have a couple errors in the numpydoc validation to resolve, namely:

    E - GL03: Double line break found; please use only one blank line to separate sections or paragraphs, and do not leave blank lines at the end of docstrings
    E - GL07: Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, References, Examples
    

    Please let me know if you have any questions or concerns, thanks!

    @zadilkhwaja zadilkhwaja changed the title validation DOC ensures that sklearn.metrics.cluster._supervised.adjusted_rand_score passes numpydoc validation. Aug 31, 2022
    @zadilkhwaja
    Copy link
    Contributor Author

    Hey there @zadilkhwaja, thanks for the PR (and sorry for the delay)! Could you update your title as specified in the issue? Specifically:

    1. "Include the function name in the title of the pull request. For example: "DOC Ensures that config_context passes numpydoc validation".

    And you still have a couple errors in the numpydoc validation to resolve, namely:

    E - GL03: Double line break found; please use only one blank line to separate sections or paragraphs, and do not leave blank lines at the end of docstrings
    E - GL07: Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, References, Examples
    

    Please let me know if you have any questions or concerns, thanks!

    Sorry I'm new to opensource and scikit learn. I'm not sure how to resolve these errors. Could you please guide me.

    @Micky774
    Copy link
    Contributor

    Sorry I'm new to opensource and scikit learn. I'm not sure how to resolve these errors. Could you please guide me.

    Sure, I'd be happy to! First off, thank you for updating the title -- that part looks good now!

    The two errors refer to the current docstring for adjusted_rand_score

    E - GL03: Double line break found; please use only one blank line to separate sections or paragraphs, and do not leave blank lines at the end of docstrings

    This error can be a bit annoying. It means that somewhere there is an unwanted extra (empty) line. So the difference between:

    First line!
    
    Second line!
    

    and

    First line!
    
    
    Second line!
    

    As the error says, this is most likely between sections or between paragraphs, however it could also be an extra blank line at then end of the docstring.

    The second error is a bit simpler:

    E - GL07: Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, References, Examples

    Sections are denoted with the title underlined by dashes, e.g.

    Section 1
    ----------
    

    As the error says, there is a correct order for them to follow: Parameters, Returns, See Also, References, Examples. Currently, the docstring sections are in this incorrect order: Parameters, Returns, Examples, References, See Also. Solving this amounts to just moving around the sections so that they're in the right order.

    If you still have any questions or doubts please let me know! If you end up stuck while trying to solve these, I can take a look and show you the necessary changes. Hope this helps :)

    Rearranged sections and removed extra line from the end of the file.
    @zadilkhwaja
    Copy link
    Contributor Author

    zadilkhwaja commented Sep 1, 2022

    Hi! Thankyou @Micky774 for helping. I've made some changes pls check.

    Copy link
    Contributor

    @stefmolin stefmolin left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    @zadilkhwaja - Congrats on your first scikit-learn PR! The code is currently failing the black formatting check – I've commented on the spots that need to be fixed to pass 😄

    @zadilkhwaja
    Copy link
    Contributor Author

    zadilkhwaja commented Sep 6, 2022

    Thankyou everyone for helping. I think someone already worked on this & merged a PR 3 days ago.

    @ArturoAmorQ
    Copy link
    Member

    Thankyou everyone for helping. I think someone already worked on this & merged a PR 3 days ago.

    Indeed, it was solved in #24096, but I am glad this did not discourage you. I am looking forward to seeing your next contribution :) This PR can be safely closed.

    @zadilkhwaja zadilkhwaja closed this Sep 6, 2022
    @zadilkhwaja zadilkhwaja deleted the newBranch branch September 6, 2022 09:07
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    5 participants