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

Some reorg in order to help and allow others to contribute more #439

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dan-ash
Copy link
Contributor

@dan-ash dan-ash commented Jan 23, 2021

Hey @mingrammer,

I'm aware that this PR is a big change but I believe it will help a lot for the maintainability of the project.

@mingrammer
Copy link
Owner

There is a lot of changes, so I need to review this feature carefully. (and there seems to be breaking changes) Let's take some time to review it and will get back.

@mingrammer
Copy link
Owner

mingrammer commented Jan 28, 2021

Before the review, the approaches suggested by @bkmeneguello (#438 ) and @gabriel-tessier (#407 (comment)) also looks good to me personally. But I'm not sure which is the best for now before review it completely. (just comment)

@dan-ash
Copy link
Contributor Author

dan-ash commented Jan 28, 2021 via email

@bkmeneguello
Copy link

@dan-ash

I tried your PR but it's not working like the other ones (specially #438):

from diagrams import Cluster, Diagram
from diagrams.aws.compute import ECS
from diagrams.aws.database import RDS, Aurora
from diagrams.aws.network import Route53, VPC

with Diagram("Simple Web Service with DB Cluster", show=True, filename="mysql"):
    dns = Route53("dns")
    web = ECS("service")

    with VPC('VPC'):
        # using cluster with an icon
        with ECS("DB ClusterA"):
            db_master1 = RDS("main")
            db_master1 - [RDS("replica1"), RDS("replica2")]
        # using the node
        with Aurora("DB ClusterA") as db2:
            db_master2 = RDS("main")
            db_master2 - [RDS("replica1"), RDS("replica2")]

        dns >> web >> db_master1
        # link to/from cluster
        dns >> web >> db2

mysql

@gabriel-tessier
Copy link
Collaborator

@dan-ash

I can confirm the problem raised bellow I just updated the name of the cluster to make it more clear:

from diagrams import Cluster, Diagram
from diagrams.aws.compute import ECS
from diagrams.aws.database import RDS, Aurora
from diagrams.aws.network import Route53, VPC

with Diagram("Simple Web Service with DB Cluster", show=True, filename="mysql"):
    dns = Route53("dns")
    web = ECS("service")

    with VPC('VPC'):
        # using cluster with an icon
        with ECS("DB ClusterA"):
            db_master1 = RDS("main")
            db_master1 - [RDS("replica1"), RDS("replica2")]
        # using the node
        with Aurora("DB ClusterB") as db2:
            db_master2 = RDS("main")
            db_master2 - [RDS("replica1"), RDS("replica2")]

        dns >> web >> db_master1
        # link to/from cluster
        dns >> web >> db2

which render like this on your branch:
mysql

and same code on bkmeneguello PR:
mysql

@bkmeneguello
In your example you named both cluster "DB ClusterA" which make not clear what going on, but at least it's a good example...

On this PR there's also the same error about the color order reported on the pull/438:

#438 (comment)

But the "graph_attr" is working correctly in this PR.

@scottstirling
Copy link

Any update and/or anything anyone can do to help - test, review code?

@dan-ash
Copy link
Contributor Author

dan-ash commented Mar 7, 2021 via email

@robert-matusewicz
Copy link

Hey, I started using Diagrams and that PR looks like something that would be very helpful for me. Unfortunately, it looks outdated. @dan-ash and @mingrammer would it be a problem if I would raise a series of smaller PRs that would implement what was implemented in this PR?

@dan-ash
Copy link
Contributor Author

dan-ash commented May 24, 2021 via email

@robert-matusewicz
Copy link

I think that it's a good idea. From my side, I would propose splitting that PR into refactoring one (so moving classes outside of init) and a functional one. The first should be fairly easy to review and then we can focus on a juicy, functional part!

@chadfurman
Copy link

chadfurman commented Jun 10, 2021

@dan-ash might be good to split this PR into smaller entities -- pulling out the re-org by itself would be non-breaking, I imagine, and then that could get merged relatively quickly I'd hope (cc @mingrammer )

Do we know what the breaking changes are?

What are your thoughts on #438, also, which looks to be solving the same issues?

@gabriel-tessier
Copy link
Collaborator

gabriel-tessier commented Jun 12, 2021

@chadfurman
About #438 I already review and test with all the available example on the website (which took a lot of time). The fix I suggest solve the main bugs I found. So far nobody move....
I already built a pip package with this changes and a couple of other PR that are still pending.
If you are interested I can share it but as it's not the official version you will not have any upgrade and I don't think I will take time to maintain (except for my needs) so you will use it at your own risk (so far nobody get hurt using it! 😀)

@DonDebonair
Copy link

Where are we on this one and/or #438 ? Would love to have this functionality!

@dan-ash
Copy link
Contributor Author

dan-ash commented Aug 7, 2021

@chadfurman @mingrammer I reverted the changes for the Nodes as clusters (aka branded clusters) hope that this will allow you with merging this change that is only related to ordering of the classes, I will then create a follow up PR with the changes that allows for using Nodes as Clusters.

@dan-ash dan-ash changed the title Some reorg in order to help and allow other to contribute easier & Adding Branded Clusters support by enabling a Node to be used as a Cluster Some reorg in order to help and allow others to contribute easier Aug 7, 2021
@dan-ash dan-ash changed the title Some reorg in order to help and allow others to contribute easier Some reorg in order to help and allow others to contribute more Aug 7, 2021
@DonDebonair
Copy link

@mingrammer is there a plan to get this merged?

@nvictor nvictor mentioned this pull request Apr 6, 2022
@strannik19
Copy link

just found this project recently. really need the ability to have edges between Clusters rather than just nodes.

@FFengIll
Copy link

FFengIll commented Oct 5, 2022

It takes years (at least 2), and I am doubt there is something blocks all related PR merge.
Hope to have these features.

diagrams/utils.py Show resolved Hide resolved
diagrams/Cluster.py Outdated Show resolved Hide resolved
docs/guides/cluster.md Outdated Show resolved Hide resolved
@mingrammer
Copy link
Owner

Please resolve the conflicts from master :)

