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 bqplot and qgrid #601

Merged
merged 3 commits into from
Sep 12, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add qgrid and bqplot to Dockerfile; add tests for both
  • Loading branch information
Jonathan Larkin committed Aug 13, 2019
commit add8678c38225e53f345489c778c708517ca6e94
15 changes: 15 additions & 0 deletions tests/qgrid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import unittest
import pandas as pd
from qgrid import QgridWidget

class TestQgrid(unittest.TestCase):
def test_nans():
df = pd.DataFrame([(pd.Timestamp('2017-02-02'), np.nan),
(4, 2),
('foo', 'bar')])
view = QgridWidget(df=df)
view._handle_qgrid_msg_helper({
'type': 'change_sort',
'sort_field': 1,
'sort_ascending': True
})
14 changes: 14 additions & 0 deletions tests/test_bqplot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import unittest
import numpy as np
import bqplot.pyplot as plt

class TestBqplot(unittest.TestCase):
def test_figure(self):
size = 100
scale = 100.0
np.random.seed(0)
x_data = np.arange(size)
y_data = np.cumsum(np.random.randn(size) * scale)
fig = plt.figure(title='First Example')
plt.plot(y_data)
fig.save_png()