-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minor test fixes for ipyplotly_integration #975
Conversation
Now handles the case where the dashes are scaled, have floating-point values, or were customized with `dashes=(N,M)`.
rewrite changelog for broken choropleth
Fixing choropleth
changelog for fixed 2.4.1
(matplotlylib) Make convert_dash more robust to changes in matplotlib.
Is |
I don't think @chriddyp and I discussed |
… consistent with favoring validation failure to user\nrelated to TODO #283 Issue\n new valid charts created from old PlotlyImageTest examples
@@ -474,7 +474,7 @@ def get_figure(file_owner_or_url, file_id=None, raw=False): | |||
|
|||
if raw: | |||
return figure | |||
return tools.get_valid_graph_obj(figure, obj_type='Figure') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chriddyp @jmmease
The purpose of this commit is to refactor get_valid_graph_obj
function to not remove invalid properties of a figure when .get_figure()
is called. I think this is important because:
- it is consistent with Jon's preference to validation over coercing to default attributes as a default (which I agree with)
- if a user does want to bypass validation errors, setting
raw=True
is still an option in the get_figure function - one step on the road to finishing Remove
graph_objs
dependency fromtools.py
#283 fwiw
What do y'all think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this. The user will either get a dict
with whatever was on the server (raw=True
) or a fully valid Figure
.
Do you think the stripping of invalid properties is something that regular users are going to need? I'm not clear on why we end up with figures with invalid properties on the server in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wondered the same thing. In refactoring these tests I noticed that a few of the example figures I pulled from were 4 years old and contained params that are no longer part of the valid params.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be inclined to update the test data, but I'll leave it to you and @chriddyp to decide whether we need to support some kind of legacy property removal.
@@ -103,98 +103,99 @@ def test_single_plot(self): | |||
expected = Figure( | |||
data=Data(), | |||
layout=Layout( | |||
xaxis1=XAxis( | |||
xaxis=XAxis( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is |
…tly.py into ipyplotly_integration
@jmmease |
@Kully No, |
ok, I will remove their associated test |
Yup, that sounds right to me 👍 |
Does the same go for |
No, |
cc. @chriddyp @jmmease
Minor Test Fixes - Status
NB Tests that are not minor and require changing something in a fundamental way are still checked if all other minor tests in the module are fixed. A description/error message is provided just underneath the bullet point to specify the error message for the unsolved problem
Core
1 F w/ test_two_row_bottom_left
same issue as test_make_subplots
__init__() got an unexpected keyword argument '_raise'
'Annotations' object has no attribute 'validate'
same issue as 'test_make_subplots'
'Data' object has no attribute 'validate'
__init__() missing 1 required positional argument: 'class_strs_map'
AttributeError: 'Frames' object has no attribute 'to_string'
AttributeError: 'Figure' object has no attribute 'get_data'
ImportError: cannot import name 'graph_objs_tools'
from plotly.graph_objs.graph_objs import PlotlyDict, PlotlyList
AttributeError: 'Figure' object has no attribute 'strip_style'
AttributeError: 'Figure' object has no attribute 'to_string'
AttributeError: 'Data' object has no attribute 'update'
The 'xsrc' property is a string and must be specified as: - A string
TypeError: __init__() got an unexpected keyword argument '_raise'
Optional
('ncontours', 'colorscale', 'reversescale', 'showscale') not valid in Scatter
AssertionError: ['line']['width'] = 1.5 should be 1.0
(I think the issue is just locally due to matplotlib ver ==2.2.2; our tests use matplotlib1.3.1)from plotly.tests.test_optional.test_matplotlylib.data.axis_scales import *
causes the errorX = np.array([[1, 2, 3, 4], [1, 1, 3, 4], [1, 2, 1, 4], [1, 2, 3, 1]]) dendro = ff.create_dendrogram(X)
failsCurrent Issues/Test failures from April 12, 2018:
.to_dataframe
(test_optional/test_graph_objs)-removing the to_dataframe to_string, strip_styles, get_data, and validate methods?