Skip to content

Conversation

@GuessWhoSamFoo
Copy link
Contributor

@GuessWhoSamFoo GuessWhoSamFoo commented May 26, 2017

XR #6581 for version numbers. Hopefully whitespace is okay.

@codecov
Copy link

codecov bot commented May 26, 2017

Codecov Report

Merging #16512 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #16512   +/-   ##
=======================================
  Coverage   90.43%   90.43%           
=======================================
  Files         161      161           
  Lines       51045    51045           
=======================================
  Hits        46161    46161           
  Misses       4884     4884
Flag Coverage Δ
#multiple 88.27% <100%> (ø) ⬆️
#single 40.16% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/generic.py 92.16% <ø> (ø) ⬆️
pandas/core/series.py 94.71% <ø> (ø) ⬆️
pandas/io/parsers.py 95.33% <ø> (ø) ⬆️
pandas/io/excel.py 62.31% <ø> (ø) ⬆️
pandas/core/indexes/datetimes.py 95.33% <ø> (ø) ⬆️
pandas/core/panelnd.py 98.21% <ø> (ø) ⬆️
pandas/core/window.py 96.48% <ø> (ø) ⬆️
pandas/core/sparse/array.py 91.46% <ø> (ø) ⬆️
pandas/core/common.py 91.39% <ø> (ø) ⬆️
pandas/core/indexes/base.py 95.74% <ø> (ø) ⬆️
... 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 e81f3cc...400bb40. Read the comment docs.

@codecov
Copy link

codecov bot commented May 26, 2017

Codecov Report

Merging #16512 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #16512   +/-   ##
=======================================
  Coverage   90.43%   90.43%           
=======================================
  Files         161      161           
  Lines       51045    51045           
=======================================
  Hits        46161    46161           
  Misses       4884     4884
Flag Coverage Δ
#multiple 88.27% <100%> (ø) ⬆️
#single 40.16% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/generic.py 92.16% <ø> (ø) ⬆️
pandas/core/strings.py 98.48% <ø> (ø) ⬆️
pandas/core/sparse/array.py 91.46% <ø> (ø) ⬆️
pandas/core/panelnd.py 98.21% <ø> (ø) ⬆️
pandas/core/indexes/period.py 92.74% <ø> (ø) ⬆️
pandas/core/categorical.py 95.91% <ø> (ø) ⬆️
pandas/core/window.py 96.48% <ø> (ø) ⬆️
pandas/io/sql.py 94.79% <ø> (ø) ⬆️
pandas/core/indexes/datetimes.py 95.33% <ø> (ø) ⬆️
pandas/core/series.py 94.71% <ø> (ø) ⬆️
... 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 e81f3cc...400bb40. Read the comment docs.

@codecov
Copy link

codecov bot commented May 26, 2017

Codecov Report

Merging #16512 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #16512   +/-   ##
=======================================
  Coverage   90.93%   90.93%           
=======================================
  Files         161      161           
  Lines       49280    49280           
=======================================
  Hits        44814    44814           
  Misses       4466     4466
Flag Coverage Δ
#multiple 88.7% <100%> (ø) ⬆️
#single 40.17% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/io/parsers.py 95.43% <ø> (ø) ⬆️
pandas/core/window.py 96.49% <ø> (ø) ⬆️
pandas/io/sql.py 94.79% <ø> (ø) ⬆️
pandas/core/panelnd.py 98.21% <ø> (ø) ⬆️
pandas/core/strings.py 98.48% <ø> (ø) ⬆️
pandas/core/indexes/datetimes.py 95.33% <ø> (ø) ⬆️
pandas/core/series.py 94.9% <ø> (ø) ⬆️
pandas/core/sparse/array.py 91.46% <ø> (ø) ⬆️
pandas/core/panel4d.py 100% <ø> (ø) ⬆️
pandas/core/common.py 91.44% <ø> (ø) ⬆️
... and 4 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 1265c27...8f31b83. Read the comment docs.

@GuessWhoSamFoo GuessWhoSamFoo changed the title DOC: Update Sphinx Deprecaded Directive DOC: Update Sphinx Deprecated Directive May 26, 2017
@jreback jreback added the Docs label May 26, 2017
DEPRECATED: this argument will be removed in a future version. Please call
``pd.read_csv(...).to_records()`` instead.
.. deprecated:: 0.18.2
This argument will be removed in a future version. Please call
Copy link
Contributor

Choose a reason for hiding this comment

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

