Skip to content
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

[docs][scikit-learn] removed duplicated docstrings #3164

Merged
merged 4 commits into from
Jun 22, 2020
Merged

Conversation

StrikerRUS
Copy link
Collaborator

Refer to sphinx-doc/sphinx#7817 (comment).

Completely remove attribute names from __init__ docstring because new Sphinx version doesn't fully comply with numpy docstring guide in terms of

Attributes that are properties and have their own docstrings can be simply listed by name:
https://numpydoc.readthedocs.io/en/latest/format.html#class-docstring

Ugly constructions like :obj: are needed to workaround pydocstyle test:

./python-package/lightgbm/sklearn.py:680 in public method `best_score_`:
        D401: First line should be in imperative mood; try rephrasing (found 'dict')
./python-package/lightgbm/sklearn.py:680 in public method `best_score_`:
        D403: First word of the first line should be properly capitalized ('Dict', not 'dict')
./python-package/lightgbm/sklearn.py:687 in public method `best_iteration_`:
        D403: First word of the first line should be properly capitalized ('Int', not 'int')
./python-package/lightgbm/sklearn.py:694 in public method `objective_`:
        D401: First line should be in imperative mood; try rephrasing (found 'string')
./python-package/lightgbm/sklearn.py:694 in public method `objective_`:
        D403: First word of the first line should be properly capitalized ('String', not 'string')
./python-package/lightgbm/sklearn.py:708 in public method `evals_result_`:
        D401: First line should be in imperative mood; try rephrasing (found 'dict')
./python-package/lightgbm/sklearn.py:708 in public method `evals_result_`:
        D403: First word of the first line should be properly capitalized ('Dict', not 'dict')
./python-package/lightgbm/sklearn.py:715 in public method `feature_importances_`:
        D205: 1 blank line required between summary line and description (found 0)
./python-package/lightgbm/sklearn.py:715 in public method `feature_importances_`:
        D400: First line should end with a period (not 's')
./python-package/lightgbm/sklearn.py:715 in public method `feature_importances_`:
        D403: First word of the first line should be properly capitalized ('Array', not 'array')
./python-package/lightgbm/sklearn.py:729 in public method `feature_name_`:
        D403: First word of the first line should be properly capitalized ('Array', not 'array')
./python-package/lightgbm/sklearn.py:891 in public method `classes_`:
        D403: First word of the first line should be properly capitalized ('Array', not 'array')

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

oy yeah it is annoying to have to use obj. But I think this is better than having a ceiling on Sphinx. Thanks!

@StrikerRUS StrikerRUS closed this Jun 14, 2020
@StrikerRUS StrikerRUS reopened this Jun 14, 2020
@StrikerRUS
Copy link
Collaborator Author

@jameslamb @guolinke Seems that neither closing-reopening nor rebasing can eliminate obsolete GitHub Actions checks. Refer to #3065 (comment).

@jameslamb
Copy link
Collaborator

@jameslamb @guolinke Seems that neither closing-reopening nor rebasing can eliminate obsolete GitHub Actions checks. Refer to #3065 (comment).

unfortunately I can't see the settings to confirm, but it must be that those old "required" ones are still listed in the settings :/

@jameslamb
Copy link
Collaborator

by the way @StrikerRUS , I asked if it is possible to just say "All GitHub Actions must pass" so we don't have to keep dealing with this...it is not :/

https://gh.neting.ccmunity/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants