8000 DOC Ensures that sklearn.base.clone passes numpydoc validation by kkatottn · Pull Request #21557 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC Ensures that sklearn.base.clone passes numpydoc validation #21557

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

Merged
merged 5 commits into from
Nov 22, 2021

Conversation

kkatottn
Copy link
Contributor
@kkatottn kkatottn commented Nov 4, 2021

Reference Issues/PRs

Addresses #21350

What does this implement/fix? Explain your changes.

This PR fixes the following errors that were appearing for numpydoc validation for Base.clone():

  • SS06: Summary should fit in a single line
  • 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
  • SS05: Summary must start with infinitive verb, not third person (e.g. use "Generate" instead of "Generates")
  • RT01: No Returns section found
  • YD01: No Yields section found

Any other comments?

One interesting note: If the summary/description includes the word "yield", it causes the validator to expect a Yields section in addition to a Returns section. However, including both also results in an error, and so it seems like it may be good practice to avoid using the keyword "yield" altogether inside of descriptions.

Copy link
Member
@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

Thanks @kkatottn. Here is some feedback:

Copy link
Member
@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

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

Would you agree with my suggestion @ogrisel ?

kkatottn and others added 3 commits November 15, 2021 13:26
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
@kkatottn
Copy link
Contributor Author

Thanks for the feedback. I made changes, please review when you have chance @adrinjalali @ogrisel

@adrinjalali adrinjalali merged commit d180184 into scikit-learn:main Nov 22, 2021
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Nov 29, 2021
…t-learn#21557)

* sklearn clone numpydoc validation fix

* adjusting docstring and reverting earlier unrelated change

* Update sklearn/base.py

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>

* Update sklearn/base.py

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
…t-learn#21557)

* sklearn clone numpydoc validation fix

* adjusting docstring and reverting earlier unrelated change

* Update sklearn/base.py

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>

* Update sklearn/base.py

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Dec 24, 2021
…t-learn#21557)

* sklearn clone numpydoc validation fix

* adjusting docstring and reverting earlier unrelated change

* Update sklearn/base.py

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>

* Update sklearn/base.py

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
glemaitre pushed a commit that referenced this pull request Dec 25, 2021
* sklearn clone numpydoc validation fix

* adjusting docstring and reverting earlier unrelated change

* Update sklearn/base.py

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>

* Update sklearn/base.py

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
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.

4 participants
0