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

[CLN] Merge inference into lib.pyx #22219

Merged
merged 2 commits into from
Aug 8, 2018
Merged

Conversation

jbrockmendel
Copy link
Member

Continue trimming down _libs/src.

src/inference is a minor hassle, particularly because ATM there are imports/cimports in both it and lib. Its existence also complicates setup.py a bit.

Evidently parse_helper.h depended on the order in which it was included (I assume this is a code smell in C, but who knows). Fixed this.

This is almost cut/paste. The changes are:

  • Arrange (and de-duplicate) imports at the top of lib
  • whitespace fixups
  • change for i from 0 <= i < n: to for i in range(n): in a few places
  • a couple of comments about potential optimizations in the next pass

@codecov
Copy link

codecov bot commented Aug 6, 2018

Codecov Report

Merging #22219 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #22219      +/-   ##
==========================================
+ Coverage   92.06%   92.06%   +<.01%     
==========================================
  Files         169      169              
  Lines       50698    50698              
==========================================
+ Hits        46675    46676       +1     
+ Misses       4023     4022       -1
Flag Coverage Δ
#multiple 90.47% <ø> (ø) ⬆️
#single 42.32% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/indexes/base.py 96.43% <0%> (+0.05%) ⬆️

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 0041681...6d33432. Read the comment docs.

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.

why is this a good idea? i thought we discussed a long time ago to make this a separate module
isn’t that better than making s bigger module? or is this just not possible ?

@jbrockmendel
Copy link
Member Author

why is this a good idea? i thought we discussed a long time ago to make this a separate module
isn’t that better than making s bigger module? or is this just not possible ?

Think of these as orthogonal goals. This doesn't change the size of the module, just un-splits the file. ATM I find myself switching between files to make sure I know what's in the namespace, which really doesn't have any upside. Plus its progress towards killing off src/

There are a few more things we can move out; most of the low-hanging fruit has been picked.

@gfyoung gfyoung added Internals Related to non-user accessible pandas implementation Clean labels Aug 7, 2018
@jreback jreback added this to the 0.24.0 milestone Aug 8, 2018
@jreback jreback merged commit 6aded0d into pandas-dev:master Aug 8, 2018
@jreback
Copy link
Contributor

jreback commented Aug 8, 2018

ok this is fine, ideally can pull out a separate inference module that is orthogonal though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Internals Related to non-user accessible pandas implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants