Skip to content
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

Add a graph layout algorithm #37

Open
wants to merge 2 commits into
base: Main
Choose a base branch
from
Open

Conversation

MForster
Copy link

@MForster MForster commented May 6, 2022

This adds automatic graph layout to Foreman (see also #21). Are you interested in a contribution like this? I realize that the README discourages contributions, but there also haven't been recent changes. I've tried to keep the new feature in its own files.

At this point this is an experimental change. The base feature works quite well on small graphs, but it needs to be tested and optimized for large graphs. I wouldn't try it on the Seablock example, yet. There are also a lot of improvements that could be done in follow-up changes. IMHO this is already quite useful on small graphs, and I wanted to get feedback before going down the wrong direction.

One follow-up that I have been experimenting with is a continuous layout mode (see https://github.com/MForster/Foreman2/tree/continuous-layout), but that definitely needs more work. Other changes would be more configuration options, better support for flipped nodes, and the option to run the algorithm on subgraphs.

As for the details of the change, I was trying to keep the diffs to existing files minimal, which turned out to be hard because of inconsistent Tabs/Spaces/LF/CRLF and unapplied autoformat changes. I ended up normalizing the touched files first in a separate commit. Let me know if you wouldn't want me to do this.

@mrozpara
Copy link

mrozpara commented May 6, 2022

May I copy your changes to my fork? (https://github.com/mrozpara/Foreman2)?

@MForster
Copy link
Author

MForster commented May 6, 2022

Yes, of course. It's an open source license after all :-). But thanks for asking.

I'm also interested in feedback.

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

Successfully merging this pull request may close these issues.

2 participants