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

Resolve bug preventing using first column as index by default #308

Merged
merged 5 commits into from Nov 12, 2018

Conversation

Projects
None yet
2 participants
@bentona
Contributor

bentona commented Nov 7, 2018

While working on #248, I hit a snag on handling index creation, and I noticed that this elif clause seems to never get hit.

It looks like None is not in every list, so when index is None, index not in dataframe.columns is always false unless None is explicitly in the list.

I took the opportunity to flatten out the logic a little bit, it seems safe to pull the index setting into the previous check for a None index.

bentona added some commits Nov 4, 2018

@codecov

This comment has been minimized.

codecov bot commented Nov 7, 2018

Codecov Report

Merging #308 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #308      +/-   ##
=========================================
+ Coverage   95.06%   95.1%   +0.04%     
=========================================
  Files          71      71              
  Lines        7660    7666       +6     
=========================================
+ Hits         7282    7291       +9     
+ Misses        378     375       -3
Impacted Files Coverage Δ
featuretools/entityset/entityset.py 95.58% <100%> (+0.59%) ⬆️
featuretools/tests/entityset_tests/test_es.py 99.38% <100%> (ø) ⬆️

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 dd0abf7...5b146da. Read the comment docs.

@kmax12

This comment has been minimized.

Member

kmax12 commented Nov 8, 2018

good find, thanks!

before merging, we should add a test case for inferring the first column is the index. This should be defined in test_es.py near the other tests about the index

@bentona

This comment has been minimized.

Contributor

bentona commented Nov 11, 2018

@kmax12 Hey, just added a (failing) test. The actual error is a bit incomprehensible, so given our earlier discussion about confusing error messages, along with the fact it wasn't getting used enough to trigger any other bug reports, I thought you might just want to yank the feature. Either way I didn't want to spin my wheels too much on this before wrapping up the rest of the SQL feature - let me know how to proceed.

@kmax12

This comment has been minimized.

Member

kmax12 commented Nov 12, 2018

it looks like it's only failing test because of linting

just three issues related to whitespace

featuretools/tests/entityset_tests/test_es.py:214:53: E231 missing whitespace after ','
featuretools/tests/entityset_tests/test_es.py:221:62: E231 missing whitespace after ','
featuretools/tests/entityset_tests/test_es.py:221:66: E231 missing whitespace after ','
@kmax12

This comment has been minimized.

Member

kmax12 commented Nov 12, 2018

I see now the test was actually failing too. I just pushed a commit to update the test

@kmax12 kmax12 merged commit 71381e1 into Featuretools:master Nov 12, 2018

3 checks passed

codecov/patch 100% of diff hit (target 95.06%)
Details
codecov/project 95.1% (+0.04%) compared to dd0abf7
Details
license/cla Contributor License Agreement is signed.
Details

@rwedge rwedge referenced this pull request Nov 29, 2018

Merged

v0.4.1 #329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment