Skip to content

Added fix and testcase for normalizing with DatetimeTimeIndex entry - #749

Merged
christopherbunn merged 5 commits into
masterfrom
normalize-dti
Sep 20, 2019
Merged

Added fix and testcase for normalizing with DatetimeTimeIndex entry#749
christopherbunn merged 5 commits into
masterfrom
normalize-dti

Conversation

@christopherbunn

Copy link
Copy Markdown
Contributor

Fixes #740 by setting all DatetimeTimeIndex variables in additional_variable and copy_variables to Datetime

@codecov

codecov Bot commented Sep 17, 2019

Copy link
Copy Markdown

Codecov Report

Merging #749 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #749      +/-   ##
==========================================
+ Coverage   97.65%   97.65%   +<.01%     
==========================================
  Files         118      118              
  Lines       10364    10381      +17     
==========================================
+ Hits        10121    10138      +17     
  Misses        243      243
Impacted Files Coverage Δ
featuretools/entityset/entityset.py 95.69% <100%> (+0.1%) ⬆️
featuretools/tests/entityset_tests/test_es.py 100% <100%> (ø) ⬆️
...computational_backends/calculate_feature_matrix.py 98.23% <0%> (-0.01%) ⬇️
...utational_backend/test_calculate_feature_matrix.py 99.37% <0%> (-0.01%) ⬇️
featuretools/tests/synthesis/test_dfs_method.py 100% <0%> (ø) ⬆️

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 2ff8d17...bea8167. Read the comment docs.

Comment thread featuretools/entityset/entityset.py
Comment thread featuretools/entityset/entityset.py Outdated
base_time_index = base_entity.time_index
t_index = base_entity[base_time_index]
if not isinstance(t_index, (vtypes.NumericTimeIndex, vtypes.DatetimeTimeIndex)):
raise TypeError("{0} is not a NumericTimeIndex or DatetimeTimeIndex, but type {1}".format(base_time_index, type(t_index)))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's start the error message with "Time index {0}" so there's more context about the error. And at the end of the error message we can add a suggestion for fixing it by running set_time_index on the entity.

I think we should make this a sanity check we run any time normalize_entity is called since if this gets triggered the entity is definitely misconfigured

@rwedge rwedge left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

@christopherbunn
christopherbunn merged commit 07f6379 into master Sep 20, 2019
@christopherbunn
christopherbunn deleted the normalize-dti branch September 20, 2019 15:25
@rwedge rwedge mentioned this pull request Sep 30, 2019
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.

normalize_entity errors when copying time index variable to new, non-time-indexed entity

2 participants