Skip to content

Commit

Permalink
Release 3.3.0 (#1205)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jonmmease authored Sep 28, 2018
1 parent c5a9ac3 commit 2e5bf6e
Show file tree
Hide file tree
Showing 15 changed files with 218 additions and 12 deletions.
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,72 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.3.0] - 2018-09-28

### Updated
- Updated Plotly.js to version 1.41.3. Select highlights included below, see
[the plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#1413----2018-09-25)
for more information.
- Do not create or check permissions on the `~/.plotly` configuration
directory until a configuration write operation is performed
([#1195](https://github.com/plotly/plotly.py/pull/1195)). This change
avoids some concurrency problems associated with running many instances of
plotly.py simultaneously
([#1068](https://github.com/plotly/plotly.py/issues/1068)).

### Added
- Enable selection by clicking on points via new layout attribute `clickmode` and flag `'select'`
([#2944](https://github.com/plotly/plotly.js/pull/2944))
- Added stacked area charts via new attributes `stackgroup` and `stackgaps` in scatter traces
([#2960](https://github.com/plotly/plotly.js/pull/2960))
- Added `barpolar` trace type - which replace and augment area traces
([#2954](https://github.com/plotly/plotly.js/pull/2954))
- Added `polar.hole` layout parameter to punch hole at the middle of polar
subplot offsetting the start of the radial range
([#2977](https://github.com/plotly/plotly.js/pull/2977), [#2996](https://github.com/plotly/plotly.js/pull/2996))
- Figures may now be easily converted to and from JSON using the new
`to_json`, `from_json`, `read_json`, and `write_json` functions in the
`plotly.io` package
([#1188](https://github.com/plotly/plotly.py/pull/1188))
- Figures and graph objects now support `deepcopy` and `pickle` operations
([#1191](https://github.com/plotly/plotly.py/pull/1191))
- The location of the `"~/.plotly"` settings directory may now be customized
using the `PLOTLY_DIR` environment variable
([#1195](https://github.com/plotly/plotly.py/pull/1195))
- Added optional `scaleratio` argument to the `create_quiver` figure factory.
When specified, the axes are restricted to this ratio and the quiver arrows
are computed to have consistent lengths across angles.
([#1197](https://github.com/plotly/plotly.py/pull/1197))

### Fixed
- Replace use of `pkg_resources.resource_string` with `pkgutil.get_data` to
improve compatibility with `cx_Freeze`
([#1201](https://github.com/plotly/plotly.py/pull/1201))
- An exception is no longer raised when an optional dependency raises an
exception on import. The exception is logged and plotly.py continues as if
the dependency were not installed
([#1192](https://github.com/plotly/plotly.py/pull/1192))
- Fixed invalid dendrogram axis labels when the points being clustered contain
duplicate values
([#1186](https://github.com/plotly/plotly.py/pull/1186))
- Added missing LICENSE.txt file to PyPI source distribution
([#765](https://github.com/plotly/plotly.py/issues/765))

### JupyterLab Versions
For use with JupyterLab, the following versions of the following packages
must be installed:

- Python Packages
- plotly==3.3.0
- ipywidgets>=7.2
- notebook>=5.3
- jupyterlab==0.34

- JupyterLab Extensions
- plotlywidget@0.4.0
- @jupyter-widgets/jupyterlab-manager@0.37
- @jupyterlab/plotly-extension@0.17

## [3.2.1] - 2018-09-14
This is a patch release that fixes a few bugs and reintroduces a few
version 2 features that were not supported in version 3.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is

plotly.py may be installed using pip...
```
pip install plotly==3.2.1
pip install plotly==3.3.0
```

or conda.
```
conda install -c plotly plotly=3.2.1
conda install -c plotly plotly=3.3.0
```

### Jupyter Notebook Support
Expand Down Expand Up @@ -102,10 +102,10 @@ set NODE_OPTIONS=--max-old-space-size=4096
jupyter labextension install @jupyter-widgets/jupyterlab-manager@0.37 --no-build
# FigureWidget support
jupyter labextension install plotlywidget@0.3.0 --no-build
jupyter labextension install plotlywidget@0.4.0 --no-build
# offline iplot support
jupyter labextension install @jupyterlab/plotly-extension@0.17 --no-build
jupyter labextension install @jupyterlab/plotly-extension@0.17.2 --no-build
# Build extensions (must be done to activate extensions since --no-build is used above)
jupyter lab build
Expand Down
6 changes: 5 additions & 1 deletion codegen/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,11 @@ def __init__(self, plotly_schema, node_path=(), parent=None):
# Get list of additional layout properties for each trace
trace_layouts = [
plotly_schema['traces'][trace].get('layoutAttributes', {})
for trace in plotly_schema['traces']]
for trace in plotly_schema['traces'] if trace != 'barpolar']

extra_polar_nodes = (plotly_schema['traces']['barpolar']
.get('layoutAttributes', {}))
layout['polar'].update(extra_polar_nodes)

# Chain together into layout_data
self.layout_data = ChainMap(layout, *trace_layouts)
Expand Down
2 changes: 1 addition & 1 deletion contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ And, you'll need the credentials file `~/.pypirc`. Request access from
```bash
(plotly.py) $ git checkout release_X.Y.Z
(plotly.py) $ git stash
(plotly.py) $ python setup.py sdist
(plotly.py) $ python setup.py sdist bdist_wheel
(plotly.py) $ twine upload dist/plotly-X.Y.Zrc1*
```

Expand Down
2 changes: 1 addition & 1 deletion js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plotlywidget",
"version": "0.3.0",
"version": "0.4.0",
"description": "The plotly.py ipywidgets library",
"author": "The plotly.py team",
"license": "MIT",
Expand Down
12 changes: 12 additions & 0 deletions plotly/graph_objs/_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,18 @@ def polar(self):
angularaxis
plotly.graph_objs.layout.polar.AngularAxis
instance or dict with compatible properties
bargap
Sets the gap between bars of adjacent location
coordinates. Values are unitless, they
represent fractions of the minimum difference
in bar positions in the data.
barmode
Determines how bars at the same location
coordinate are displayed on the graph. With
"stack", the bars are stacked on top of one
another With "overlay", the bars are plotted
over one another, you might need to an
"opacity" to see multiple bars.
bgcolor
Set the background color of the subplot
domain
Expand Down
77 changes: 77 additions & 0 deletions plotly/graph_objs/layout/_polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,53 @@ def angularaxis(self):
def angularaxis(self, val):
self['angularaxis'] = val

# bargap
# ------
@property
def bargap(self):
"""
Sets the gap between bars of adjacent location coordinates.
Values are unitless, they represent fractions of the minimum
difference in bar positions in the data.
The 'bargap' property is a number and may be specified as:
- An int or float in the interval [0, 1]
Returns
-------
int|float
"""
return self['bargap']

@bargap.setter
def bargap(self, val):
self['bargap'] = val

# barmode
# -------
@property
def barmode(self):
"""
Determines how bars at the same location coordinate are
displayed on the graph. With "stack", the bars are stacked on
top of one another With "overlay", the bars are plotted over
one another, you might need to an "opacity" to see multiple
bars.
The 'barmode' property is an enumeration that may be specified as:
- One of the following enumeration values:
['stack', 'overlay']
Returns
-------
Any
"""
return self['barmode']

@barmode.setter
def barmode(self, val):
self['barmode'] = val

# bgcolor
# -------
@property
Expand Down Expand Up @@ -723,6 +770,17 @@ def _prop_descriptions(self):
angularaxis
plotly.graph_objs.layout.polar.AngularAxis instance or
dict with compatible properties
bargap
Sets the gap between bars of adjacent location
coordinates. Values are unitless, they represent
fractions of the minimum difference in bar positions in
the data.
barmode
Determines how bars at the same location coordinate are
displayed on the graph. With "stack", the bars are
stacked on top of one another With "overlay", the bars
are plotted over one another, you might need to an
"opacity" to see multiple bars.
bgcolor
Set the background color of the subplot
domain
Expand Down Expand Up @@ -753,6 +811,8 @@ def __init__(
self,
arg=None,
angularaxis=None,
bargap=None,
barmode=None,
bgcolor=None,
domain=None,
gridshape=None,
Expand All @@ -772,6 +832,17 @@ def __init__(
angularaxis
plotly.graph_objs.layout.polar.AngularAxis instance or
dict with compatible properties
bargap
Sets the gap between bars of adjacent location
coordinates. Values are unitless, they represent
fractions of the minimum difference in bar positions in
the data.
barmode
Determines how bars at the same location coordinate are
displayed on the graph. With "stack", the bars are
stacked on top of one another With "overlay", the bars
are plotted over one another, you might need to an
"opacity" to see multiple bars.
bgcolor
Set the background color of the subplot
domain
Expand Down Expand Up @@ -830,6 +901,8 @@ def __init__(
# Initialize validators
# ---------------------
self._validators['angularaxis'] = v_polar.AngularAxisValidator()
self._validators['bargap'] = v_polar.BargapValidator()
self._validators['barmode'] = v_polar.BarmodeValidator()
self._validators['bgcolor'] = v_polar.BgcolorValidator()
self._validators['domain'] = v_polar.DomainValidator()
self._validators['gridshape'] = v_polar.GridshapeValidator()
Expand All @@ -841,6 +914,10 @@ def __init__(
# ----------------------------------
_v = arg.pop('angularaxis', None)
self['angularaxis'] = angularaxis if angularaxis is not None else _v
_v = arg.pop('bargap', None)
self['bargap'] = bargap if bargap is not None else _v
_v = arg.pop('barmode', None)
self['barmode'] = barmode if barmode is not None else _v
_v = arg.pop('bgcolor', None)
self['bgcolor'] = bgcolor if bgcolor is not None else _v
_v = arg.pop('domain', None)
Expand Down
12 changes: 12 additions & 0 deletions plotly/validators/layout/_polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ def __init__(self, plotly_name='polar', parent_name='layout', **kwargs):
angularaxis
plotly.graph_objs.layout.polar.AngularAxis
instance or dict with compatible properties
bargap
Sets the gap between bars of adjacent location
coordinates. Values are unitless, they
represent fractions of the minimum difference
in bar positions in the data.
barmode
Determines how bars at the same location
coordinate are displayed on the graph. With
"stack", the bars are stacked on top of one
another With "overlay", the bars are plotted
over one another, you might need to an
"opacity" to see multiple bars.
bgcolor
Set the background color of the subplot
domain
Expand Down
2 changes: 2 additions & 0 deletions plotly/validators/layout/polar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
from ._gridshape import GridshapeValidator
from ._domain import DomainValidator
from ._bgcolor import BgcolorValidator
from ._barmode import BarmodeValidator
from ._bargap import BargapValidator
from ._angularaxis import AngularAxisValidator
17 changes: 17 additions & 0 deletions plotly/validators/layout/polar/_bargap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import _plotly_utils.basevalidators


class BargapValidator(_plotly_utils.basevalidators.NumberValidator):

def __init__(
self, plotly_name='bargap', parent_name='layout.polar', **kwargs
):
super(BargapValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwargs.pop('edit_type', 'calc'),
max=kwargs.pop('max', 1),
min=kwargs.pop('min', 0),
role=kwargs.pop('role', 'style'),
**kwargs
)
16 changes: 16 additions & 0 deletions plotly/validators/layout/polar/_barmode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import _plotly_utils.basevalidators


class BarmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator):

def __init__(
self, plotly_name='barmode', parent_name='layout.polar', **kwargs
):
super(BarmodeValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwargs.pop('edit_type', 'calc'),
role=kwargs.pop('role', 'info'),
values=kwargs.pop('values', ['stack', 'overlay']),
**kwargs
)
4 changes: 2 additions & 2 deletions plotly/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__version__ = '3.2.1'
__frontend_version__ = '^0.3.0'
__version__ = '3.3.0'
__frontend_version__ = '^0.4.0'


def stable_semver():
Expand Down
2 changes: 1 addition & 1 deletion plotlywidget/static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12484,7 +12484,7 @@ module.exports = function identity(d) { return d; };
/* 19 */
/***/ (function(module, exports) {

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"}}
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"}}

/***/ }),
/* 20 */
Expand Down
2 changes: 1 addition & 1 deletion plotlywidget/static/index.js.map

Large diffs are not rendered by default.

0 comments on commit 2e5bf6e

Please sign in to comment.