Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ENH: Validation to only allow positive integers for options #27382
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
ENH: Validation to only allow positive integers for options #27382
Changes from 12 commits
def4005
e50961d
32e8c67
9618877
7a5593b
d6fa258
eb09813
8f46673
21bf599
ea09cc2
6c2ff43
25e0247
d18a01a
4e76640
80d2f1a
2d783ef
7163990
033339f
42d844e
1a25d06
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
@jreback comment for returns section is lost in diff so re-commenting here but I'm surprised this isn't failing the CI either
@datapythonista do we ignore private docstrings in the validation? Vaguely recall some comment around that but didn't see code to confirm
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.
Sorry, shall I add the following?
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.
@WillAyd yes, we don't validate docstrings of private functions. Ideally we should validate everything, but with all the pending work in the public API that has an impact in the web docs, I don't think we should spend time in fixing the private docstrings yet (and if we don't fix the existing cases, we can't easily validate the new ones).
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 the clarification - do you know where that exclusion happens? Didn't see it in code_checks and couldn't find on quick glance in validate_docstrings.py
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.
Ups sorry, was going to mention and I forgot. It's not that we exclude them, it's that we get the docstrings to consider from the
.rst
files of the API docs. The code here is a good starting point to understand that: https://github.com/pandas-dev/pandas/blob/master/scripts/validate_docstrings.py#L873There 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.
@Adam-Klaum these need to be updated to follow the doctoring stander. See https://dev.pandas.io/development/contributing.html#updating-a-pandas-docstring
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.
Use
isistance(values, numbers.Integral)
Can you restructure this a bit?
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 think most people won't be familiar with NoneType. Should probably say like
'value' must be a positive integer or None
.