Skip to content

Commit 2e5bf6e

Browse files
authored
Release 3.3.0 (#1205)
* Bump version for release candidate * Update changelong for version 3.3.0 * Build js * Add codegen special case for `layout.polar.bargap` and `layout.polar.barmode` * Add bdist_wheel to release instructions * Bump versions to final * Update installation instruction versions to final * Finalize changelog
1 parent c5a9ac3 commit 2e5bf6e

File tree

15 files changed

+218
-12
lines changed

15 files changed

+218
-12
lines changed

CHANGELOG.md

+66
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,72 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [3.3.0] - 2018-09-28
6+
7+
### Updated
8+
- Updated Plotly.js to version 1.41.3. Select highlights included below, see
9+
[the plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#1413----2018-09-25)
10+
for more information.
11+
- Do not create or check permissions on the `~/.plotly` configuration
12+
directory until a configuration write operation is performed
13+
([#1195](https://github.com/plotly/plotly.py/pull/1195)). This change
14+
avoids some concurrency problems associated with running many instances of
15+
plotly.py simultaneously
16+
([#1068](https://github.com/plotly/plotly.py/issues/1068)).
17+
18+
### Added
19+
- Enable selection by clicking on points via new layout attribute `clickmode` and flag `'select'`
20+
([#2944](https://github.com/plotly/plotly.js/pull/2944))
21+
- Added stacked area charts via new attributes `stackgroup` and `stackgaps` in scatter traces
22+
([#2960](https://github.com/plotly/plotly.js/pull/2960))
23+
- Added `barpolar` trace type - which replace and augment area traces
24+
([#2954](https://github.com/plotly/plotly.js/pull/2954))
25+
- Added `polar.hole` layout parameter to punch hole at the middle of polar
26+
subplot offsetting the start of the radial range
27+
([#2977](https://github.com/plotly/plotly.js/pull/2977), [#2996](https://github.com/plotly/plotly.js/pull/2996))
28+
- Figures may now be easily converted to and from JSON using the new
29+
`to_json`, `from_json`, `read_json`, and `write_json` functions in the
30+
`plotly.io` package
31+
([#1188](https://github.com/plotly/plotly.py/pull/1188))
32+
- Figures and graph objects now support `deepcopy` and `pickle` operations
33+
([#1191](https://github.com/plotly/plotly.py/pull/1191))
34+
- The location of the `"~/.plotly"` settings directory may now be customized
35+
using the `PLOTLY_DIR` environment variable
36+
([#1195](https://github.com/plotly/plotly.py/pull/1195))
37+
- Added optional `scaleratio` argument to the `create_quiver` figure factory.
38+
When specified, the axes are restricted to this ratio and the quiver arrows
39+
are computed to have consistent lengths across angles.
40+
([#1197](https://github.com/plotly/plotly.py/pull/1197))
41+
42+
### Fixed
43+
- Replace use of `pkg_resources.resource_string` with `pkgutil.get_data` to
44+
improve compatibility with `cx_Freeze`
45+
([#1201](https://github.com/plotly/plotly.py/pull/1201))
46+
- An exception is no longer raised when an optional dependency raises an
47+
exception on import. The exception is logged and plotly.py continues as if
48+
the dependency were not installed
49+
([#1192](https://github.com/plotly/plotly.py/pull/1192))
50+
- Fixed invalid dendrogram axis labels when the points being clustered contain
51+
duplicate values
52+
([#1186](https://github.com/plotly/plotly.py/pull/1186))
53+
- Added missing LICENSE.txt file to PyPI source distribution
54+
([#765](https://github.com/plotly/plotly.py/issues/765))
55+
56+
### JupyterLab Versions
57+
For use with JupyterLab, the following versions of the following packages
58+
must be installed:
59+
60+
- Python Packages
61+
- plotly==3.3.0
62+
- ipywidgets>=7.2
63+
- notebook>=5.3
64+
- jupyterlab==0.34
65+
66+
- JupyterLab Extensions
67+
68+
- @jupyter-widgets/jupyterlab-manager@0.37
69+
- @jupyterlab/plotly-extension@0.17
70+
571
## [3.2.1] - 2018-09-14
672
This is a patch release that fixes a few bugs and reintroduces a few
773
version 2 features that were not supported in version 3.

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
5454

5555
plotly.py may be installed using pip...
5656
```
57-
pip install plotly==3.2.1
57+
pip install plotly==3.3.0
5858
```
5959

6060
or conda.
6161
```
62-
conda install -c plotly plotly=3.2.1
62+
conda install -c plotly plotly=3.3.0
6363
```
6464

6565
### Jupyter Notebook Support
@@ -102,10 +102,10 @@ set NODE_OPTIONS=--max-old-space-size=4096
102102
jupyter labextension install @jupyter-widgets/[email protected] --no-build
103103
104104
# FigureWidget support
105-
jupyter labextension install plotlywidget@0.3.0 --no-build
105+
jupyter labextension install plotlywidget@0.4.0 --no-build
106106
107107
# offline iplot support
108-
jupyter labextension install @jupyterlab/[email protected] --no-build
108+
jupyter labextension install @jupyterlab/[email protected].2 --no-build
109109
110110
# Build extensions (must be done to activate extensions since --no-build is used above)
111111
jupyter lab build

codegen/utils.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,11 @@ def __init__(self, plotly_schema, node_path=(), parent=None):
990990
# Get list of additional layout properties for each trace
991991
trace_layouts = [
992992
plotly_schema['traces'][trace].get('layoutAttributes', {})
993-
for trace in plotly_schema['traces']]
993+
for trace in plotly_schema['traces'] if trace != 'barpolar']
994+
995+
extra_polar_nodes = (plotly_schema['traces']['barpolar']
996+
.get('layoutAttributes', {}))
997+
layout['polar'].update(extra_polar_nodes)
994998

995999
# Chain together into layout_data
9961000
self.layout_data = ChainMap(layout, *trace_layouts)

contributing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ And, you'll need the credentials file `~/.pypirc`. Request access from
290290
```bash
291291
(plotly.py) $ git checkout release_X.Y.Z
292292
(plotly.py) $ git stash
293-
(plotly.py) $ python setup.py sdist
293+
(plotly.py) $ python setup.py sdist bdist_wheel
294294
(plotly.py) $ twine upload dist/plotly-X.Y.Zrc1*
295295
```
296296

js/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "plotlywidget",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"description": "The plotly.py ipywidgets library",
55
"author": "The plotly.py team",
66
"license": "MIT",

plotly/graph_objs/_layout.py

+12
Original file line numberDiff line numberDiff line change
@@ -1574,6 +1574,18 @@ def polar(self):
15741574
angularaxis
15751575
plotly.graph_objs.layout.polar.AngularAxis
15761576
instance or dict with compatible properties
1577+
bargap
1578+
Sets the gap between bars of adjacent location
1579+
coordinates. Values are unitless, they
1580+
represent fractions of the minimum difference
1581+
in bar positions in the data.
1582+
barmode
1583+
Determines how bars at the same location
1584+
coordinate are displayed on the graph. With
1585+
"stack", the bars are stacked on top of one
1586+
another With "overlay", the bars are plotted
1587+
over one another, you might need to an
1588+
"opacity" to see multiple bars.
15771589
bgcolor
15781590
Set the background color of the subplot
15791591
domain

plotly/graph_objs/layout/_polar.py

+77
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,53 @@ def angularaxis(self):
259259
def angularaxis(self, val):
260260
self['angularaxis'] = val
261261

262+
# bargap
263+
# ------
264+
@property
265+
def bargap(self):
266+
"""
267+
Sets the gap between bars of adjacent location coordinates.
268+
Values are unitless, they represent fractions of the minimum
269+
difference in bar positions in the data.
270+
271+
The 'bargap' property is a number and may be specified as:
272+
- An int or float in the interval [0, 1]
273+
274+
Returns
275+
-------
276+
int|float
277+
"""
278+
return self['bargap']
279+
280+
@bargap.setter
281+
def bargap(self, val):
282+
self['bargap'] = val
283+
284+
# barmode
285+
# -------
286+
@property
287+
def barmode(self):
288+
"""
289+
Determines how bars at the same location coordinate are
290+
displayed on the graph. With "stack", the bars are stacked on
291+
top of one another With "overlay", the bars are plotted over
292+
one another, you might need to an "opacity" to see multiple
293+
bars.
294+
295+
The 'barmode' property is an enumeration that may be specified as:
296+
- One of the following enumeration values:
297+
['stack', 'overlay']
298+
299+
Returns
300+
-------
301+
Any
302+
"""
303+
return self['barmode']
304+
305+
@barmode.setter
306+
def barmode(self, val):
307+
self['barmode'] = val
308+
262309
# bgcolor
263310
# -------
264311
@property
@@ -723,6 +770,17 @@ def _prop_descriptions(self):
723770
angularaxis
724771
plotly.graph_objs.layout.polar.AngularAxis instance or
725772
dict with compatible properties
773+
bargap
774+
Sets the gap between bars of adjacent location
775+
coordinates. Values are unitless, they represent
776+
fractions of the minimum difference in bar positions in
777+
the data.
778+
barmode
779+
Determines how bars at the same location coordinate are
780+
displayed on the graph. With "stack", the bars are
781+
stacked on top of one another With "overlay", the bars
782+
are plotted over one another, you might need to an
783+
"opacity" to see multiple bars.
726784
bgcolor
727785
Set the background color of the subplot
728786
domain
@@ -753,6 +811,8 @@ def __init__(
753811
self,
754812
arg=None,
755813
angularaxis=None,
814+
bargap=None,
815+
barmode=None,
756816
bgcolor=None,
757817
domain=None,
758818
gridshape=None,
@@ -772,6 +832,17 @@ def __init__(
772832
angularaxis
773833
plotly.graph_objs.layout.polar.AngularAxis instance or
774834
dict with compatible properties
835+
bargap
836+
Sets the gap between bars of adjacent location
837+
coordinates. Values are unitless, they represent
838+
fractions of the minimum difference in bar positions in
839+
the data.
840+
barmode
841+
Determines how bars at the same location coordinate are
842+
displayed on the graph. With "stack", the bars are
843+
stacked on top of one another With "overlay", the bars
844+
are plotted over one another, you might need to an
845+
"opacity" to see multiple bars.
775846
bgcolor
776847
Set the background color of the subplot
777848
domain
@@ -830,6 +901,8 @@ def __init__(
830901
# Initialize validators
831902
# ---------------------
832903
self._validators['angularaxis'] = v_polar.AngularAxisValidator()
904+
self._validators['bargap'] = v_polar.BargapValidator()
905+
self._validators['barmode'] = v_polar.BarmodeValidator()
833906
self._validators['bgcolor'] = v_polar.BgcolorValidator()
834907
self._validators['domain'] = v_polar.DomainValidator()
835908
self._validators['gridshape'] = v_polar.GridshapeValidator()
@@ -841,6 +914,10 @@ def __init__(
841914
# ----------------------------------
842915
_v = arg.pop('angularaxis', None)
843916
self['angularaxis'] = angularaxis if angularaxis is not None else _v
917+
_v = arg.pop('bargap', None)
918+
self['bargap'] = bargap if bargap is not None else _v
919+
_v = arg.pop('barmode', None)
920+
self['barmode'] = barmode if barmode is not None else _v
844921
_v = arg.pop('bgcolor', None)
845922
self['bgcolor'] = bgcolor if bgcolor is not None else _v
846923
_v = arg.pop('domain', None)

plotly/validators/layout/_polar.py

+12
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ def __init__(self, plotly_name='polar', parent_name='layout', **kwargs):
1313
angularaxis
1414
plotly.graph_objs.layout.polar.AngularAxis
1515
instance or dict with compatible properties
16+
bargap
17+
Sets the gap between bars of adjacent location
18+
coordinates. Values are unitless, they
19+
represent fractions of the minimum difference
20+
in bar positions in the data.
21+
barmode
22+
Determines how bars at the same location
23+
coordinate are displayed on the graph. With
24+
"stack", the bars are stacked on top of one
25+
another With "overlay", the bars are plotted
26+
over one another, you might need to an
27+
"opacity" to see multiple bars.
1628
bgcolor
1729
Set the background color of the subplot
1830
domain

plotly/validators/layout/polar/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
from ._gridshape import GridshapeValidator
55
from ._domain import DomainValidator
66
from ._bgcolor import BgcolorValidator
7+
from ._barmode import BarmodeValidator
8+
from ._bargap import BargapValidator
79
from ._angularaxis import AngularAxisValidator
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import _plotly_utils.basevalidators
2+
3+
4+
class BargapValidator(_plotly_utils.basevalidators.NumberValidator):
5+
6+
def __init__(
7+
self, plotly_name='bargap', parent_name='layout.polar', **kwargs
8+
):
9+
super(BargapValidator, self).__init__(
10+
plotly_name=plotly_name,
11+
parent_name=parent_name,
12+
edit_type=kwargs.pop('edit_type', 'calc'),
13+
max=kwargs.pop('max', 1),
14+
min=kwargs.pop('min', 0),
15+
role=kwargs.pop('role', 'style'),
16+
**kwargs
17+
)
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import _plotly_utils.basevalidators
2+
3+
4+
class BarmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator):
5+
6+
def __init__(
7+
self, plotly_name='barmode', parent_name='layout.polar', **kwargs
8+
):
9+
super(BarmodeValidator, self).__init__(
10+
plotly_name=plotly_name,
11+
parent_name=parent_name,
12+
edit_type=kwargs.pop('edit_type', 'calc'),
13+
role=kwargs.pop('role', 'info'),
14+
values=kwargs.pop('values', ['stack', 'overlay']),
15+
**kwargs
16+
)

plotly/version.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
__version__ = '3.2.1'
2-
__frontend_version__ = '^0.3.0'
1+
__version__ = '3.3.0'
2+
__frontend_version__ = '^0.4.0'
33

44

55
def stable_semver():

plotlywidget/static/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12484,7 +12484,7 @@ module.exports = function identity(d) { return d; };
1248412484
/* 19 */
1248512485
/***/ (function(module, exports) {
1248612486

12487-
module.exports = {"name":"plotlywidget","version":"0.3.0","description":"The plotly.py ipywidgets library","author":"The plotly.py team","license":"MIT","main":"src/index.js","repository":{"type":"git","url":"https://github.com/plotly/plotly.py"},"keywords":["jupyter","widgets","ipython","ipywidgets","plotly"],"files":["src/**/*.js","dist/*.js"],"scripts":{"clean":"rimraf dist/ && rimraf ../plotlywidget/static","prepublish":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"devDependencies":{"webpack":"^3.10.0","rimraf":"^2.6.1","ify-loader":"^1.1.0"},"dependencies":{"plotly.js":"1.41.3","@jupyter-widgets/base":"^1.0.0","lodash":"^4.17.4"},"jupyterlab":{"extension":"src/jupyterlab-plugin"}}
12487+
module.exports = {"name":"plotlywidget","version":"0.4.0","description":"The plotly.py ipywidgets library","author":"The plotly.py team","license":"MIT","main":"src/index.js","repository":{"type":"git","url":"https://github.com/plotly/plotly.py"},"keywords":["jupyter","widgets","ipython","ipywidgets","plotly"],"files":["src/**/*.js","dist/*.js"],"scripts":{"clean":"rimraf dist/ && rimraf ../plotlywidget/static","prepublish":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"devDependencies":{"webpack":"^3.10.0","rimraf":"^2.6.1","ify-loader":"^1.1.0"},"dependencies":{"plotly.js":"1.41.3","@jupyter-widgets/base":"^1.0.0","lodash":"^4.17.4"},"jupyterlab":{"extension":"src/jupyterlab-plugin"}}
1248812488

1248912489
/***/ }),
1249012490
/* 20 */

plotlywidget/static/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)