-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Fixes to docstrings, mainly PR09 errors #29530
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
Conversation
Hello @HughKelley! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-12-31 19:55:57 UTC |
does this completely close #28602? |
yes, after merging, running |
hit the wrong button in the comment dialogue and closed by accident |
@HughKelley in |
Ups, just seen your previous comment now. Please better add the check here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! I think a few of the changes in the indentation of "deprecated" is not correct, for the rest looks good!
pandas/io/excel/_base.py
Outdated
@@ -82,7 +82,7 @@ | |||
* If None, then parse all columns. | |||
* If int, then indicates last column to be parsed. | |||
|
|||
.. deprecated:: 0.24.0 | |||
.. deprecated:: 0.24.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this change is fully correct, as the "deprecated" notion is specific to this bullet item, not to the general keyword
(the same might be true for the other occurrences here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for reviewing. While i agree that it would be better to have the warning indented, that breaks the validation, raising error PR09 description should end in .
I have experimented with different amounts of indentation but this is the only one that doesn't raise a warning.
The way the docs render without the two spaces, seen below, I think are sufficiently clear about what the warning is referring to but I'm open to other solutions. I just haven't found any.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While i agree that it would be better to have the warning indented, that breaks the validation, raising error PR09 description should end in .
Then I would consider that a bug in the validation script that could be fixed instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe @datapythonista can speak to exactly what is being worked on in the checks, I know there are some changes in the works to handle bulleted lists without leading text.
That's a false positive, and I think it's fixed in the numpydoc version of our script. I expect to have the PR that replaces our script by the numpydoc version in few days, so don't worry about those errors, you can leave the docstrings correct. |
@HughKelley seems something went wrong with your latest update with master (there are too many commits included here, giving a big diff). Normally something like
should do the trick |
definitely. I used rebase instead of merge. I think I'm going to close this PR since it's a mess, cherrypick what I need into a new branch and open a new PR once the CI checks are all passing. Unless you'd rather I do something else. Thanks for the help/patience as I figure this stuff out. |
I think that the snippet I posted should still be able to clean it up (even after the rebase), but if that doesn't work out, no problem in creating a clean branch / PR! |
The first section in this post describes what I'd do: https://datapythonista.github.io/blog/useful-git-commands.html |
@datapythonista @jorisvandenbossche these checks are green. Joris, the indentation error you pointed out is fixed. Am I responsible for resolving the merge conflict? Should I update the PR with the most recent changes to master and let the checks run again? Thanks! |
Yes, you need to resolve the conflicts before we can merge. |
will do, thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just couple of comments.
@@ -286,7 +286,7 @@ fi | |||
### DOCSTRINGS ### | |||
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then | |||
|
|||
MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT01, RT04, RT05, SA01, SA02, SA03, SA05)' ; echo $MSG | |||
MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05, PR09, PR10, EX04, RT01, RT04, RT05, SA01, SA02, SA03, SA05)' ; echo $MSG | |||
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA01,SA02,SA03,SA05 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should add the error you fixed here too, the previous is only a message for the log
|
||
.. versionadded:: 0.24.0 | ||
.. versionadded:: 0.24.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you check if the html version of this docstring looks good? those indentations are always tricky
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is correct (it has the same indentation as the list item)
@datapythonista thanks for reviewing. The checks do not pass as there are still PR09 errors in the code. Has the update to the numpydoc script occured yet? Is there an open issue or PR for that I can keep an eye on? The script doesn't recognize the |
I've been working in using the numpydoc script, but there is still work to do, and I'm travelling, so it'll take some rhinestone to be ready. We can merge this in the meantime, but you should undo the changes to the comment in Also, please have a look at what is broken in the CI, so we can merge. Thanks! |
@@ -7140,17 +7142,16 @@ def corr(self, method="pearson", min_periods=1): | |||
Parameters | |||
---------- | |||
method : {'pearson', 'kendall', 'spearman'} or callable | |||
Method of correlation: | |||
|
|||
Method of correlation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to keep the blank line between the first sentence and the bullet points (I think that's the reason sphinx is complaining).
BTW, I think the colon (:
) also makes sense to keep before a bullet point list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, thanks. That was just me playing with it to see if I could get the validation to accept it
@HughKelley do you have time to address the last comments, so we can get this merged? Thanks! |
Thanks for following up. Sorry this wasn't more of a priority for me during the holidays. i'm actually cherry picking stuff into a new (cleaner) PR that I'll get merged in the new year. thanks very much for everyone's work on the package and helping me as i learn this stuff. |
closes #28602