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

Add Test Coverage for IPython #1256

Merged
merged 20 commits into from Oct 6, 2020
Merged

Add Test Coverage for IPython #1256

merged 20 commits into from Oct 6, 2020

Conversation

bchen1116
Copy link
Contributor

fix #1187

@bchen1116 bchen1116 self-assigned this Oct 1, 2020
return True
return False
except ImportError:
return False
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need for except ImportError if you already have except Exception

@codecov
Copy link

codecov bot commented Oct 2, 2020

Codecov Report

Merging #1256 into main will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1256   +/-   ##
=======================================
  Coverage   99.93%   99.93%           
=======================================
  Files         207      207           
  Lines       13142    13157   +15     
=======================================
+ Hits        13133    13149   +16     
+ Misses          9        8    -1     
Impacted Files Coverage Δ
evalml/tests/utils_tests/test_gen_utils.py 100.00% <100.00%> (ø)
evalml/utils/gen_utils.py 100.00% <100.00%> (+0.88%) ⬆️

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 81bc2a5...4c65abc. Read the comment docs.

@@ -2,6 +2,7 @@ pytest==4.4.1
pytest-xdist==1.26.1
pytest-cov==2.6.1
nbval==0.9.3
IPython>=3.2.1
Copy link
Contributor Author

@bchen1116 bchen1116 Oct 5, 2020

Choose a reason for hiding this comment

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

Added to test-requirements.txt rather than requirements.txt since nbval has an IPython>=5.0.0 dependency, causing the core-dependencies=True test to fail (the full dependency is ipython -> ipykernel -> nbval). @dsherry preferred it to be in requirements.txt, but this change made the tests pass. Input on this is welcome.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is ok!

@bchen1116 bchen1116 marked this pull request as ready for review October 5, 2020 20:50
Copy link
Contributor

@jeremyliweishih jeremyliweishih left a comment

Choose a reason for hiding this comment

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

very nice! Since nbval requires IPython I do agree on the move of IPython to the requirements. Good work!

Copy link
Contributor

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

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

@bchen1116 This looks good to me!

evalml/utils/gen_utils.py Outdated Show resolved Hide resolved
@patch('evalml.utils.gen_utils.import_or_raise')
def test_jupyter_check(mock_import_or_raise):
mock_import_or_raise.return_value = MagicMock()
mock_import_or_raise().core.getipython.get_ipython.return_value = True
Copy link
Contributor

Choose a reason for hiding this comment

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

👏

@bchen1116 bchen1116 merged commit 95ec2db into main Oct 6, 2020
@dsherry dsherry mentioned this pull request Oct 29, 2020
@freddyaboulton freddyaboulton deleted the bc_1187_ipython branch May 13, 2022 14:51
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.

Add test coverage for IPython
4 participants