@dan-ash
Copy link
Contributor Author

dan-ash commented Nov 4, 2022

Hey,
It has been a while since I created this PR but I will try to look over it and address the comments.

@mingrammer
Copy link
Owner

@dan-ash Sorry .. 😭

diagrams/utils.py Show resolved Hide resolved
@@ -47,12 +47,12 @@ def test_validate_curvestyle(self):
def test_validate_outformat(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was an issue with the tests, so I decided to modify the code to support the test, if that wasn't the test intention let me know and I will restore the previous

@dan-ash dan-ash requested a review from mingrammer November 17, 2022 15:14
@jobinjosem1
Copy link

@mingrammer Could you please review and merge this one? This is a very cool feature

@jingai-db
Copy link

Friendly ping!

@Bakrog
Copy link

Bakrog commented Jan 10, 2023

Would be awesome to get this feature.

@maor-lb
Copy link

maor-lb commented Feb 2, 2023

Certainly would be awesome

diagrams/__init__.py Outdated Show resolved Hide resolved
@LaTrissTitude
Copy link

Is this review still ongoing ? The ability of linking clusters would be a game changer to link different scales together

create a context abstract class

Node as Cluster

Adding documentation

Revert node as cluster

Fix multiple out format implementation & test

CR Changes

Group=Cluster
@dan-ash
Copy link
Contributor Author

dan-ash commented Jul 23, 2023

@LaTrissTitude Thanks for raising it again, I got a bit frustrated with this project after so many years, but I had a bit of time, so I decided to update the PR.
I hope @mingrammer or another maintainer will give it some attention. Over the years, this PR got a lot of similar responses, so I hope this time it will be reviewed and merged, and once that happens, I could contribute the PR that allows for Nodes to act as clusters, which will allow linking.

@ivoras
Copy link

ivoras commented Dec 2, 2023

Bump!
For both reasons - branding clusters with service icons, and connecting clusters.

@LaTrissTitude
Copy link

LaTrissTitude commented Dec 2, 2023 via email

@chadfurman
Copy link

chadfurman commented Dec 2, 2023 via email

@gabriel-tessier
Copy link
Collaborator

I forked diagrams with cluster changes and the fixes I reported + other features, the lib is actively used by me for the web version and if you really want to use cluster as node give it a try.

https://github.com/diagrams-web/diagrams-xtd

I can push release or publish it on pypi if people use it.

@maxrausch
Copy link

Any updates ?

@lucaspierru-convelio
Copy link

Would be great to have this merged and released, especially for the ability to link Clusters! 👍

@Karreg
Copy link

Karreg commented Feb 28, 2024

It may help people here. I have, since my last comment, switched from diagrams to d2.

It may help you too, or not, depending on your use case.

@LaTrissTitude
Copy link

LaTrissTitude commented Mar 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request status/need-to-review Need to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.