Skip to content

2.0.0 Wishlist #642

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

Closed
9 of 10 tasks
theengineear opened this issue Dec 29, 2016 · 21 comments
Closed
9 of 10 tasks

2.0.0 Wishlist #642

theengineear opened this issue Dec 29, 2016 · 21 comments

Comments

@theengineear
Copy link
Contributor

theengineear commented Dec 29, 2016

@chriddyp @Kully @cldougl

I haven't had many cycles to play around with the python api library lately, but recently got in a little deep for #640, where we've now got fully-unified api modules.

I think enough shifted (mostly additions, but the error handling is definitely not backwards compat) that we should open up a discussion on non-minor changes that we've been looking to add to the plotly module. Here's a list of topics:

**In fact, if we do do this, we can just add some meta programming to auto-create a module full of all the objects from graph-reference. This way we don't have those dump "Scatter is not defined" errors, etc.

Anything else?

@theengineear
Copy link
Contributor Author

I'm still going to be working mostly on frontend code, but I'd definitely be interested in making some non-trivial improvements here. Thoughts?

@chriddyp
Copy link
Member

chriddyp commented Jan 2, 2017

Add numpy as an official dep. and use it to speed up the library.

I'm OK with using this in all of our FigureFactory methods but I'd still like to keep this as a protected import. I think there will still be new users who might have trouble installing it on their machine with their default python distribution.

@chriddyp
Copy link
Member

chriddyp commented Jan 2, 2017

For 2.0.0, I think that we only need to consider backwards incompatible changes if we're going to version as according to SemVer. In other words, it doesn't need to be a big release.

Here's an interesting discussion on this: https://gist.github.com/jashkenas/cbd2b088e20279ae2c8e

So, from that list above, it seems like:

  • Add transforms to graph objects
  • Add frames to graph objects

could be done in either 1.x or later in 2.x

@theengineear
Copy link
Contributor Author

Ok, I sorta thought we were trying to strive for SemVer. I feel pretty confident that I don't want to change how errors work in a non-major version change. I'd be pretty annoyed if I upgraded a minor version and all of a sudden all my exceptions were being caught like they were before!

The point about the 1% breakage is interesting, but it assumes that you can actually know what users are doing with your code.

Perhaps were just too stuck on the idea of having a major, romantic 2.0.0 release. I'm not suggesting that this needs to be monumental, but there are a couple breaking api changes that we'd like to make and we want to make those clear to users.

So, from that list above, it seems like...

👍 , those can be in 1.x.

@theengineear
Copy link
Contributor Author

Now that I think about it a bit more, I don't think that the no-auto-load-graph-references needs to be in 2.x either, right?

@chriddyp ^^

@chriddyp
Copy link
Member

chriddyp commented Jan 4, 2017

Ok, I sorta thought we were trying to strive for SemVer.

Yeah sorry for the confusion, I think that we're striving for SemVer too. I just posted that link to mention the alternative where we put "big features" in major version releases (which we don't need to do if we're doing SemVer).

@chriddyp
Copy link
Member

chriddyp commented Jan 4, 2017

I don't think that the no-auto-load-graph-references needs to be in 2.x either, right?

👍 , yeah. The auto-updating makes it a little bit weird. If Version 1.20 removes graph-reference, then someone on Version 1.19 (with auto-updating graph reference) could end up with a newer graph reference than the user in Version 1.20. That being said, we only guarantee the graph reference that is actually shipped in the package.

This was referenced Jan 5, 2017
@Kully
Copy link
Contributor

Kully commented Jan 6, 2017

Add numpy as an official dep. and use it to speed up the library.

This goes hand in hand with the trisurf optimization stuff which I still have to put back in (@choldgraf 's improvements).

@theengineear
Copy link
Contributor Author

^^ @Kully , I'm going to fix up our optional imports and then we're going to just liberally use numpy scipy pandas in the FF stuff.

@choldgraf
Copy link
Contributor

+1 for supporting the scientific python stack (numpy, scipy, maybe pandas). I think your target audience (at least the ones that want to use the python API) will already be using it.

@theengineear
Copy link
Contributor Author

Getting there with frames support. It's tricky because it's a top-level attr on figure, which we already make up in the plotly python api (figure is not in plot-schema).

image

@theengineear
Copy link
Contributor Author

Wow, everything done up in the top comment but matplotlib. @chriddyp any thoughts on that? I feel weird about keeping it around if no one has time to maintain it. It's sorta destined to be more and more broken...

@choldgraf
Copy link
Contributor

what's the main drawback about supporting matplotlib? Their API is pretty stable IIRC. No idea if it's something that users actually want though. Although I can say that I recently went to a talk about Altair (another new plotting library in python) and one of the first questions was whether they could convert between altair plots and matplotlib. Though I think the plotly niche may be different enough...

@theengineear
Copy link
Contributor Author

The main drawback is maintenance. It's just a matter of someone needing to go back and fix our current support. I'd love to support it, but I know I definitely don't have free cycles to patch it up. I remember that matplotlib 4.x broke our support and so only matplotlib 3.x really works for us (iirc).

I'm mainly just looking to open up this conversation since I think the current state of this isn't super user-friendly.

@choldgraf
Copy link
Contributor

maybe it's something to deprecate for now unless you get folks clamoring to keep it. My intuition is that a person would use matplotlib for a different use-case than they'd use plotly. The only challenge is that matplotlib is by far the most widely-used plotting library in python, so I guess having a connection might make it easier for some people to play around with plotly.

@theengineear
Copy link
Contributor Author

The only challenge is that matplotlib is by far the most widely-used plotting library in python

Yup. And this is why it would be really nice to have better support for conversions.

Hmm, this conversation has convinced me that we don't really want to 🔪 support for it now (maybe never). If that's the case, I'd rather not even deprecate it and just try to get someone to find time to improve it.

@choldgraf
Copy link
Contributor

this is one of those situations where it'd be really nice to have a way to find out which functions / sub-modules people are calling from within open-source packages :P

@theengineear
Copy link
Contributor Author

oh, wait, you didn't know that import plotly automatically starts a logger than sends all of your python programs to the US government for safe keeping?

@choldgraf
Copy link
Contributor

you joke but a friend of mine is actually working on something like that right now ;)

https://github.com/arokem/popylar

Basically it just sends a cookie (as if you were visiting a website) to google analytics every time an import statement is made (or something like this). Kinda neat but the big challenge right now is to figure out how to prevent it from being abused etc.

@theengineear
Copy link
Contributor Author

lol popylar, nice. yah, that's definitely a hard line to toe. really interesting though!

@chriddyp
Copy link
Member

yeah, I think we should keep it, albeit in a fragile state. we still have a lot of docs about it (/plot.ly/matplotlib) that are neat for people to see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants