Skip to content
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

API Change repr name for table schema #16204

Merged
merged 3 commits into from
May 3, 2017

Conversation

TomAugspurger
Copy link
Contributor

Not API breaking, since pandas 0.20.0 hasn't been released yet.
_repr_table_schema_ isn't the right name, since we include both the schema and the data.

xref #16198 (comment)

@rgbkrk do you need any kind of backwards compatibility with _repr_table_schema_?

Not API breaking, since pandas 0.20.0 hasn't been released yet.
@TomAugspurger TomAugspurger added IO JSON read_json, to_json, json_normalize Output-Formatting __repr__ of pandas objects, to_string labels May 2, 2017
@TomAugspurger TomAugspurger added this to the 0.20.0 milestone May 2, 2017
@rgbkrk
Copy link
Contributor

rgbkrk commented May 2, 2017

do you need any kind of backwards compatibility with _repr_table_schema_

Nope, I haven't written up any usage of this and we were only relying on the options namespace + displaying a dataframe in our one example notebook.

@codecov
Copy link

codecov bot commented May 2, 2017

Codecov Report

Merging #16204 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16204      +/-   ##
==========================================
+ Coverage   90.86%   90.88%   +0.02%     
==========================================
  Files         162      162              
  Lines       50867    50867              
==========================================
+ Hits        46222    46233      +11     
+ Misses       4645     4634      -11
Flag Coverage Δ
#multiple 88.67% <100%> (+0.02%) ⬆️
#single 40.31% <50%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/generic.py 91.67% <100%> (ø) ⬆️
pandas/core/config_init.py 94.37% <100%> (ø) ⬆️
pandas/core/common.py 90.68% <0%> (-0.35%) ⬇️
pandas/plotting/_converter.py 65.35% <0%> (+1.81%) ⬆️

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 39cc1d0...3ce67e4. Read the comment docs.

@codecov
Copy link

codecov bot commented May 2, 2017

Codecov Report

Merging #16204 into master will decrease coverage by <.01%.
The diff coverage is 95.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16204      +/-   ##
==========================================
- Coverage   90.86%   90.86%   -0.01%     
==========================================
  Files         162      162              
  Lines       50867    50887      +20     
==========================================
+ Hits        46222    46240      +18     
- Misses       4645     4647       +2
Flag Coverage Δ
#multiple 88.65% <95.65%> (ø) ⬆️
#single 40.31% <13.04%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/config_init.py 94.4% <100%> (+0.03%) ⬆️
pandas/core/generic.py 91.67% <100%> (ø) ⬆️
pandas/io/formats/printing.py 89.38% <95%> (+1.2%) ⬆️
pandas/core/common.py 90.68% <0%> (-0.35%) ⬇️
pandas/core/dtypes/dtypes.py 94.92% <0%> (-0.12%) ⬇️
pandas/io/json/table_schema.py 95.77% <0%> (+0.18%) ⬆️

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 39cc1d0...529ada4. Read the comment docs.

@TomAugspurger
Copy link
Contributor Author

TomAugspurger commented May 3, 2017

Just FYI @gnestor: _repr_table_schema_ -> _repr_data_resource_

Merging in a couple hours if there are no objections.

@@ -362,7 +362,7 @@ def table_schema_cb(key):
from IPython.core.formatters import BaseFormatter

class TableSchemaFormatter(BaseFormatter):
print_method = '_repr_table_schema_'
Copy link
Contributor

Choose a reason for hiding this comment

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

@TomAugspurger pls move all of the table_schema code out of config_init into somewhere else; the cb should be really short/simple and not include all of this code

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe pandas.io.formats.printing

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

lgtm.

@TomAugspurger TomAugspurger merged commit 67e7efc into pandas-dev:master May 3, 2017
@TomAugspurger TomAugspurger deleted the _repr_data_resource_ branch May 3, 2017 18:23
pcluo pushed a commit to pcluo/pandas that referenced this pull request May 22, 2017
* API Change repr name for table schema

Not API breaking, since pandas 0.20.0 hasn't been released yet.

* REF: Move Formatter to printing

* pep8
stangirala pushed a commit to stangirala/pandas that referenced this pull request Jun 11, 2017
* API Change repr name for table schema

Not API breaking, since pandas 0.20.0 hasn't been released yet.

* REF: Move Formatter to printing

* pep8
yarikoptic added a commit to neurodebian/pandas that referenced this pull request Jul 12, 2017
Version 0.20.0

* tag 'v0.20.0': (742 commits)
  RLS: v0.20.0
  DOC: Whatsnew cleanup (pandas-dev#16245)
  TST: Test CategoricalIndex in test_is_categorical (pandas-dev#16243)
  TST: xfail some bottleneck on windows (pandas-dev#16240)
  DOC, TST: Document and Test Functions in dtypes/common.py (pandas-dev#16237)
  TST: Remove __init__ statements in testing (pandas-dev#16238)
  DOC: don't include all methods/attributes of IntervalIndex (pandas-dev#16221)
  PKG: Fix ModuleNotFoundError: No module named 'pandas.formats' (pandas-dev#16239)
  RLS: v0.20.0rc2
  CLN: make submodules of pandas.util private (pandas-dev#16223)
  MAINT: Remove tm.TestCase from testing (pandas-dev#16225)
  MAINT: Complete Conversion to Pytest Idiom (pandas-dev#16201)
  DOC: add whatsnew for 0.21.0
  DEPR: correct deprecation message for datetools (pandas-dev#16202)
  API Change repr name for table schema (pandas-dev#16204)
  DOC: Remove various warnings from doc build (pandas-dev#16206)
  DOC: add whatsnew for v0.20.1
  BUG: Fixed renaming of falsey names in build_table_schema (pandas-dev#16205)
  COMPAT: ensure proper extension dtype's don't pickle the cache (pandas-dev#16207)
  REF: register custom DisplayFormatter for table schema (pandas-dev#16198)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO JSON read_json, to_json, json_normalize Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants