codeledge / entitree-flex

Algorithm to layout trees of variable-sized nodes, while keeping linear runtime
https://www.npmjs.com/package/entitree-flex
53 stars 3 forks source link

Clarification on license #7

Closed Venryx closed 2 years ago

Venryx commented 2 years ago

Hello. This library looks very interesting, and a good fit for a UI rework I'm attempting for my MIT-licensed Debate Map project: https://github.com/debate-map/app

My project currently has a "naive" layout approach, which is not as "compact" as I would like, when the user has expanded to a deep path in the tree. To solve this, I attempted to write my own layout algorithm, which I've been working on the past several days. I got it "mostly working" how I wanted, but it has been a pain to deal with the various remaining details/"edge cases", hence my doing another search for prior work on the subject.

I eventually came across the "Reingold–Tilford tidy algorithm", which was close to what I wanted, except it didn't seem to have handling for "non-layered" trees, ie. trees where some boxes are of different widths and heights than others in that "layer"/depth-level. Further searching eventually led me to the Drawing Non-layered Tidy Trees in Linear Time paper by A.J. van der Ploeg, which is a variant of the Tilford algorithm that seems suitable for my requirements. I especially liked that the paper linked to a public-domain implementation of the algorithm, making integration in one's own programs much easier.

But since my program is in TypeScript rather than Java, I then thought I'd see if I could find a TS/JS implementation instead -- with that search leading me here (as well as the d3-flextree package).

However, my one concern with this library is that it appears to have no license text? (there is no LICENSE file, as most GitHub repos contain)

I'm concerned that if I start using this library, but then need to make modifications to it, that it would then place my project in an "unclear" licensing state, due to using code that does not match the MIT-licensing used by the rest of the program.

So I was hoping there could be some clarification on what the licensing terms for this package are (ideally as a predefined license, though even a general statement about what usages are allowed would be preferred).

Thank you!

ogroppo commented 2 years ago

Hello mate!

It's a pleasure receiving you interest in this package and hope it could be of good inspiration. I just updated the readme and mentioned the licence (@mshd are u ok with that?) which means you can most certainly modify it and use it (it is compatible with MIT)

However I encourage you to use this package as we are active maintainers, it is conceived to cover all the cases (like the dynamic size of boxes) and it's bidirectional unlike the other packages.

Oh, and, very interesting project at https://debatemap.app! I see some boxes are off from where they are expected to be, and I can understand your frustration, been there!

Venryx commented 2 years ago

Thank you for the quick response!

That said, I think the license in the readme might not be what was intended. You mentioned:

I [updated the readme] and mentioned the licence (@mshd are u ok with that?) which means you can most certainly modify it and use it (it is compatible with MIT)

But the new readme text currently states "GNU General Public License v3.0", which is a "copyleft" license that's more restrictive than MIT: the GPL license requires people integrating the code into their projects to make their entire project use the same GPL license. In other words, it is "infective" -- which makes a lot of developers (including myself) avoid it in our open source projects.

For example, using a modified version of entitree-flex in Debate Map would mean I could no longer license the project under MIT. And that would mean it couldn't be used by private organizations that want to make a customized version of Debate Map (with their version made available for the public, but with the modified source private), which is one of the use-cases I want to support.

Oh, and, very interesting project at https://debatemap.app/! I see some boxes are off from where they are expected to be, and I can understand your frustration, been there!

Yes, definitely! Using a naive, non-compacted layout is fine for a few levels; but once the user starts exploring deeper, the boxes of earlier levels just keep getting farther and farther apart, which makes it hard to keep track of context. So looking forward to using one of these Tilford-derived solutions, if the licensing can be worked out.

However I encourage you to use this package as we are active maintainers, it is conceived to cover all the cases (like the dynamic size of boxes) and it's bidirectional unlike the other packages.

Yes, I certainly hope to make use of this library for the foreseeable future. I just like to have an escape hatch available for if I need to make project-specific modifications in the future. :)

ogroppo commented 2 years ago

Right, now I see where you are getting at... so this package in particular (everything that starts with entitree-*) is part of a suite of packages under gpl3. I appreciate the choice is not popular among the lot of developers you are part of but I'm afraid changing the licence to MIT here is going against the plans.

Let's take this conversation offline anyway, I'm sure we can work out something for you - entitree.app@gmail.com

Venryx commented 2 years ago

That's unfortunate, but I respect the right for each group to license their work as they see fit.

I do hope your team can reconsider someday though, since I think entitree-flex is a valuable library whose functionality would be beneficial to non-copyleft projects as well. (including mine, which is fully open-source, but just not copyleft)

I understand that the entitree project is something that is wanted to be GPL; but it seems like an isolated layout library like entitree-flex could be worth licensing more permissively, without disrupting the intent for the entitree project overall.

But anyway, assuming that cannot be done, it is probably worth updating the license field in the package.json -- as currently it is marked as ISC, which is equivalent in permissiveness to MIT. (I did not notice this until after raising this issue, though perhaps this is a good thing as it has clarified the matter.)

When browsing this Github repo, I think most people will read the GPL notice at the bottom first; but it could cause confusion if people are finding the library on npm, where it lists "License: ISC" in the info panel (which could lead them to accidentally using it in license-incompatible projects).

ogroppo commented 2 years ago

Ah good shout for the package.json. 👍 From what I've seen you don't need most of the features of this package anyway, so why all the fuss if you can use d3-flextree?

Venryx commented 2 years ago

It's true that I'm not using those features currently, but I was hoping to try utilizing the bidirectionality features for implementing a new "explore mode" for the nodes, that can expand in either direction. I guess I will try to implement my own approach to that problem sometime down the road though.

Sorry if my comment above came off as disruptive. I do appreciate the work your team had done on this library (and entitree in general), and can understand the motivation behind using GPL.

I tend to think the license does more harm than good for standalone libraries (if the goal is to maximize the amount of back contributions), but if there is disagreement on that point, then I can understand why someone would want to stick with GPL.

Thank you for your time/explanation though, and for developing the library; it is inspiration/proof that a bidirectional approach is possible for Tilford-derived algorithms.