-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Fixing SA04 errors as per #25337 #25354
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
Updated code_checks.sh Amended files where errors appeared
Hello @Sedosa! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on March 02, 2019 at 13:25 Hours UTC |
pls merge master again |
Codecov Report
@@ Coverage Diff @@
## master #25354 +/- ##
===========================================
- Coverage 91.73% 41.72% -50.02%
===========================================
Files 173 173
Lines 52839 52839
===========================================
- Hits 48472 22047 -26425
- Misses 4367 30792 +26425
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #25354 +/- ##
==========================================
- Coverage 91.75% 91.73% -0.02%
==========================================
Files 173 173
Lines 52955 52849 -106
==========================================
- Hits 48589 48483 -106
Misses 4366 4366
Continue to review full report at Codecov.
|
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.
lgtm. if someone can give a 2nd look to the docstrings would be great. @pandas-dev/pandas-core
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.
Great changes, still need some fixes.
Remove the pandas/validation_errors.json
you committed by error`.
If you fixed all the errors of this type, add validation for it to ci/code_checks.py
.
In many cases you have a space before the full stop some_func: Its description .
. This is wrong, use some_func: Its description.
instead.
You have an inconsistent use of third-person present verbs, and infinitive (e.g. Add/Adds, Return/Returns). Use infinitive everywhere (e.g. Add, Return).
@datapythonista Thank you so much for the feedback! I've implemented the fixes you requested. Also, With regards to "pandas/core/groupby/groupby.py" I had to alter 4 decorators because the way they were forming the docstring caused several of the SA04 errors. Please forgive me for the lack of commit messages. Moronic practise on my part. The may be one error that still fails the SA04 check, however its' location is NaN and I don't know how to approach /find it. |
…nce issue in locating it
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.
Many formatting issues, please make sure you double check all the formats before updating the PR. You got all the wrong formats in the comments, you can review yourself that all them are right.
@datapythonista All checks have passed. |
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 would like to see you split this PR up. it is very hard to review giant PR's. You can add the check after the changes are merged.
@@ -241,8 +241,10 @@ fi | |||
### DOCSTRINGS ### | |||
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then | |||
|
|||
MSG='Validate docstrings (GL06, GL07, GL09, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT04, RT05, SA05)' ; echo $MSG | |||
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT04,RT05,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.
can you remove the extra line
numpy.take | ||
pandas.api.extensions.take | ||
numpy.take: Take elements from an array along an axis. | ||
pandas.api.extensions.take: Take elements from an array. |
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.
array -> ExtensionArray
add_categories: Add new categories. | ||
remove_categories: Remove specified categories. | ||
remove_unused_categories: Remove unused categories. | ||
set_categories: Set new categories inplace. |
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.
remove inplace
add_categories: Add new categories. | ||
remove_categories: Remove specified categories. | ||
remove_unused_categories: Remove unused categories. | ||
set_categories: Set new categories inplace. |
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.
remove inplace and same for others
@@ -1366,7 +1366,8 @@ def memory_usage(self, deep=False): | |||
|
|||
See Also | |||
-------- | |||
numpy.ndarray.nbytes | |||
numpy.ndarray.nbytes: Total bytes consumed by the elements of the | |||
array. |
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.
array -> numpy array
@@ -1597,8 +1596,9 @@ def sort_values(self, inplace=False, ascending=True, na_position='last'): | |||
|
|||
See Also | |||
-------- | |||
Categorical.sort | |||
Series.sort_values | |||
Categorical.sort: Sort the Category inplace by category value. |
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.
remove inplace
Series.take : Similar method for Series. | ||
numpy.ndarray.take : Similar method for NumPy arrays. | ||
Series.take: Similar method for Series. | ||
numpy.ndarray.take: Similar method for NumPy arrays. |
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.
be consistent, either use NumPy of numpy in your edits
unique | ||
CategoricalIndex.unique | ||
Series.unique | ||
unique: Hash table-based unique. Uniques are returned in order of |
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.
remove Hash table-based unique
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.
say the order of the original is preserved (rather than does not sort)
numpy.ndarray.min | ||
Index.min : Return the minimum value in an Index. | ||
Series.min : Return the minimum value in a Series. | ||
numpy.ndarray.min: Return the minimum of the Array along |
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.
don't capitalize array
numpy.ndarray.max | ||
Index.max : Return the maximum value in an Index. | ||
Series.max : Return the maximum value in a Series. | ||
numpy.ndarray.max: Return the maximum of an Array |
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.
same
@Sedosa are you still looking to take this on? Please merge master |
@alimcmaster1 : Per @jreback , the PR needs to be broken up. Given that this has been silent for some time, I would recommend that you submit PR's that take chunks from this one. |
Closing this one as stale - per comments above would certainly accept other PRs in smaller chunks. Thanks @Sedosa for the effort so far! |
SA04
and check in CI #25337Went through every file and included "See Also" reference, PEP8 compliant. According to the "validate_docstring.py" script the were SA04 errors but having checked every file I have been unable to locate them. Assistance may be required.
Implemented feedback from original pull request.
Updated code_checks.sh to reflect changes.