Skip to content

Rearrange _NaT to be valid python; add attributes tests #17756

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

Closed
wants to merge 4 commits into from

Conversation

jbrockmendel
Copy link
Member

At the moment the organization of tslib is not valid python: child classes are defined above parent classes. This PR fixes that for _NaT and NaTType.

This is necessary because trying to implement more important changes in NaTType is leading to build errors:

pandas/_libs/tslib.c:103540:3: error: use of undeclared identifier '__pyx_base'; did you mean '__pyx_k_base'?
  __pyx_base.nanosecond = __pyx_t_12;

Hopefully fixing this will fix the build error.

This also implements tests for NaT namespace/docstrings.

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

@pep8speaks
Copy link

pep8speaks commented Oct 3, 2017

Hello @jbrockmendel! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on October 03, 2017 at 15:27 Hours UTC

@codecov
Copy link

codecov bot commented Oct 3, 2017

Codecov Report

Merging #17756 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17756      +/-   ##
==========================================
- Coverage   91.25%   91.23%   -0.02%     
==========================================
  Files         163      163              
  Lines       49856    49856              
==========================================
- Hits        45496    45487       -9     
- Misses       4360     4369       +9
Flag Coverage Δ
#multiple 89.03% <ø> (ø) ⬆️
#single 40.25% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.73% <0%> (-0.1%) ⬇️

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 97fea48...6b54e8d. Read the comment docs.

@codecov
Copy link

codecov bot commented Oct 3, 2017

Codecov Report

Merging #17756 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17756      +/-   ##
==========================================
- Coverage   91.23%   91.21%   -0.02%     
==========================================
  Files         163      163              
  Lines       49869    49869              
==========================================
- Hits        45499    45490       -9     
- Misses       4370     4379       +9
Flag Coverage Δ
#multiple 89.01% <ø> (ø) ⬆️
#single 40.24% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.73% <0%> (-0.1%) ⬇️

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 2ff1241...bba888d. Read the comment docs.

@jreback
Copy link
Contributor

jreback commented Oct 3, 2017

what exactly does this fix? there are no current build errros

@jbrockmendel
Copy link
Member Author

It's pre-emptive. Note the branch name has a "2". That's because build errors occurred in tslibs-nattype. Trying to keep PRs small to be easily reviewable.

@jbrockmendel
Copy link
Member Author

Supserseded by #17765, where the build errors are now fixed.

@jbrockmendel jbrockmendel deleted the tslibs-nattype2 branch October 30, 2017 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants