Skip to content

Commit b81d9f1

Browse files
authored
Merge pull request #667 from plotly/ff-requires-numpy
FF requires numpy
2 parents ba49d75 + 7e3b358 commit b81d9f1

File tree

6 files changed

+11
-1
lines changed

6 files changed

+11
-1
lines changed

Diff for: CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ which depend on `try-except` blocks containing network requests should be
1212
revisited.
1313
- `plotly.py:sign_in` now validates to the plotly server specified in your
1414
config. If it cannot make a successful request, it raises a `PlotlyError`.
15+
- `plotly.figure_factory` will raise an `ImportError` if `numpy` is not
16+
installed.
1517

1618
### Deprecated
1719
- `plotly.tools.FigureFactory`. Use `plotly.figure_factory.*`.

Diff for: circle.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,9 @@ test:
5252
- sudo chmod -R 444 ${PLOTLY_CONFIG_DIR} && python -c "import plotly"
5353

5454
# test that giving back write permissions works again
55-
# this also has to pass the test suite that follows
5655
- sudo chmod -R 777 ${PLOTLY_CONFIG_DIR} && python -c "import plotly"
56+
57+
# test that figure_factory cannot be imported with only core requirements.
58+
# since optional requirements is part of the test suite, we don't need to
59+
# worry about testing that it *can* be imported in this case.
60+
- $(! python -c "import plotly.figure_factory")

Diff for: plotly/figure_factory/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
from __future__ import absolute_import
22

3+
# Require that numpy exists for figure_factory
4+
import numpy
5+
36
from plotly.figure_factory._2d_density import create_2d_density
47
from plotly.figure_factory._annotated_heatmap import create_annotated_heatmap
58
from plotly.figure_factory._candlestick import create_candlestick

Diff for: plotly/tests/test_optional/test_tools/__init__.py

Whitespace-only changes.

Diff for: setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def readme():
3636
'plotly/api/v2',
3737
'plotly/plotly',
3838
'plotly/plotly/chunked_requests',
39+
'plotly/figure_factory',
3940
'plotly/graph_objs',
4041
'plotly/grid_objs',
4142
'plotly/widgets',

0 commit comments

Comments
 (0)