Skip to content

Fix list_primitives#391

Merged
gsheni merged 8 commits intomasterfrom
list_primitive_fix
Feb 2, 2019
Merged

Fix list_primitives#391
gsheni merged 8 commits intomasterfrom
list_primitive_fix

Conversation

@gsheni
Copy link
Copy Markdown
Contributor

@gsheni gsheni commented Feb 1, 2019

  • Fixed list_primitives
  • Added test case

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 1, 2019

Codecov Report

Merging #391 into master will increase coverage by 0.19%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #391      +/-   ##
==========================================
+ Coverage   95.78%   95.97%   +0.19%     
==========================================
  Files          90       91       +1     
  Lines        7882     7908      +26     
==========================================
+ Hits         7550     7590      +40     
+ Misses        332      318      -14
Impacted Files Coverage Δ
featuretools/primitives/utils.py 100% <100%> (+37.83%) ⬆️
...uretools/tests/utils_tests/test_list_primitives.py 100% <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 be812d8...c5b0ec7. Read the comment docs.

assert x in df['name'].values.tolist()
for x in ['aggregation', 'transform']:
assert x in df['type'].values.tolist()
chars_desc = 'Return the characters in a given string.'
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.

Get the description text from the primitive object itself.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

chars_desc = 'Return the characters in a given string.'
day_desc = 'Transform a Datetime feature into the day.'
last_desc = 'Returns the last value.'
for x in [chars_desc] + [day_desc] + [last_desc]:
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.

There could still be an out of order problem. The test should find the row of the primitive and then check the description matches

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@gsheni gsheni changed the title added test Fix list_primitives Feb 1, 2019


def test_descriptions():
primitives = {NumCharacters: 'Return the characters in a given string.',
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.

can we add one primitive here that doesn't have a description so we can test the "" case?.

otherwise, it all looks good to merge

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@gsheni gsheni merged commit a22d852 into master Feb 2, 2019
@gsheni gsheni deleted the list_primitive_fix branch February 2, 2019 00:14
@rwedge rwedge mentioned this pull request Feb 15, 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.

2 participants