Skip to content

Conversation

@varadgunjal
Copy link
Contributor

@varadgunjal varadgunjal commented Nov 24, 2018

The few issues that still show up on running the script can be attributed to-

  • Docstrings non-existent viz. tseries.offsets.Tick, tseries.offsets.Day etc. (working on this for a separate PR)
  • Auto-generated Doctrings viz. Series.argmin, Timestamp.strptime etc.
  • Docstrings starting with quotes viz. 'Normalizes', 'Unpivots' which were (presumably) added in by the original authors by for a reason.
@pep8speaks
Copy link

pep8speaks commented Nov 24, 2018

Hello @varadgunjal! Thanks for updating the PR.

Comment last updated on November 24, 2018 at 21:44 Hours UTC
@codecov
Copy link

codecov bot commented Nov 24, 2018

Codecov Report

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

Impacted file tree graph

@@ Coverage Diff @@ ## master #23886 +/- ## ======================================= Coverage 92.31% 92.31% ======================================= Files 161 161 Lines 51483 51483 ======================================= Hits 47525 47525 Misses 3958 3958
Flag Coverage Δ
#multiple 90.7% <ø> (ø) ⬆️
#single 42.43% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/io/json/normalize.py 96.87% <ø> (ø) ⬆️
pandas/io/formats/style.py 96.69% <ø> (ø) ⬆️
pandas/core/indexes/multi.py 95.49% <ø> (ø) ⬆️
pandas/core/groupby/base.py 91.83% <ø> (ø) ⬆️
pandas/core/indexes/datetimelike.py 97.74% <ø> (ø) ⬆️
pandas/core/panel.py 97.92% <ø> (ø) ⬆️
pandas/core/arrays/timedeltas.py 96.44% <ø> (ø) ⬆️
pandas/core/resample.py 96.99% <ø> (ø) ⬆️
pandas/core/frame.py 97.02% <ø> (ø) ⬆️
pandas/core/window.py 96.4% <ø> (ø) ⬆️
... and 7 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 90961f2...b34280b. Read the comment docs.

@datapythonista datapythonista changed the title Editing docstring summaries. DOC: Capitalize docstring summaries Nov 25, 2018
@datapythonista datapythonista added Docs Code Style Code style, linting, code_checks labels Nov 25, 2018
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 great, thanks for working on this. I added some comments with things that besides the capitalization are wrong in the format. If you don't mind taking care of those too, that would be really great.

@varadgunjal
Copy link
Contributor Author

varadgunjal commented Nov 25, 2018

@datapythonista I've been diving into the code further to see where I can contribute and have noticed that a lot of these issues are repeated in other files that do not show up when the validate script runs. The changes will affect a lot of files - including editing/updating some docstrings. Shall go ahead and make the changes there and submit PRs module-by-module? Or should I just stick to the files that the script found for this issue?

@datapythonista
Copy link
Member

I think the script should like all the docstrings that do not start with a capital letter in the public API. I'd leave just those in this PR. Fixing the others would be nice, but is not as important, as the docstrings are not in the pandas documentation web. If you take care of them, do it in chunks, huge pull requests make reviews complicated and not very efficient. But there should be issues labeled as "good first issue" that are probably more important at this point.

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.

Really nice changes, thanks @varadgunjal.

Added some comments, if you can take care of them, and I'll try to get this merged soon, before it causes conflicts (being so big it's likely to happen). Not so important, but for the next time, it usually makes things easier and more efficient if you split a PR of this size in two or three chunks.

"""
Alias for is_monotonic_increasing.
.. deprecated :: """
Copy link
Member

Choose a reason for hiding this comment

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

This is not actually deprecated (see that the code doesn't raise a deprecation warning.

Can you remove the deprecated directive (also the deprecated in brackets as you did).

@jreback do we want to deprecate this? (that would be for another PR)

def _is_strictly_monotonic_increasing(self):
"""return if the index is strictly monotonic increasing
(only increasing) values
"""Return if the index is strictly monotonic increasing
Copy link
Member

Choose a reason for hiding this comment

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

Can you move this one to the next line of the quotes too?

"""
where : array of timestamps
mask : array of booleans where data is not NA
Parameters
Copy link
Member

Choose a reason for hiding this comment

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

@jreback, do you mind reviewing the summary?

@varadgunjal
Copy link
Contributor Author

Sorry that the PR has become quite big. I've stuck to fixing issues in the files reported by the validate_docstrings script. As discussed previously, I will push corresponding changes to docstrings in all the various other files if and when I push changes to the code therein in the future.

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.

Just one thing that I'm not sure is correct, other than that looks great.

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 great @varadgunjal, thanks a lot for all the fixes.

@pandas-dev/pandas-core can someone take a look at this? It's just fixes to the docstrings formats, but it's plenty of them, and would be great to get this merged before it starts to have conflicts.

@jreback
Copy link
Contributor

jreback commented Nov 27, 2018

can you merge master

@datapythonista datapythonista merged commit 448c9bc into pandas-dev:master Nov 27, 2018
@datapythonista
Copy link
Member

Thanks @varadgunjal for all the work with this, and thanks @gfyoung for the review.

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

Code Style Code style, linting, code_checks Docs

5 participants