Skip to content

Commit 6d5c501

Browse files
authored
Merge pull request #103 from rspencer01/walk_dependencies
Unpin packages
2 parents 2dd9061 + 37e8633 commit 6d5c501

File tree

7 files changed

+30
-23
lines changed

7 files changed

+30
-23
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ defaults: &defaults
2323
- run: sudo apt-get install poppler-utils
2424
- run: sudo apt-get install pandoc
2525
- run: npm install
26-
- run: npm install highcharts@5.0.11 highcharts-heatmap highcharts-export-csv highcharts-exporting highcharts-funnel
26+
- run: npm install highcharts@10.0.0
2727
# Phantomjs is required to Bokeh static output
2828
- run: npm install phantomjs-prebuilt
2929
- run:
@@ -33,14 +33,14 @@ defaults: &defaults
3333
. ci/bin/activate
3434
pip install jsmin
3535
pip install six
36-
pip install "numpy<2"
37-
pip install "bokeh<=2.4"
36+
pip install numpy
37+
pip install bokeh
3838
pip install plotly
3939
pip install lxml
4040
pip install coveralls
4141
pip install -r docs/source/requirements.txt
42-
python setup.py install --highcharts=node_modules/highcharts/,node_modules/highcharts-heatmap/,node_modules/highcharts-funnel,node_modules/highcharts-exporting,node_modules/highcharts-export-csv --wkhtmltopdf=wkhtmltox/bin
43-
python setup.py load_highcharts --highcharts=node_modules/highcharts/,node_modules/highcharts-heatmap/,node_modules/highcharts-funnel,node_modules/highcharts-exporting,node_modules/highcharts-export-csv
42+
python setup.py install --highcharts=node_modules/highcharts/,node_modules/highcharts/modules/ --wkhtmltopdf=wkhtmltox/bin
43+
python setup.py load_highcharts --highcharts=node_modules/highcharts/,node_modules/highcharts/modules
4444
# Save dependency cache
4545
- save_cache:
4646
key: v1-dep-{{ .Branch }}-{{ epoch }}
@@ -55,7 +55,7 @@ defaults: &defaults
5555
. ci/bin/activate
5656
mkdir -p /tmp/circleci-test-results
5757
python setup.py test --pytest-args="--junitxml=/tmp/circleci-test-results/junit.xml"
58-
python setup.py build_sphinx
58+
sphinx-build docs/source build/sphinx/html
5959
- run:
6060
name: Get code coverage
6161
command: |

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pip install --install-option="INSTALL OPTIONS" git+https://github.com/manahl/pyb
4141
e.g.
4242

4343
```
44-
pip install --install-option="--highcharts=~/node_modules/highcharts/,~/node_modules/highcharts-heatmap/" git+https://github.com/manahl/pybloqs.git
44+
pip install --install-option="--highcharts=~/node_modules/highcharts/,~/node_modules/highcharts/modules/" git+https://github.com/manahl/pybloqs.git
4545
```
4646

4747

@@ -83,21 +83,17 @@ pip install pybloqs[plotly]
8383
- HighCharts (optional; proprietary license, see https://shop.highsoft.com/highcharts-t2):
8484

8585
Highcharts is not bundled with PyBloqs. To create blocks with Highcharts plots, you need to download Highcharts
86-
separately (e.g. with `npm install highcharts`, `npm install highcharts-heatmap` etc.), and provide the path to your
87-
highcharts installation. Please make sure you have the right license for Highcharts. For full functionality you will
88-
need the following highcharts packages: highcharts, highcharts-heatmap, highcharts-funnel, highcharts-exporting,
89-
highcharts-export-csv (this example assumes, npm installed files into directory ~/node_modules).
86+
separately (e.g. with `npm install highcharts`), and provide the path to your
87+
highcharts installation. PyBloqs currently only support `highcharts^10.0.0`.
88+
Please make sure you have the right license for Highcharts. This example assumes, npm installed files into directory ~/node_modules).
9089

