From 312971ea1c8a36e23b1eb980997823560a5cf30d Mon Sep 17 00:00:00 2001 From: tessier Date: Wed, 20 Nov 2024 17:00:21 +0900 Subject: [PATCH] Revert build as node and set in _init --- diagrams/alibabacloud/__init__.py | 4 ++++ diagrams/aws/__init__.py | 4 ++++ diagrams/azure/__init__.py | 4 ++++ diagrams/digitalocean/__init__.py | 4 ++++ diagrams/elastic/__init__.py | 4 ++++ diagrams/firebase/__init__.py | 4 ++++ diagrams/gcp/__init__.py | 4 ++++ diagrams/generic/__init__.py | 4 ++++ diagrams/ibm/__init__.py | 4 ++++ diagrams/k8s/__init__.py | 4 ++++ diagrams/oci/__init__.py | 4 ++++ diagrams/onprem/__init__.py | 4 ++++ diagrams/openstack/__init__.py | 4 ++++ diagrams/outscale/__init__.py | 4 ++++ diagrams/programming/__init__.py | 4 ++++ diagrams/saas/__init__.py | 4 ++++ docs/nodes/alibabacloud.md | 6 ------ docs/nodes/aws.md | 6 ------ docs/nodes/azure.md | 6 ------ docs/nodes/digitalocean.md | 6 ------ docs/nodes/elastic.md | 6 ------ docs/nodes/firebase.md | 6 ------ docs/nodes/gcp.md | 6 ------ docs/nodes/generic.md | 6 ------ docs/nodes/ibm.md | 6 ------ docs/nodes/k8s.md | 6 ------ docs/nodes/oci.md | 6 ------ docs/nodes/onprem.md | 6 ------ docs/nodes/openstack.md | 6 ------ docs/nodes/outscale.md | 6 ------ docs/nodes/saas.md | 6 ------ scripts/generate.py | 4 +++- 32 files changed, 67 insertions(+), 91 deletions(-) diff --git a/diagrams/alibabacloud/__init__.py b/diagrams/alibabacloud/__init__.py index a64c200..7d4fa2b 100644 --- a/diagrams/alibabacloud/__init__.py +++ b/diagrams/alibabacloud/__init__.py @@ -10,3 +10,7 @@ class _AlibabaCloud(Node): _icon_dir = "resources/alibabacloud" fontcolor = "#ffffff" + + +class AlibabaCloud(_AlibabaCloud): + _icon = "alibabacloud.png" diff --git a/diagrams/aws/__init__.py b/diagrams/aws/__init__.py index 1550a0d..cdf31c3 100644 --- a/diagrams/aws/__init__.py +++ b/diagrams/aws/__init__.py @@ -10,3 +10,7 @@ class _AWS(Node): _icon_dir = "resources/aws" fontcolor = "#ffffff" + + +class AWS(_AWS): + _icon = "aws.png" diff --git a/diagrams/azure/__init__.py b/diagrams/azure/__init__.py index 0b80ace..5f7c2b2 100644 --- a/diagrams/azure/__init__.py +++ b/diagrams/azure/__init__.py @@ -10,3 +10,7 @@ class _Azure(Node): _icon_dir = "resources/azure" fontcolor = "#ffffff" + + +class Azure(_Azure): + _icon = "azure.png" diff --git a/diagrams/digitalocean/__init__.py b/diagrams/digitalocean/__init__.py index 29daae0..e9557d1 100644 --- a/diagrams/digitalocean/__init__.py +++ b/diagrams/digitalocean/__init__.py @@ -10,3 +10,7 @@ class _DigitalOcean(Node): _icon_dir = "resources/digitalocean" fontcolor = "#ffffff" + + +class DigitalOcean(_DigitalOcean): + _icon = "digitalocean.png" diff --git a/diagrams/elastic/__init__.py b/diagrams/elastic/__init__.py index 786fa60..17b8696 100644 --- a/diagrams/elastic/__init__.py +++ b/diagrams/elastic/__init__.py @@ -10,3 +10,7 @@ class _Elastic(Node): _icon_dir = "resources/elastic" fontcolor = "#ffffff" + + +class Elastic(_Elastic): + _icon = "elastic.png" diff --git a/diagrams/firebase/__init__.py b/diagrams/firebase/__init__.py index 5cd693e..11c6580 100644 --- a/diagrams/firebase/__init__.py +++ b/diagrams/firebase/__init__.py @@ -10,3 +10,7 @@ class _Firebase(Node): _icon_dir = "resources/firebase" fontcolor = "#ffffff" + + +class Firebase(_Firebase): + _icon = "firebase.png" diff --git a/diagrams/gcp/__init__.py b/diagrams/gcp/__init__.py index 1188a8d..2ca41ae 100644 --- a/diagrams/gcp/__init__.py +++ b/diagrams/gcp/__init__.py @@ -10,3 +10,7 @@ class _GCP(Node): _icon_dir = "resources/gcp" fontcolor = "#2d3436" + + +class GCP(_GCP): + _icon = "gcp.png" diff --git a/diagrams/generic/__init__.py b/diagrams/generic/__init__.py index 70db686..de86d4f 100644 --- a/diagrams/generic/__init__.py +++ b/diagrams/generic/__init__.py @@ -10,3 +10,7 @@ class _Generic(Node): _icon_dir = "resources/generic" fontcolor = "#ffffff" + + +class Generic(_Generic): + _icon = "generic.png" diff --git a/diagrams/ibm/__init__.py b/diagrams/ibm/__init__.py index 450fa36..31896d6 100644 --- a/diagrams/ibm/__init__.py +++ b/diagrams/ibm/__init__.py @@ -10,3 +10,7 @@ class _IBM(Node): _icon_dir = "resources/ibm" fontcolor = "#ffffff" + + +class IBM(_IBM): + _icon = "ibm.png" diff --git a/diagrams/k8s/__init__.py b/diagrams/k8s/__init__.py index 6a137b4..871bd2d 100644 --- a/diagrams/k8s/__init__.py +++ b/diagrams/k8s/__init__.py @@ -10,3 +10,7 @@ class _K8S(Node): _icon_dir = "resources/k8s" fontcolor = "#2d3436" + + +class K8S(_K8S): + _icon = "k8s.png" diff --git a/diagrams/oci/__init__.py b/diagrams/oci/__init__.py index 7613b88..8dacc92 100644 --- a/diagrams/oci/__init__.py +++ b/diagrams/oci/__init__.py @@ -10,3 +10,7 @@ class _OCI(Node): _icon_dir = "resources/oci" fontcolor = "#312D2A" + + +class OCI(_OCI): + _icon = "oci.png" diff --git a/diagrams/onprem/__init__.py b/diagrams/onprem/__init__.py index 73d3e1f..232c063 100644 --- a/diagrams/onprem/__init__.py +++ b/diagrams/onprem/__init__.py @@ -10,3 +10,7 @@ class _OnPrem(Node): _icon_dir = "resources/onprem" fontcolor = "#ffffff" + + +class OnPrem(_OnPrem): + _icon = "onprem.png" diff --git a/diagrams/openstack/__init__.py b/diagrams/openstack/__init__.py index 7b36e1b..4654110 100644 --- a/diagrams/openstack/__init__.py +++ b/diagrams/openstack/__init__.py @@ -10,3 +10,7 @@ class _OpenStack(Node): _icon_dir = "resources/openstack" fontcolor = "#ffffff" + + +class OpenStack(_OpenStack): + _icon = "openstack.png" diff --git a/diagrams/outscale/__init__.py b/diagrams/outscale/__init__.py index 917b4bf..391ac4d 100644 --- a/diagrams/outscale/__init__.py +++ b/diagrams/outscale/__init__.py @@ -6,3 +6,7 @@ class _Outscale(Node): _icon_dir = "resources/outscale" fontcolor = "#ffffff" + + +class Outscale(_Outscale): + _icon = "outscale.png" diff --git a/diagrams/programming/__init__.py b/diagrams/programming/__init__.py index 7a846e1..504cea6 100644 --- a/diagrams/programming/__init__.py +++ b/diagrams/programming/__init__.py @@ -10,3 +10,7 @@ class _Programming(Node): _icon_dir = "resources/programming" fontcolor = "#ffffff" + + +class Programming(_Programming): + _icon = "programming.png" diff --git a/diagrams/saas/__init__.py b/diagrams/saas/__init__.py index ecae1d8..e0acacc 100644 --- a/diagrams/saas/__init__.py +++ b/diagrams/saas/__init__.py @@ -10,3 +10,7 @@ class _Saas(Node): _icon_dir = "resources/saas" fontcolor = "#ffffff" + + +class Saas(_Saas): + _icon = "saas.png" diff --git a/docs/nodes/alibabacloud.md b/docs/nodes/alibabacloud.md index 4edb6f8..a274473 100644 --- a/docs/nodes/alibabacloud.md +++ b/docs/nodes/alibabacloud.md @@ -5,12 +5,6 @@ title: AlibabaCloud Node classes list of the alibabacloud provider. -## alibabacloud.alibabacloud - - -AlibabaCloud -**diagrams.alibabacloud.alibabacloud.AlibabaCloud** - ## alibabacloud.analytics diff --git a/docs/nodes/aws.md b/docs/nodes/aws.md index 96403d7..aede97f 100644 --- a/docs/nodes/aws.md +++ b/docs/nodes/aws.md @@ -104,12 +104,6 @@ Node classes list of the aws provider. Sumerian **diagrams.aws.ar.Sumerian** -## aws.aws - - -AWS -**diagrams.aws.aws.AWS** - ## aws.blockchain diff --git a/docs/nodes/azure.md b/docs/nodes/azure.md index f6700e3..875471e 100644 --- a/docs/nodes/azure.md +++ b/docs/nodes/azure.md @@ -44,12 +44,6 @@ Node classes list of the azure provider. SynapseAnalytics **diagrams.azure.analytics.SynapseAnalytics** -## azure.azure - - -Azure -**diagrams.azure.azure.Azure** - ## azure.compute diff --git a/docs/nodes/digitalocean.md b/docs/nodes/digitalocean.md index 104d42d..c29118c 100644 --- a/docs/nodes/digitalocean.md +++ b/docs/nodes/digitalocean.md @@ -47,12 +47,6 @@ Node classes list of the digitalocean provider. DbaasStandby **diagrams.digitalocean.database.DbaasStandby** -## digitalocean.digitalocean - - -DigitalOcean -**diagrams.digitalocean.digitalocean.DigitalOcean** - ## digitalocean.network diff --git a/docs/nodes/elastic.md b/docs/nodes/elastic.md index 8fe653d..8c1212d 100644 --- a/docs/nodes/elastic.md +++ b/docs/nodes/elastic.md @@ -47,12 +47,6 @@ Node classes list of the elastic provider. Winlogbeat **diagrams.elastic.beats.Winlogbeat** -## elastic.elastic - - -Elastic -**diagrams.elastic.elastic.Elastic** - ## elastic.elasticsearch diff --git a/docs/nodes/firebase.md b/docs/nodes/firebase.md index b558f91..15c4582 100644 --- a/docs/nodes/firebase.md +++ b/docs/nodes/firebase.md @@ -41,12 +41,6 @@ Node classes list of the firebase provider. Extensions **diagrams.firebase.extentions.Extensions** -## firebase.firebase - - -Firebase -**diagrams.firebase.firebase.Firebase** - ## firebase.grow diff --git a/docs/nodes/gcp.md b/docs/nodes/gcp.md index 95dc4e2..800489d 100644 --- a/docs/nodes/gcp.md +++ b/docs/nodes/gcp.md @@ -146,12 +146,6 @@ Node classes list of the gcp provider. ToolsForVisualStudio **diagrams.gcp.devtools.ToolsForVisualStudio** -## gcp.gcp - - -GCP -**diagrams.gcp.gcp.GCP** - ## gcp.iot diff --git a/docs/nodes/generic.md b/docs/nodes/generic.md index 9d9022a..054164b 100644 --- a/docs/nodes/generic.md +++ b/docs/nodes/generic.md @@ -32,12 +32,6 @@ Node classes list of the generic provider. Tablet **diagrams.generic.device.Tablet** -## generic.generic - - -Generic -**diagrams.generic.generic.Generic** - ## generic.network diff --git a/docs/nodes/ibm.md b/docs/nodes/ibm.md index 826ef75..1bb3068 100644 --- a/docs/nodes/ibm.md +++ b/docs/nodes/ibm.md @@ -323,12 +323,6 @@ Node classes list of the ibm provider. TransformationConnectivity **diagrams.ibm.general.TransformationConnectivity** -## ibm.ibm - - -IBM -**diagrams.ibm.ibm.IBM** - ## ibm.infrastructure diff --git a/docs/nodes/k8s.md b/docs/nodes/k8s.md index 9402315..3459d9e 100644 --- a/docs/nodes/k8s.md +++ b/docs/nodes/k8s.md @@ -104,12 +104,6 @@ Node classes list of the k8s provider. Node **diagrams.k8s.infra.Node** -## k8s.k8s - - -K8S -**diagrams.k8s.k8s.K8S** - ## k8s.network diff --git a/docs/nodes/oci.md b/docs/nodes/oci.md index 806bcf2..2d0c6fa 100644 --- a/docs/nodes/oci.md +++ b/docs/nodes/oci.md @@ -344,12 +344,6 @@ Node classes list of the oci provider. Vcn **diagrams.oci.network.Vcn** -## oci.oci - - -OCI -**diagrams.oci.oci.OCI** - ## oci.security diff --git a/docs/nodes/onprem.md b/docs/nodes/onprem.md index 3a9d9cc..149ebf9 100644 --- a/docs/nodes/onprem.md +++ b/docs/nodes/onprem.md @@ -482,12 +482,6 @@ Node classes list of the onprem provider. Zookeeper **diagrams.onprem.network.Zookeeper** -## onprem.onprem - - -OnPrem -**diagrams.onprem.onprem.OnPrem** - ## onprem.proxmox diff --git a/docs/nodes/openstack.md b/docs/nodes/openstack.md index 6a498d8..c88727a 100644 --- a/docs/nodes/openstack.md +++ b/docs/nodes/openstack.md @@ -119,12 +119,6 @@ Node classes list of the openstack provider. Tacker **diagrams.openstack.nfv.Tacker** -## openstack.openstack - - -OpenStack -**diagrams.openstack.openstack.OpenStack** - ## openstack.optimization diff --git a/docs/nodes/outscale.md b/docs/nodes/outscale.md index 3655dd0..34a25c1 100644 --- a/docs/nodes/outscale.md +++ b/docs/nodes/outscale.md @@ -35,12 +35,6 @@ Node classes list of the outscale provider. SiteToSiteVpng **diagrams.outscale.network.SiteToSiteVpng** -## outscale.outscale - - -Outscale -**diagrams.outscale.outscale.Outscale** - ## outscale.security diff --git a/docs/nodes/saas.md b/docs/nodes/saas.md index 29f65eb..68bdeea 100644 --- a/docs/nodes/saas.md +++ b/docs/nodes/saas.md @@ -119,12 +119,6 @@ Node classes list of the saas provider. Recombee **diagrams.saas.recommendation.Recombee** -## saas.saas - - -Saas -**diagrams.saas.saas.Saas** - ## saas.security diff --git a/scripts/generate.py b/scripts/generate.py index 8d8973b..299f394 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -89,8 +89,10 @@ def generate(pvd: str) -> None: pngs = list(filter(lambda f: f.endswith(".png"), files)) paths = list(filter(lambda f: "rounded" not in f, pngs)) - # Build the provider itself. + # Skip the top-root directory. typ = os.path.basename(root) + if typ == pvd: + continue resource_root = os.path.relpath(root, base) classes = gen_classes(pvd, typ, paths)