vojtamolda / Plotly.swift

Interactive data visualization library for Swift
https://vojtamolda.github.io/Plotly.swift/
MIT License
82 stars 8 forks source link

More relaxed licensing #12

Closed ProfFan closed 4 years ago

ProfFan commented 4 years ago

Hi,

First thank you for this awesome library! We are stunned by the awesome graphics :)

The only problem we have is that this library is licensed as GPLv3, thus incompatible with our library, which is in Apache 2. Is it possible to license this in some more relaxed copyleft license like MPL?

Best regards, Fan

vojtamolda commented 4 years ago

Hello Fan,

Thanks a lot for your comment. The credit for graphics actually goes to the creators of the JavaScript counterpart Plotly.js. This project is something like a sewer pipe that channels the data to the browser 😉

Now regarding your question - can you, please, explain in more detail what do you mean by "our library" and in what sense the license isn't compatible with Apache 2?

The reason why I've chosen GPL is to encourage contribution back to the library. The idea is roughly this: you get the source code and in exchange the library gets back the improvements if you make any. This sort of sounds like a good deal to me.

I understand that GPLv3 is particularly problematic for a company. I don't have anything against people building products and making money with it but I'm not sure how to achieve the contribution back to the project.

Oner particular "relaxation" I was considering as another option is GPLv2. Would that help in your situation?

Cheers,

Vojta

vojtamolda commented 4 years ago

Sorry. I've just realized what the issue is. I'm not a lawyer (obviously) and it takes me a while to recall consequences of each open source license. Using GPLv3 forces you to adopt the same license in your project, right?

ProfFan commented 4 years ago

Yeah, GPLv3 is a super strict copyleft license that basically says if you link (either statically or dynamically) to GPLv3 code, your code has to be distributed as GPLv3 as well... Also, it is not compatible with other copyleft or non-copyleft licenses like MPL, MIT, Apache, etc.

ProfFan commented 4 years ago

Just seen you previous comment. We are academic, so the only thing we are afraid of is that anyone with access to our colabs will have full privilege to redistribute it with anyone :)

However, I am pretty sure that this would be a bigger issue for people who work in companies like Google that wants to contribute (when I worked with them they require any code they touch to be licensed as Apache v2 🤣)

From what I understood in your desired outcome (boosting contribution back to the library), MPL 2.0 is also suitable as it is more like "file-level copyleft". I know people who uses LGPL but I don't know if that would play well with Swift's static linking.

In a more commercial view, this piece from Google is a great read.

Thank you again for the work!

vojtamolda commented 4 years ago

I checked the licenses of Plotly.py, Plotly.r and Plotly.jl. These projects are very similar in terms of functionality but serve different languages (Python, R and Julia respectively). And they have the same MIT license as Plotly.js.

However, they the copyright holder in all of those cases is the "mother" company - a Montréal based startup called Plotly, Inc that created the original JavaScript version. They offer commercial support and hosting for graph dashboards. So MIT license makes a lot of sense for them and their customers. Just to be clear - I'm not in any way affiliated with them. They just have a great product and I honestly keep my fingers crossed for them to succeed.

It seems like the other "ports" have some degree of support from them and therefore don't rely as much on community contributions which is the missing piece in my case.

Sorry for the long comment. I just wanted to make my thinking and motivation behind the license clear.

vojtamolda commented 4 years ago

Anyway, if the license prevents even people in the academia from using the library in the first place, there's not much of a chance to get any improvements back...

I'll switch the license to MIT (That's the only one a layman like myself can actually read and understand.)

vojtamolda commented 4 years ago

Hopefully, CEO of Plotly Inc. will grant me some stock options or at least a bottle of champagne when they get their first Swift customer 😄.

ProfFan commented 4 years ago

@vojtamolda That's REALLY great news! 😄

P.S.1 If you are open to donations, you can try GitHub sponsors, they offer a 1:1 match in amount users donate to your project

P.S.2 If you happen to come by the Atlanta area I'll buy you a beer!

vojtamolda commented 4 years ago

v0.3.1 is out now and licensed under the MIT license.

PS1: I had no idea this existed. I'll check it out. Maybe I can distribute the money between the contributors somehow. PS2: Thanks. That's very kind of you! I'll let you know when I have a longer layover there 🍻