Skip to content

Commit

Permalink
Merge pull request #601 from marketneutral/master
Browse files Browse the repository at this point in the history
Add bqplot and qgrid
  • Loading branch information
Philmod committed Sep 12, 2019
2 parents d31b5f2 + bc6b2d1 commit b358d22
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,8 @@ RUN pip install flashtext && \
pip install osmnx && \
apt-get -y install libspatialindex-dev && \
pip install pytorch-ignite && \
pip install qgrid && \
pip install bqplot && \
/tmp/clean-layer.sh

# Tesseract and some associated utility packages
Expand Down
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()

0 comments on commit b358d22

Please sign in to comment.