Skip to content
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

DOC: Fixing SS02 errors as per #25113 #25362

Closed
wants to merge 3 commits into from
Closed

DOC: Fixing SS02 errors as per #25113 #25362

wants to merge 3 commits into from

Conversation

souvik3333
Copy link
Contributor

@souvik3333 souvik3333 commented Feb 18, 2019

Some of the SS02 error mentioned are not because of methods but of docstring.
For example, in the first SS02 error pandas/tseries/offsets.py has no method named normalize.

@codecov
Copy link

codecov bot commented Feb 18, 2019

Codecov Report

Merging #25362 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #25362   +/-   ##
=======================================
  Coverage   91.73%   91.73%           
=======================================
  Files         173      173           
  Lines       52839    52839           
=======================================
  Hits        48472    48472           
  Misses       4367     4367
Flag Coverage Δ
#multiple 90.29% <ø> (ø) ⬆️
#single 41.72% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/io/pytables.py 90.2% <ø> (ø) ⬆️

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 b90bcb5...dca54de. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 18, 2019

Codecov Report

Merging #25362 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #25362      +/-   ##
==========================================
+ Coverage   91.73%   91.73%   +<.01%     
==========================================
  Files         173      173              
  Lines       52839    52839              
==========================================
+ Hits        48472    48473       +1     
+ Misses       4367     4366       -1
Flag Coverage Δ
#multiple 90.29% <ø> (ø) ⬆️
#single 41.71% <ø> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/io/pytables.py 90.2% <ø> (ø) ⬆️
pandas/util/testing.py 87.66% <0%> (+0.09%) ⬆️

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 f74aba6...32f1584. Read the comment docs.

Some of the SS02 error mentioned are not because of methods but of docstring.
For example, in the first SS02 error pandas/tseries/offsets.py has no method named normalize.
@gfyoung gfyoung added Docs CI Continuous Integration Code Style Code style, linting, code_checks labels Feb 18, 2019
@gfyoung
Copy link
Member

gfyoung commented Feb 18, 2019

@souvik3333 : Before we can close the issue, we will need to fix all the errors in the issue. It looks like you only addressed some of them, unless you're planning to tackle the rest in this PR.

@souvik3333
Copy link
Contributor Author

souvik3333 commented Feb 18, 2019

Yes, I would like to tackle the rest errors, but rest of the error creating line numbers are not coming up and when I am trying to find the error in the mentioned file, the mentioned method in not in that file. One example for this issue is given in commit description. I need little help here. Can you please check it @gfyoung?

@gfyoung
Copy link
Member

gfyoung commented Feb 18, 2019

@souvik3333 : Can you update our doc checking script to enable SS02 to see which errors you get?

Yes, I would like to tackle the rest errors, but rest of the error creating line numbers are not coming up and when I am trying to find the error in the mentioned file, the mentioned method in not in that file.

cc @kynan @datapythonista

@souvik3333
Copy link
Contributor Author

souvik3333 commented Feb 18, 2019

@souvik3333 : Can you update our doc checking script to enable SS02 to see which errors you get?

Can you explain bit more on what I have to do?

@gfyoung
Copy link
Member

gfyoung commented Feb 18, 2019

$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR04,PR05,EX04,RT04,RT05,SS05,SA05

Add SS02 at the end of the line shown above (comma-delimited).

@souvik3333
Copy link
Contributor Author

Add SS02 at the end of the line shown above (comma-delimited).

Nothing changed, Same errors are coming up.

@gfyoung
Copy link
Member

gfyoung commented Feb 19, 2019

Nothing changed, Same errors are coming up.

@souvik3333 : What I mean is: you need to add that to the script and push that change to your PR.

@souvik3333
Copy link
Contributor Author

I have updated the PR. Can you check @gfyoung what I need to do next?

@gfyoung
Copy link
Member

gfyoung commented Feb 19, 2019

@souvik3333 : Have a look at the SS02 failures here:

https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=8520

(Click the Checks_and_doc_job)

Correct those errors, and I think this PR will be good to go! I do realize that it may be difficult to verify since you were saying you had some trouble replicating all of the errors, but the error descriptions are pretty clear that you can figure out what to correct and push to the PR.

@souvik3333
Copy link
Contributor Author

Correct those errors, and I think this PR will be good to go! I do realize that it may be difficult to verify since you were saying you had some trouble replicating all of the errors, but the error descriptions are pretty clear that you can figure out what to correct and push to the PR.

Yes, but I am facing problem finding the exact location of the error! Can you please show me how to find the error creating line for one error then I can try for the rest of them?

@gfyoung
Copy link
Member

gfyoung commented Feb 19, 2019

Can you please show me how to find the error creating line for one error then I can try for the rest of them?

cc @WillAyd @datapythonista : Would it be possible to provide line numbers and file paths instead of using the "dot" syntax for pointing to errors? This seems to be a very valid concern

@souvik3333 : The errors should be located in the following files:

https://github.com/pandas-dev/pandas/blob/b2c751985ebd09b72d917d08dc06193dc0922018/pandas/_libs/tslibs/timestamps.pyx
https://github.com/pandas-dev/pandas/blob/b2c751985ebd09b72d917d08dc06193dc0922018/pandas/tseries/offsets.py

The last three around I think should be ignored. Panel is being removed, so I think we should ignore those warnings, though I'm not sure what the right is to ignore them (or if we can)...

Save the Panel errors for last (i.e. separate commit after you fix the others). If necessary, we'll tweak the code (

setattr(cls, a, properties.AxisProperty(i, docs.get(a, a)))
) that sets those docstrings if we need to.

@WillAyd
Copy link
Member

WillAyd commented Feb 19, 2019

cc @WillAyd @datapythonista : Would it be possible to provide line numbers and file paths instead of using the "dot" syntax for pointing to errors? This seems to be a very valid concern

@souvik3333 feel free to open an issue for this request if there's not already one out there - can be discussed further therein!

@datapythonista
Copy link
Member

Those None(None) are the file path and line number when we can guess where the docstring is defined. But there are limitations on that. For example, it's not trivial (or not possible) to know the file and line when the docstring is in a Cython file. Or when the docstring is created in a variable and then set to the __doc__ attribute of the object.

I think for this case you'll have to try things like grep -R "class Timstamp" *, grep -r "def ceil" * until you find where those methods are defined.

@WillAyd
Copy link
Member

WillAyd commented Feb 27, 2019

@souvik3333 can you update errors as mentioned above?

@souvik3333
Copy link
Contributor Author

@souvik3333 can you update errors as mentioned above?

Yes, I need a little more time. I will update the PR once it's done.

@nmusolino
Copy link
Contributor

I was thinking of continuing the work for this pull request, by tracking down all the outstanding failures and fixing them.

@souvik3333 , I would keep your existing commits and build on top of them, so your work would be preserved.

Is there some way I can contribute commits here without creating a new pull request?

@souvik3333
Copy link
Contributor Author

Is there some way I can contribute commits here without creating a new pull request?

I don't know but you can work on it as I am busy with my exams and it would take me some time before starting working on it again.

@WillAyd
Copy link
Member

WillAyd commented Mar 19, 2019

@nmusolino if you'd like you can clone this and push to your own PR

@souvik3333 closing as stale given your latest comment. Thanks in any case!

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

5 participants