Skip to content

Fix minor typos in docstrings#889

Merged
mloning merged 6 commits intosktime:mainfrom
GuzalBulatova:fix-boxcox-doc-884
Jun 1, 2021
Merged

Fix minor typos in docstrings#889
mloning merged 6 commits intosktime:mainfrom
GuzalBulatova:fix-boxcox-doc-884

Conversation

@GuzalBulatova
Copy link
Contributor

@GuzalBulatova GuzalBulatova commented May 20, 2021

Fixes #884 (partially)

What does this implement/fix? Explain your changes.

Fixes minor typos in transformations/series/boxcox.py

Does your contribution introduce a new dependency? If yes, which one?

No.

What should a reviewer concentrate their feedback on?

The function _eval_pearsonr is an inline function, I've slightly changed the docstring, but haven't converted it to a standard function docstr. Is it ok?

@GuzalBulatova
Copy link
Contributor Author

GuzalBulatova commented May 20, 2021

Pydocstyle's suggestions seem irrelevant in these cases to me.

  1. Should I add docstring to these 3 methods?

    line 47 in public method fit: D102: Missing docstring in public method

    line 57 in public method transform: D102: Missing docstring in public method

    line 63 in public method inverse_transform: D102: Missing docstring in public method

  2. And I'm still not sure about _eval_pearsonr:

    sktime/transformations/series/boxcox.py:114 in private nested function _eval_pearsonr: D205: 1 blank line required between summary line and description (found 0)

    sktime/transformations/series/boxcox.py:114 in private nested function _eval_pearsonr: D400: First line should end with a period (not 't')

  3. What to do generally? Just follow the pydocstyle (because if anybody changes this file in the future will get the same code-check error)? Asking core contributors every time doesn't seem like a good idea 🤔

@mloning
Copy link
Contributor

mloning commented May 24, 2021

Hi @GuzalBulatova,

  1. Yes, please add a docstring for those methods, I fixed the docstrings in this file: https://github.com/alan-turing-institute/sktime/blob/main/sktime/transformations/series/acf.py - that should help you to fill in the docstrings for fit, transform and inverse_transform
  2. Seems like you can either remove the docstring for private functions entirely or fix it (see http://www.pydocstyle.org/en/stable/error_codes.html#publicity)
  3. Thanks for raising these questions, I feel that fixing the documentation is very important for us at this stage and that we can still achieve this through the automated CI checks but happy to discuss this again in a few weeks if it causes too much trouble!

@GuzalBulatova
Copy link
Contributor Author

Hi @mloning ! I've added docstrings to fit, transform and inverse_transform , thanks for the hint, it helped a lot.
I looked at the pydocstyle link you sent, thank you, it's a great resource! Removed docstr for _eval_pearsonr as it's not required for inside nested function.
I think now the PR is ready for review.

Copy link
Contributor

@mloning mloning left a comment

Choose a reason for hiding this comment

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

Looks great - will merge this now @GuzalBulatova!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation & tutorials

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOC] Fix docstrings for doc sprint

2 participants