-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
add deprecation notice for mapbox traces #4783
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
Conversation
These show up when you are using the new traces
imageAlso, it looks like they are removed when we run the commands to update Plotly.js. Those classes are probably autogenerated
cc @archmoj
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.
All links should point to the Python documentation: https://plotly.com/python/mapbox-to-maplibre/
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.
We should use a proper warning rather than print statements
Co-authored-by: Liam Connors <connorsl@tcd.ie>
could we use a warning as mentioned by @ndrezn above #4783 (comment)
could we use a warning as mentioned by @ndrezn above #4783 (comment)
I am not sure is that's a good idea.
My concern is that it could be too annoying for users and it may be considered a notable undesirable change.
could we use a warning as mentioned by @ndrezn above #4783 (comment)
I am not sure is that's a good idea. My concern is that it could be too annoying for users and it may be considered a notable undesirable change.
@archmoj Being annoying is the whole point, so that users will change their code before the traces are removed entirely.
@LiamConnors Could you please test this to see if this produce the desirable warnings?
Thank you!
@archmoj, I see the deprecation notice on traces and px functions that don't use mapbox
import plotly.express as px
df = px.data.gapminder().query("year == 2007")
fig = px.line_geo(df, locations="iso_alpha",
color="continent", # "continent" is one of the columns of gapminder
projection="orthographic")
fig.show()
But not on ones that do:
image@archmoj Maybe you're already on it but I think the warning needs to go inside the __init__ function rather than at the top of the class to fix the issue Liam is seeing.
@archmoj Maybe you're already on it but I think the warning needs to go inside the
__init__function rather than at the top of the class to fix the issue Liam is seeing.
@LiamConnors Thanks for catching that. Let's try @emilykl's suggestion.
@LiamConnors Debugging the bug you noticed wasn't easy. I figured the error is coming from the plotly.py templates which include defaults for "scattermapbox" traces as well as `"mapbox" subplots.
On the other hand resolving the merge conflicts of this PR is not easy.
So I close this PR; then open a new PR.
Thank you!
Closes #4730.