Skip to content

Add global test for NaturalLanguage primitives#2429

Merged
gsheni merged 48 commits into
mainfrom
add-randomized-test-for-natlangs
Jan 11, 2023
Merged

Add global test for NaturalLanguage primitives#2429
gsheni merged 48 commits into
mainfrom
add-randomized-test-for-natlangs

Conversation

@sbadithe

@sbadithe sbadithe commented Dec 23, 2022

Copy link
Copy Markdown
Contributor
  • As per discussion in Fix backtracking in NumberOfWordsInQuotes primitive #2413, this adds a test that checks strings that have caused errors in the past, as well as randomized test inputs to make sure none of our NaturalLanguage primitives hang or fail on generated input.
  • Adds get_natural_language_primitives and refactors get_transform_primitives and get_aggregation_primitives utility functions

@sbadithe
sbadithe marked this pull request as ready for review December 23, 2022 02:23
@codecov

codecov Bot commented Dec 23, 2022

Copy link
Copy Markdown

Codecov Report

Merging #2429 (b7eb0e4) into main (77dab52) will decrease coverage by 0.00%.
The diff coverage is 97.05%.

@@            Coverage Diff             @@
##             main    #2429      +/-   ##
==========================================
- Coverage   99.41%   99.40%   -0.01%     
==========================================
  Files         340      341       +1     
  Lines       20870    20890      +20     
==========================================
+ Hits        20747    20766      +19     
- Misses        123      124       +1     
Impacted Files Coverage Δ
featuretools/primitives/utils.py 98.95% <95.00%> (-0.51%) ⬇️
featuretools/tests/conftest.py 100.00% <100.00%> (ø)
...ests/test_natural_language_primitives_terminate.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Comment thread docs/source/release_notes.rst Outdated
@ozzieD

ozzieD commented Jan 5, 2023

Copy link
Copy Markdown
Contributor

I wonder why code cov is looking through test files?

@rwedge

rwedge commented Jan 5, 2023

Copy link
Copy Markdown
Contributor

I wonder why code cov is looking through test files?

Codecov is configured to check our test files as well

@sbadithe sbadithe changed the title Add randomized test for NaturalLanguage primitives Add global test for NaturalLanguage primitives Jan 6, 2023
@sbadithe

Copy link
Copy Markdown
Contributor Author

@sbadithe Did you look at pytest-timeout as an option here? Could we use this instead of trying to implement this manually? The downside is that we would need to add another testing dependency.

https://github.com/pytest-dev/pytest-timeout

Is it ok if it hasn't been updated since January 2022 on pypi?

@thehomebrewnerd

Copy link
Copy Markdown
Contributor

Is it ok if it hasn't been updated since January 2022 on pypi?

@sbadithe In my opinion, yes. This is a simple library, so I wouldn't expect many updates. Also, this is a test only dependency, so we can always replace in the future if needed and it won't break FT. Finally, it is maintained by the pytest folks. All those factors combined make it a low risk add IMHO.

@gsheni
gsheni enabled auto-merge (squash) January 10, 2023 19:19
@sbadithe
sbadithe disabled auto-merge January 10, 2023 19:36
@sbadithe
sbadithe enabled auto-merge (squash) January 10, 2023 23:42
@gsheni
gsheni disabled auto-merge January 11, 2023 18:51
@gsheni
gsheni merged commit 1817991 into main Jan 11, 2023
@gsheni
gsheni deleted the add-randomized-test-for-natlangs branch January 11, 2023 18:52
@ozzieD ozzieD mentioned this pull request Jan 18, 2023
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.

5 participants