-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 JS tests for Jupyter NBs #549
Conversation
|
||
|
||
class PlotlyJupyterTestCase(TestCase): | ||
def setUp(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Execute fixture NB and convert results to HTML
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐄 set_up
or setup
for python 🐍_case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Will be good to get some more solid tests in for nb's. |
So awesome, @etpinard!! Nice work, man! |
@etpinard I'm assuming this just got back-burnered with other work, but this would be really nice to test. Status update? |
@theengineear I got everything working locally in both python 2.7 and 3.4 Upgrading |
## ipython dependencies ## | ||
ipython[all]==3.0.0 | ||
## ipython ## | ||
ipython |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@theengineear this didn't go down so smooth on Circle.
Yup. I just upgraded our test framework to use Challenge accepted 😸 |
- add coverage to optional requirements - pip install optional requirements and no need for nothing else
- make lib/server.js handle arbitrary html index and js test file (to test multiple ipynb fixutres) - use ipykernel to determine which python version nosetest is launched w/ - use domready to make sure that tests are ran after DOM is ready
- one testing offline connected=True - one testing offline connected=False (the default)
@etpinard, the tests are failing for me locally because they're looking for a custom.css file? Adding a blank Initial error:After adding
|
Also, I did a little (emphasis on little) about testing jupyter notebooks: Not sure if you saw either of these, but it might be sweet to try and use a 3rd party tool so we don't have to maintain (ipython_nose). I'm not 100% sure if we can test what we need to test from inside a notebook cell, but I might take some time to check that out. |
^^ nvm, all good. helps if you |
0511421
to
c5df158
Compare
c5df158
to
8850feb
Compare
Holy intermittent image server tests... getting a ton of:
|
^^ for the image server fails... |
Just wrapping them in a loop so that we can retry as needed for now.
59e6cc0
to
7da7ed2
Compare
Behold: JS tests in Jupyter Notebooks are coming to plotly.py
My strategy was the following:
ipynb
fixture files with plotly.py code cells but no outputsipynb
JSON to HTML using nbconver apiStep 5 was a little harder than I thought. There's a ton of test runners that take a JS bundle, shim it into an HTML page and run the tests. But, I couldn't find any test runner that takes an already made
HTML page and runs the test there. A few runners allow you to add HTML to their default test page, but I couldn't get the results I wanted, so I decided to build my little test runner see
lib/server.js
TODO:
@chriddyp @theengineear @cldougl @mdtusz