-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Fix various warnings #18083
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: Fix various warnings #18083
Conversation
03557e3
to
e2dfa58
Compare
Codecov Report
@@ Coverage Diff @@
## master #18083 +/- ##
==========================================
- Coverage 91.27% 91.23% -0.05%
==========================================
Files 163 163
Lines 50120 50120
==========================================
- Hits 45749 45728 -21
- Misses 4371 4392 +21
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #18083 +/- ##
==========================================
- Coverage 91.42% 91.26% -0.17%
==========================================
Files 163 163
Lines 50068 50116 +48
==========================================
- Hits 45776 45736 -40
- Misses 4292 4380 +88
Continue to review full report at Codecov.
|
33 warnings in https://travis-ci.org/pandas-dev/pandas/jobs/296582210, making progress :) |
Merging this later today I think, my next round of changing removing our vendored numpydoc and ipython sphinx ext will be more invasive. |
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.
Good hunting! :-)
pandas/_libs/tslib.pyx
Outdated
@@ -1917,7 +1927,7 @@ class Timedelta(_Timedelta): | |||
Parameters | |||
---------- | |||
value : Timedelta, timedelta, np.timedelta64, string, or integer | |||
unit : string, [D,h,m,s,ms,us,ns] | |||
unit : string, ``[D,h,m,s,ms,us,ns]`` |
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.
is this one needed to suppress a warning?
I think we typically do not quote possible values in this part of the docstring (if we quote, I would rather quote them as strings to make it clear that is the option)
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.
Yeah... I think that caused a warning, though I can double check.
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.
Turns out it wasn't necessary. I've changed it to be the correct {'ns', 'us', ...}
format.
@@ -1703,6 +1703,7 @@ def to_html(self, buf=None, columns=None, col_space=None, header=True, | |||
Character recognized as decimal separator, e.g. ',' in Europe | |||
|
|||
.. versionadded:: 0.18.0 | |||
|
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.
Is this one actually needed? (the blank line)
I always assumed it was not needed (the one before is needed)
(but note I am not against this change, because without it looks a bit strange in the plain text version)
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.
Again, not sure if the newline was necessary. There were several "unexpected end to block quote" warnings. I can check my logs.
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 mind this one. As I said, I think the change is also good from "aesthetic" point of view, whether it was actually needed or not to remove a warning
4e79b84
to
b399201
Compare
of the box.""" | ||
of the box. Valid values are | ||
|
||
* left |
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.
@jorisvandenbossche Thoughts on this one? The multiline { options... }
format was giving warnings (block quotes I think?). I couldn't figure out the correct values in the formatting, so I just made a list.
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.
See numpy/numpydoc#87. In the end I think the conclusion is that using \
is the best way to deal with multi-line type specifications.
On the other hand, if the list becomes too long of all options, I think it is good to not list them all in the type specification (but keep it there to simply 'string') but give more explanation in the description.
I'm trying to get our doc build cleaned up. Just fixing warnings in this one (mostly formatting, some references). Section name warnings Warning from computation.rst Remove references to invalid index / columns Various docstring fixups More warnings More warnings
b399201
to
c1b25e9
Compare
Just the clipboard failure (which seems to be failing more regularly now?) Merging. |
* DOC: Fix various warnings I'm trying to get our doc build cleaned up. Just fixing warnings in this one (mostly formatting, some references). Section name warnings Warning from computation.rst Remove references to invalid index / columns Various docstring fixups More warnings More warnings * match NaT doc * DOC: Remove duplicate sections * More warnings * fixup
* DOC: Fix various warnings I'm trying to get our doc build cleaned up. Just fixing warnings in this one (mostly formatting, some references). Section name warnings Warning from computation.rst Remove references to invalid index / columns Various docstring fixups More warnings More warnings * match NaT doc * DOC: Remove duplicate sections * More warnings * fixup
Not worth the trouble to backport, moving to 0.22.0 |
I'm trying to get our doc build cleaned up. Just fixing warnings in this one
(mostly formatting, some references).
Later on I'll figure out why things are slow on sphinx 1.6 and get rid of our hacked numpydoc / ipython directive.