I would eliminate things like: This argument will be removed in a future version. (look for occurences in the changes you made)

as the deprecated tag already has this (I think)

skip_footer : int, default ``0``
DEPRECATED: use the ``skipfooter`` parameter instead, as they are identical
.. deprecated:: 0.19.0
Use the ``skipfooter`` parameter instead, as they are identical
Copy link
Contributor

Choose a reason for hiding this comment

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

e.g. this like this

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Added some comments.

Can you show how it looks like when rendered in html with sphinx? (eg screenshot)

Main comment is that I am not sure it is a good idea to do this conversion when the 'DEPRECATED' is the first sentence of a docstring (but to be sure, we should actually test what the api summary tables would look like when using it)

each entry to have a separate page.

- numpydoc_edit_link: bool (DEPRECATED -- edit your HTML template instead)
- numpydoc_edit_link: bool
Copy link
Member

Choose a reason for hiding this comment

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

please leave this one as is (numpydoc's source is just included in pandas, we should adapt it only minimally)

as_recarray : boolean, default ``False``
DEPRECATED: this argument will be removed in a future version. Please call
``pd.read_csv(...).to_records()`` instead.
.. deprecated:: 0.18.2
Copy link
Member

Choose a reason for hiding this comment

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

When using the deprecated directive, you will need to add blank lines around it

"""
DEPRECATED: use :meth:`to_pydatetime` instead.
.. deprecated:: 0.19.0
Use :meth:`to_pydatetime` instead.
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 leave this one as is? The thing is that the first sentence of the docstring gets added to the API overview. So the actual "DEPRECATED .. " is then more useful as the directive code (although I am actually not sure what sphinx would put in the api summary table)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems sphinx only parses the first line to the summary table as expected. The changes have been reverted to avoid losing information in the API summary table.

screenshot from 2017-06-15 09-41-54

"""
DEPRECATED: use :meth:`DataFrame.sort_index`
.. deprecated:: 0.20.0
Use :meth:`DataFrame.sort_index`
Copy link
Member

Choose a reason for hiding this comment

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

Same comment as above for this one, and some others below as well

@jreback
Copy link
Contributor

jreback commented Jun 10, 2017

can you rebase and update?

@GuessWhoSamFoo
Copy link
Contributor Author

GuessWhoSamFoo commented Jun 15, 2017

My apologies for the late update - been traveling with limited wifi access. Updated per comments to avoid losing information in the API summary table when using sphinx directives.

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Thanks for the updates!

def convert_objects(self, convert_dates=True, convert_numeric=False,
convert_timedeltas=True, copy=True):
"""
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 one should not be removed I think

na : default NaN, fill value for missing values.
as_indexer : DEPRECATED
as_indexer : False, by default, gives deprecated behavior better
achieved using str_extract. True return boolean indexer.
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 fully correct. It is just ignored, so the explanation for True or False doesn't matter.

pandas/io/sql.py Outdated
DEPRECATED: this parameter will be removed in a future version
.. deprecated:: 0.19.0
'sqlite' is the only supported option if SQLAlchemy is not
installed.
Copy link
Member

Choose a reason for hiding this comment

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

'installed' is not fully correct, as you can use the sqlite backend also when sqlalchemy is installed. So I would make 'used' of it.

(the same for all the other occurrences of this one both in this file as in generic.py)

@@ -1,1185 +0,0 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

It seems you deleted this file by accident?

"""
DEPRECATED: consolidate will be an internal implementation only.
.. deprecated:: 0.20.0
Consolidate will be an internal implementation only.
Copy link
Member

Choose a reason for hiding this comment

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

Same comment here as previous. By putting this deprecated directive on the first line, it gets less informative in a api summary table

def sortlevel(self, level=0, ascending=True, sort_remaining=True):
"""
DEPRECATED: use :meth:`Series.sort_index`
.. deprecated:: 0.20.0
Copy link
Member

Choose a reason for hiding this comment

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

This one I would leave as well

@jorisvandenbossche jorisvandenbossche merged commit f6f5ce5 into pandas-dev:master Jun 27, 2017
@jorisvandenbossche
Copy link
Member

@GuessWhoSamFoo Thanks!

@jorisvandenbossche jorisvandenbossche added this to the 0.21.0 milestone Jun 27, 2017
@GuessWhoSamFoo GuessWhoSamFoo deleted the sphinx_deprecate branch September 7, 2017 20:49
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: Update docs to use sphinx deprecated directive

3 participants