9190
```
92-
--highcharts=~/node_modules/highcharts/,
93-
~/node_modules/highcharts-heatmap/,~/node_modules/highcharts-funnel,~/node_modules/highcharts-exporting,
94-
~/node_modules/highcharts-export-csv
91+
--highcharts=~/node_modules/highcharts/,~/node_modules/highcharts/modules
9592
```
9693

9794
When installing in development mode you can load highcharts explicitly (this example assumes, npm installed files into directory ~/node_modules)
9895
```
99-
python setup.py load_highcharts --highcharts=~/node_modules/highcharts/,~/node_modules/highcharts-heatmap/,\
100-
~/node_modules/highcharts-funnel,~/node_modules/highcharts-exporting,~/node_modules/highcharts-export-csv
96+
python setup.py load_highcharts --highcharts=~/node_modules/highcharts/,~/node_modules/highcharts/modules/
10197
```
10298

10399
### Using PyBloqs

docs/source/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
nbconvert
2-
sphinx<=5.0
2+
sphinx
33
nbsphinx
44
matplotlib
55
ipython[notebook]

pybloqs/block/image.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,19 @@
2323

2424
try:
2525
try:
26-
from bokeh.resources import CSSResources, JSResources
26+
# Bokeh >= 3.1
27+
from bokeh.resources import Resources
28+
JSResources = Resources
29+
CSSResources = Resources
2730
except ImportError:
28-
from bokeh.templates import CSSResources, JSResources
29-
from bokeh.plotting.figure import Figure as BokehFigure
31+
try:
32+
from bokeh.resources import CSSResources, JSResources
33+
except ImportError:
34+
from bokeh.templates import CSSResources, JSResources
35+
try:
36+
from bokeh.plotting.figure import Figure as BokehFigure
37+
except ImportError:
38+
from bokeh.plotting import figure as BokehFigure
3039
from bokeh.embed.standalone import components
3140
from bokeh.io import export_png
3241
_BOKEH_AVAILABLE = True

pybloqs/plot/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
_range_plots = {"arearange", "areasplinerange", "candlestick", "columnrange", "ohlc"}
2323

2424
HIGHCHARTS_MAIN = "highstock"
25-
HIGHCHARTS_MODULES = ["highcharts-more", "highcharts-3d", "heatmap", "funnel", "exporting", "export-csv"]
25+
HIGHCHARTS_MODULES = ["highcharts-more", "highcharts-3d", "heatmap", "funnel", "exporting", "export-data"]
2626
HIGHCHARTS_PYBLOQS = "highcharts-pybloqs"
2727
# Ordering has to be: main, modules, pybloqs-specific
2828
HIGHCHARTS_ALL = [HIGHCHARTS_MAIN] + HIGHCHARTS_MODULES + [HIGHCHARTS_PYBLOQS]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def run_tests(self):
223223
],
224224
extras_require={
225225
"docs_and_notebook": [
226-
"sphinx<=5.0",
226+
"sphinx",
227227
"nbsphinx",
228228
"ipython[notebook]",
229229
"sphinxcontrib-apidoc",

tests/integration/generate/test_image.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from bokeh.models import ColumnDataSource, FactorRange
55
from bokeh.plotting import figure
66

7-
from pybloqs.block.image import PlotBlock, ImgBlock, PlotlyPlotBlock, BokehPlotBlock
7+
from pybloqs.block.image import PlotBlock, ImgBlock, PlotlyPlotBlock, BokehPlotBlock, _BOKEH_AVAILABLE
88
from .generation_framework import assert_report_generated
99
import plotly.graph_objs as go
1010

@@ -51,6 +51,8 @@ def test_plotlyplot():
5151

5252
return PlotlyPlotBlock(fig)
5353

54+
def test_bokeh_available():
55+
assert _BOKEH_AVAILABLE
5456

5557
@assert_report_generated
5658
def test_bokehplot():

0 commit comments

Comments
 (0)