Skip to content

DOC: Add missing docstring error to validate_docstrings.py #23673

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

Merged
merged 1 commit into from
Dec 7, 2018

Conversation

avolkov
Copy link
Contributor

@avolkov avolkov commented Nov 13, 2018

This is an update of a previous pull request -- #23669
with all unrelated commits and merges removed and and updates added from code review of that pull request.

@gfyoung gfyoung added the Docs label Nov 13, 2018
@codecov
Copy link

codecov bot commented Nov 13, 2018

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #23673   +/-   ##
=======================================
  Coverage   42.45%   42.45%           
=======================================
  Files         161      161           
  Lines       51561    51561           
=======================================
  Hits        21888    21888           
  Misses      29673    29673
Flag Coverage Δ
#single 42.45% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/frame.py 38.7% <0%> (ø) ⬆️

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 6dd130a...e75dd0b. Read the comment docs.

@datapythonista
Copy link
Member

This addresses the same issue as #23668. Can you discuss with @iway1 to see who wants to finish the work? Both PRs require some work, I don't like having all the code indented, or having the big return twice. I think the best would be having a separate function for the checks that just returns the errors and warnings, so we can have at the beginning:

if doc.missing_docstring:
    errs.append(error("GL08"))
    return errs, wrns

@pep8speaks
Copy link

Hello @avolkov! Thanks for updating the PR.

@avolkov
Copy link
Contributor Author

avolkov commented Nov 13, 2018

@iway1 I can finish working on the PR. I think I got the idea how to refactor the code into a separate function that handles only errs and wrns while validate_one would only handle conversion of those into output dictionary.
In this version the logic still has return statement at the top, however it is limited in scope only to the logic related to errs and wrns.

@avolkov avolkov closed this Nov 13, 2018
@avolkov avolkov reopened this Nov 13, 2018
@datapythonista datapythonista changed the title DOC: Add validation error when a docstring is missing [no orthogonal] DOC: Add missing docstring error to validate_docstrings.py Nov 16, 2018
@datapythonista
Copy link
Member

@avolkov do you have time to update based on feedback and fix the conflicts?

@avolkov
Copy link
Contributor Author

avolkov commented Nov 16, 2018

yes, I'll do it today

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.

Looks good, I'd just make few minor formatting and readability changes. And the PR also requires a rebase.

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.

lgtm, thanks for the work and the updates @avolkov

@datapythonista
Copy link
Member

Can you please rebase? there is a conflict with master

@datapythonista
Copy link
Member

@avolkov something went wrong when merging with master, and you've got plenty of unrelated changes. Can you fix it please?

@avolkov
Copy link
Contributor Author

avolkov commented Nov 21, 2018

@datapythonista It looks like I didn't properly do git rebase and the tests I wrote are failing. I'm working on it.

@datapythonista
Copy link
Member

When we ask for a rebase, it's not literally a rebase but a git fetch upstream && git merge upstream/master.

If you don't find a better way, git fetch upstream && git reset --soft upstream/master usually works for me (it's explained in more detail here: https://datapythonista.github.io/blog/useful-git-commands.html)

@avolkov
Copy link
Contributor Author

avolkov commented Nov 21, 2018

There was an issue with the test ( I didn't properly remove test code for NoDoctsring class that since have been removed). All the checks seem to be passing now.

@datapythonista
Copy link
Member

I still see 105 commits and a huge diff. Couldn't you fix that?

@avolkov avolkov closed this Nov 21, 2018
@avolkov avolkov reopened this Nov 21, 2018
@avolkov
Copy link
Contributor Author

avolkov commented Nov 21, 2018

Oh, ok, I see, there's another issue where I need to follow your rebase procedure. I'll do that.

@datapythonista
Copy link
Member

datapythonista commented Nov 29, 2018

@avolkov do you have time to fix this PR?

@datapythonista
Copy link
Member

rebased

@datapythonista datapythonista self-assigned this Dec 7, 2018
@datapythonista
Copy link
Member

@jreback this should be ready

@jreback jreback added this to the 0.24.0 milestone Dec 7, 2018
@jreback jreback merged commit 0cfd1c2 into pandas-dev:master Dec 7, 2018
@jreback
Copy link
Contributor

jreback commented Dec 7, 2018

thanks @avolkov

Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Add validation error when a docstring is missing
5 participants