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

cut/paste AccessorProperty and PandasDelegate to core.accessor #17651

Merged
merged 3 commits into from
Sep 24, 2017

Conversation

jbrockmendel
Copy link
Member

To try to get some positive momentum on wrapping up #17042, this PR cut/pastes AccessorProperty and PandasDelegate from core.base to core.accessor, updates the appropriate imports.

The idea is that it will be easier to review actual design changes in isolation of cut/paste changes.

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@jreback
Copy link
Contributor

jreback commented Sep 24, 2017

looks fine; ping when green

@jbrockmendel
Copy link
Member Author

Just pushed a fix for the current issue. Keep the implementation of PandasDelegate in core.accessor, but define the final class in core.base to avoid a circular import.


def __delete__(self, instance):
raise AttributeError("can't delete attribute")
class PandasDelegate(_PandasDelegate, PandasObject):
Copy link
Contributor

Choose a reason for hiding this comment

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

not a fan of this
rather u can simply directly import core.accessor and use it as a mix in class where needed

Copy link
Member Author

Choose a reason for hiding this comment

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

Works for me. Coming right up.

@codecov
Copy link

codecov bot commented Sep 24, 2017

Codecov Report

Merging #17651 into master will decrease coverage by 0.01%.
The diff coverage is 93.1%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17651      +/-   ##
==========================================
- Coverage   91.26%   91.24%   -0.02%     
==========================================
  Files         163      163              
  Lines       49776    49780       +4     
==========================================
- Hits        45426    45421       -5     
- Misses       4350     4359       +9
Flag Coverage Δ
#multiple 89.03% <93.1%> (ø) ⬆️
#single 40.29% <86.2%> (-0.06%) ⬇️
Impacted Files Coverage Δ
pandas/core/indexes/accessors.py 89.24% <100%> (ø) ⬆️
pandas/core/indexes/base.py 96.28% <100%> (ø) ⬆️
pandas/core/frame.py 97.77% <100%> (-0.1%) ⬇️
pandas/core/series.py 94.93% <100%> (ø) ⬆️
pandas/core/base.py 96.58% <100%> (+0.56%) ⬆️
pandas/core/accessor.py 93.65% <91.11%> (-6.35%) ⬇️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️

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 d43aba8...1b1e385. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 24, 2017

Codecov Report

Merging #17651 into master will decrease coverage by 0.01%.
The diff coverage is 93.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17651      +/-   ##
==========================================
- Coverage   91.26%   91.24%   -0.02%     
==========================================
  Files         163      163              
  Lines       49776    49781       +5     
==========================================
- Hits        45426    45422       -4     
- Misses       4350     4359       +9
Flag Coverage Δ
#multiple 89.04% <93.54%> (ø) ⬆️
#single 40.29% <87.09%> (-0.06%) ⬇️
Impacted Files Coverage Δ
pandas/core/base.py 96.56% <ø> (+0.55%) ⬆️
pandas/core/categorical.py 95.28% <100%> (ø) ⬆️
pandas/core/indexes/category.py 97.74% <100%> (ø) ⬆️
pandas/core/indexes/accessors.py 89.36% <100%> (+0.11%) ⬆️
pandas/core/series.py 94.93% <100%> (ø) ⬆️
pandas/core/indexes/base.py 96.28% <100%> (ø) ⬆️
pandas/core/frame.py 97.77% <100%> (-0.1%) ⬇️
pandas/core/accessor.py 93.65% <91.11%> (-6.35%) ⬇️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️

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 d43aba8...1b1e385. Read the comment docs.

@jreback jreback added the Clean label Sep 24, 2017
@jreback jreback added this to the 0.21.0 milestone Sep 24, 2017
@jreback jreback merged commit f8bf129 into pandas-dev:master Sep 24, 2017
@jreback
Copy link
Contributor

jreback commented Sep 24, 2017

thanks!

@jbrockmendel jbrockmendel mentioned this pull request Sep 25, 2017
4 tasks
@jbrockmendel jbrockmendel deleted the accessory2 branch October 30, 2017 16:23
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.

2 participants