diff --git a/Dockerfile b/Dockerfile index 4319427e..02dcd180 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/tests/qgrid.py b/tests/qgrid.py new file mode 100644 index 00000000..c2af74ce --- /dev/null +++ b/tests/qgrid.py @@ -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 + }) diff --git a/tests/test_bqplot.py b/tests/test_bqplot.py new file mode 100644 index 00000000..d3ceb2d9 --- /dev/null +++ b/tests/test_bqplot.py @@ -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()