-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Fixing some more warnings #26810
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 some more warnings #26810
Conversation
BTW, the issue for the problem with the IPython directive is here: ipython/ipython#11362 |
@jorisvandenbossche any idea why I'm getting a lot of those locally:
I think it started after downgrading sphinx back to 1.8.5 |
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.
Added some comments!
doc/source/getting_started/10min.rst
Outdated
@@ -713,6 +713,9 @@ See the :ref:`Plotting <visualization>` docs. | |||
|
|||
.. ipython:: python | |||
|
|||
# register converters to display dates in plots | |||
pd.plotting.register_matplotlib_converters() |
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.
This should not be added, the warning in the log is indicating a recent regression, see #26770
@@ -4703,6 +4703,7 @@ See the documentation for `pyarrow <https://arrow.apache.org/docs/python/>`__ an | |||
Write to a parquet file. | |||
|
|||
.. ipython:: python | |||
:okwarning: |
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, this is fine.
Although, we should actually make sure to install the latest version of pyarrow (where this is fixed), but for some reason conda installs 0.11 instead of 0.13
ts[60:80] = np.nan | ||
ts = ts.cumsum() | ||
|
||
.. ipython:: python | ||
|
||
ts | ||
ts.count() | ||
@savefig series_before_interpolate.png | ||
ts.interpolate().plot() |
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.
should this be without the interpolate? As the above line is already included a couple of lines below
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 catch, I saw it when reviewing the rendered page, and thought I fixed it, but seems like I didn't
@@ -455,7 +462,7 @@ at the new values. | |||
ser = pd.Series(np.sort(np.random.uniform(size=100))) | |||
|
|||
# interpolate at new_index | |||
new_index = ser.index | pd.Index([49.25, 49.5, 49.75, 50.25, 50.5, 50.75]) | |||
new_index = pd.Float64Index(ser.index | pd.Index([49.25, 49.5, 49.75, 50.25, 50.5, 50.75])) |
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.
I would leave this change out.
Yes, it is annoying that it fails, but this should work and is a regression we need to fix (and we actually catched this due to the docs).
If this is the final error that is remaining and blocking that we can start failing CI for errors/warnings in the docs, then we can do that or add a temporary :okexcept:
, but we are not there yet I think.
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.
adding an :okexcept:
, I'm trying to make this the last time in my life I fix lots of pandas doc warnings (it's not the first), so hopefully we can add the check soon
Not sure, I also don't see those on the PR pinning to 1.8.5 |
did you do a full clean build? It might be that the api rst pages generated by sphinx 2 are not compatible with 1.8.5 ? |
Codecov Report
@@ Coverage Diff @@
## master #26810 +/- ##
==========================================
- Coverage 91.76% 91.75% -0.01%
==========================================
Files 178 178
Lines 50751 50751
==========================================
- Hits 46574 46569 -5
- Misses 4177 4182 +5
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #26810 +/- ##
=========================================
+ Coverage 90.45% 91.86% +1.4%
=========================================
Files 179 179
Lines 50706 50706
=========================================
+ Hits 45866 46579 +713
+ Misses 4840 4127 -713
Continue to review full report at Codecov.
|
@jorisvandenbossche this should be ready, after this there aren't many warnings left. Some tricky ones but we're not that far. I see many of this type:
Checking the first one, I see in http://dev.pandas.io/reference/api/pandas.arrays.DatetimeArray.html that Any idea what's the problem/how to fix those? Thanks! |
@datapythonista DatetimeArray.map's doesn't have a docstring, and it may not inherit one. Can you see if adding a simple docstring fixes that warning? edit: IntegerArray.dtype also doesn't have a docstring. |
For IntervalArray.{argsort,astype}, I think they will need to be added to the list of methods in the class docstring. |
Or not? (because I don't think we want them in the API reference for each array?) |
Hmm, right I was thinking about it backwards (thinking we had a ref, but no target). I wonder why it's being generated then. |
Looking at the code, I think we should take the "class_without_autosummary" template approach for all our internal EAs as well (which we currently don't do apparently, except for Categorical). Trying that out now. |
See #26834 |
Looks good to me. Can you open an issue about the changes here that should be reverted once the cause is fixed? (the added okwarning/okexcepts) |
Opened an issue for those okwarning/okexcepts: #26843 |
git diff upstream/master -u -- "*.py" | flake8 --diff
Fixing some more warnings in the doc build, and small improvements to the interpolation doc.
CC: @jorisvandenbossche