Skip to content

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

Closed
wants to merge 23 commits into from
Closed

DOC: Fixing SA04 errors as per #25337 #25354

wants to merge 23 commits into from

Conversation

Sedosa
Copy link
Contributor

@Sedosa Sedosa commented Feb 17, 2019

Went 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.

@pep8speaks
Copy link

pep8speaks commented Feb 17, 2019

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

@jreback
Copy link
Contributor

jreback commented Feb 17, 2019

pls merge master again

@Sedosa Sedosa closed this Feb 17, 2019
@Sedosa Sedosa reopened this Feb 17, 2019
@codecov
Copy link

codecov bot commented Feb 17, 2019

Codecov Report

Merging #25354 into master will decrease coverage by 50.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             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
Flag Coverage Δ
#multiple ?
#single 41.72% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/arrays/base.py 56.39% <ø> (-41.87%) ⬇️
pandas/core/indexes/accessors.py 64% <ø> (-27%) ⬇️
pandas/core/indexes/multi.py 33.84% <ø> (-61.76%) ⬇️
pandas/core/computation/eval.py 14.42% <ø> (-82.7%) ⬇️
pandas/core/dtypes/dtypes.py 73.52% <ø> (-22.06%) ⬇️
pandas/core/base.py 33.33% <ø> (-64.43%) ⬇️
pandas/core/resample.py 23.39% <ø> (-73.84%) ⬇️
pandas/plotting/_converter.py 13.91% <ø> (-49.86%) ⬇️
pandas/io/formats/style.py 17.49% <ø> (-79.2%) ⬇️
pandas/core/reshape/reshape.py 13.36% <ø> (-86%) ⬇️
... and 169 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a20d5b...307c33f. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 17, 2019

Codecov Report

Merging #25354 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Flag Coverage Δ
#multiple 90.3% <100%> (-0.02%) ⬇️
#single 41.73% <100%> (+0.01%) ⬆️
Impacted Files Coverage Δ
pandas/core/arrays/base.py 98.25% <ø> (ø) ⬆️
pandas/core/indexes/accessors.py 91% <ø> (ø) ⬆️
pandas/core/computation/eval.py 97.11% <ø> (ø) ⬆️
pandas/core/dtypes/dtypes.py 96.1% <ø> (ø) ⬆️
pandas/core/base.py 97.76% <ø> (ø) ⬆️
pandas/core/resample.py 97.22% <ø> (ø) ⬆️
pandas/plotting/_converter.py 63.76% <ø> (ø) ⬆️
pandas/core/arrays/datetimes.py 97.79% <ø> (ø) ⬆️
pandas/tseries/frequencies.py 97.7% <ø> (ø) ⬆️
pandas/core/window.py 96.4% <ø> (ø) ⬆️
... and 47 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae4db86...517b158. Read the comment docs.

@gfyoung gfyoung added Docs CI Continuous Integration Code Style Code style, linting, code_checks labels Feb 18, 2019
@jreback jreback added this to the 0.25.0 milestone Feb 19, 2019
Copy link
Contributor

@jreback jreback left a 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

Copy link
Member

@datapythonista datapythonista left a 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).

@Sedosa
Copy link
Contributor Author

Sedosa commented Feb 20, 2019

@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.

Copy link
Member

@datapythonista datapythonista left a 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.

@Sedosa
Copy link
Contributor Author

Sedosa commented Feb 26, 2019

@datapythonista All checks have passed.

Copy link
Contributor

@jreback jreback left a 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

Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

same

@jreback jreback removed this from the 0.25.0 milestone Mar 3, 2019
@alimcmaster1
Copy link
Member

@Sedosa are you still looking to take this on? Please merge master

@gfyoung
Copy link
Member

gfyoung commented Mar 8, 2019

@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.

@WillAyd
Copy link
Member

WillAyd commented Mar 19, 2019

Closing this one as stale - per comments above would certainly accept other PRs in smaller chunks.

Thanks @Sedosa for the effort so far!

@WillAyd WillAyd closed this Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Code Style Code style, linting, code_checks Docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix validation error type SA04 and check in CI
7 participants