Skip to content

Commit

Permalink
minor test fixes for ipyplotly_integration (#975)
Browse files Browse the repository at this point in the history
* Update CHANGELOG.md

* (matplotlylib) Make convert_dash more robust to changes in matplotlib.

Now handles the case where the dashes are scaled, have floating-point values, or were customized with `dashes=(N,M)`.

* commit

* remove unnecessary data files in tests and robust data-path searching

* pep-8: l -> L variable name

* bump version number up

* remove shapefiles from folders and delete folders

* removed data/ folder and modified choropleth code to match file names

* changelog for fixed 2.4.1

* chelsea's comments

* added fill_percent to params for insert, swap and remove

* html preview not working

* HTML preview now reflects the fill_percent param settings

* tests are working

* make update_default_schema

* udpated changelog, removed TODOs, PEP-8 79 char line limit

* turn off hover for the lines

* 0-padding

* changelog

* update changelog and version number for 2.5.0

* change fill_percent example in doc to fill_percent=20

* sort all node generators to make HTML output consistent for py2 + py3

* dashboards now autosize based on GUI

* update dash workshop announcement 

cc @chriddyp

* version num to 2.5.0

* 4 equal height vertical stacked example in doc string

* rename box_1 to box_a, etc

* remove shapefiles in tests dir

* change version back for testing purposes

* version to 2.5.0

* try bumping npm v in circle.yml to 6.0.0

* Don't crash if figure_factory is imported but pandas isn't installed. Fixes #941

* pr for #958 PR

* add PR reference

* remove a comment

* update plotlyjs for offline

* moved py2.7 test env to last in core environments

* remove ipyplotly folder

* fixed assert Scatter() == dict(type='scatter')

* fixed test_access_top_level in test_figure

* more in test_figures fixes

* remove junk in test_figure.py from before base merge

* BaseFigure and BasePlotlyType inherit from PlotlyBase class

* remove commented validation function

* comment out validate error in test_scatter

* add histogram2dcontour back to graph_reference TRACES

* FigureWidget to OLD_CLASS_NAMES

* add update to Data def in graph_objs//remove to_string in test_update

* fixed test_offline in optional

* test_plotl_mpl fixed

* add py36 to core and optional test envs

* break up datetime tests into multiple ones for better test control

* fixed JSONEncoding errors

* last assert test in test_utils

* print statements for testing  xaxis1

* construct paths to choropleth files intelligently

* update the changelog

* bump version

* changelog comments

* revert to current basedatatypes from #942

* write in helper function for assert_dict_equal

* fix trisurf: hoverinfo needs 'none', not 'None'

* finished a few more classes in figure_factory tests

* remove comment

* change error msg for pip installs in choropleth

* changelog update

* fixed facet grid - annotations now tuples - FacetGrid tests in test_optional

* remove DeprecationWarning from _dendrogram.py

* remove unneeded comments in facet_grid

* change height, width default to np.inf in _Dendogram

* fixed all tests in optional figure_factory

* PEP8 to greyscale list

* fix Quiver tests; remove commented TestDisplot for duplicate

* minor test fixes in test_tools resolved

* playing around with matplotlylib - no success

* chelsea's comment

* fixed test_validate tests in test_core

* fixed offline tests

* change assert error in decorator

* flawed annotations dont return error, so not checking for one

* fix minor tests in test_data

* fix test_error_bars

* null changes

* added white space

* rework mock import for Py3.3+ compat

* deepcopy in assert_fig_equal

* fixed all but one test in make_subplots

* fixed test_api - mock compatib issue

* change errortype to ValueError to fix test

* fix merge for rebase continue

* reverted back to old test in test_figure

* validators update

* fix  test_graph_objs.py in test_core

* fix scatter.py

* fix         self.assert_fig_equal(ohlc.to_plotly_json()['data'][0],

* assert_dict_equal typo

* fix PotlyError -> ValueError for TestTable class

* middle of putting .to_plotly_json in assert_fig_equal

* updated test_tools - numpy arrays to lists

* test_datetimes fixes

* Fix typo (agruments)

* test_offline changes

* do not strip fig of invalid elements wen running .get_figure\nthis is consistent with favoring validation failure to user\nrelated to TODO #283 Issue\n new valid charts created from old PlotlyImageTest examples

* xaxis -> xaxis1 in make_subplots

* xaxis -> xaxis1

* test_plot

* fixed test_figure

* fixed test_append_trace - added assert_fig_equal func clone in test_core

* fixed TestDistplot tests

* removed test_plotly_base_classes test as PlotlyDict/PlotlyList are removed

* fixed tests in test_ff in optional
  • Loading branch information
Kully authored and jonmmease committed Apr 18, 2018
1 parent 1bc4aca commit f140fd8
Show file tree
Hide file tree
Showing 79 changed files with 1,231 additions and 3,678 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,38 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.5.2] - UNRELEASED
### Updated
- error message for `plotly.figure_factory.create_choropleth` is more helpful for Windows users on installing `geopandas` and dependencies including `shapely`.

## [2.5.1] - 2018-03-26
### Fixed
- `plotly.figure_factory.create_choropleth` now works in Windows without raising an OSError. The module now uses cross-platform path tools from `os` to manipulate and manage the shapefiles contained in this package.

## [2.5.0] - 2018-03-12
### Fixed
- `import plotly.figure_factory` does not fail if `pandas` is not installed. See https://github.com/plotly/plotly.py/pull/958
### Added
- New parameter `fill_percent` to the `.insert` method for the dashboards API. You can now insert a box into the dashboard layout and specify what proportion of the original container box it will occupy. Run `help(plotly.dashboard_objs.Dashboard.insert)` for more information on `fill_percent`.
### Updated
- Updated `plotly.min.js` to version 1.35.2.
- New features include adding an `automargin` attribute to cartesian axes and a layout `grids` attribute for easy subplot generation.
- See [the plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#1352----2018-03-09) for additional information regarding the updates.
- `plotly.figure_factory.create_choropleth` has changed some of the default plotting options:
- 'offline_mode' param has been removed from call signature.
- Persistent selection api for the centroid points is automatically enabled. See https://plot.ly/python/reference/#scatter-selected and https://plot.ly/python/reference/#scatter-unselected for details
- FIPS values that appear on hover are 0-padded to ensure they are 5 digits.
- `hover_info='none'` is now default for the county lines data.

## [2.4.1] - 2018-02-21
### Fixed
- The required shapefiles to generate the choropleths via `plotly.figure_factory.create_choropleth` are now shipped in the package data.

## [2.4.0] - 2018-02-16
### Added
- County Choropleth figure factory. Call `help(plotly.figure_factory.create_choropleth)` for examples and how to get started making choropleths of US counties with the Python API.

Note: Calling `plotly.figure_factory.create_choropleth` will fail with an IOError due to missing shapefiles see: https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md#241---2018-02-21

## [2.3.0] - 2018-01-25
### Fixed
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# plotly.py

> 📢 Announcement!
> Registration is open for a 2 day, Dash master class in Montreal, February 17-18.
> [Register online here](https://plotcon.plot.ly/workshops) 🎚📈 🇨🇦
> Registration is open for a 2 day, Dash master class in Boston, April 14-15.
> [Register online here](https://plotcon.plot.ly/tickets/) 🎚📈⚾️
***

Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ machine:

node:
# use a pre-installed version of node so we don't need to download it.
version: 4.2.2
version: 6.0.0

dependencies:

Expand Down
2 changes: 1 addition & 1 deletion codegen/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,4 @@ def write_data_validator_py(outdir, base_trace_node: TraceNode):
# Write file
# ----------
filepath = opath.join(outdir, 'validators', '_data.py')
format_and_write_source_py(source, filepath)
format_and_write_source_py(source, filepath)
Loading

0 comments on commit f140fd8

Please sign in to comment.