Skip to content

Commit

Permalink
Merge branch 'master' into feature/pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bdsoha committed Oct 31, 2023
2 parents fe7aaf1 + 3dddbc6 commit a8c6188
Show file tree
Hide file tree
Showing 44 changed files with 359 additions and 275 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "CodeQL"

on:
push:
branches: [master, ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
Expand All @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
# a pull request then we can check out the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ jobs:
test:
strategy:
matrix:
python: ["3.6", "3.7", "3.8", "3.9"]
runs-on: ubuntu-20.04
python: ["3.9", "3.10", "3.11"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Install poetry
run: pip install poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Run all tests
run: |
poetry install
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Diagrams lets you draw the cloud system architecture **in Python code**. It was

## Getting Started

It requires **Python 3.6** or higher, check your Python version first.
It requires **Python 3.7** or higher, check your Python version first.

It uses [Graphviz](https://www.graphviz.org/) to render the diagram, so you need to [install Graphviz](https://graphviz.gitlab.io/download/) to use **diagrams**. After installing graphviz (or already have it), install the **diagrams**.

Expand Down Expand Up @@ -76,8 +76,6 @@ To contribute to diagram, check out [contribution guidelines](CONTRIBUTING.md).
## Who uses it?

[GitPitch](https://gitpitch.github.io/gitpitch) is the perfect slide deck solution for Tech Conferences, Training, Developer Advocates, and Educators. Diagrams is now available as a dedicated [Cloud Diagram Markdown Widget](https://gitpitch.github.io/gitpitch/#/diagrams/cloud-architecture) so you can use Diagrams directly on any slide for conferences, meetups, and training.

[Cloudiscovery](https://github.com/Cloud-Architects/cloudiscovery) helps you to analyze resources in your cloud (AWS/GCP/Azure/Alibaba/IBM) account. It allows you to create a diagram of analyzed cloud resource map based on this Diagrams library, so you can draw your existing cloud infrastructure with Cloudiscovery.

[Airflow Diagrams](https://github.com/feluelle/airflow-diagrams) is an Airflow plugin that aims to easily visualise your Airflow DAGs on service level from providers like AWS, GCP, Azure, etc. via diagrams.
Expand Down
18 changes: 13 additions & 5 deletions diagrams/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import uuid
from pathlib import Path
from typing import Dict, List, Union
from typing import Dict, List, Optional, Union

from graphviz import Digraph

Expand Down Expand Up @@ -86,9 +86,9 @@ def __init__(
autolabel: bool = False,
show: bool = True,
strict: bool = False,
graph_attr: dict = {},
node_attr: dict = {},
edge_attr: dict = {},
graph_attr: Optional[dict] = None,
node_attr: Optional[dict] = None,
edge_attr: Optional[dict] = None,
):
"""Diagram represents a global diagrams context.
Expand All @@ -105,6 +105,12 @@ def __init__(
:param edge_attr: Provide edge_attr dot config attributes.
:param strict: Rendering should merge multi-edges.
"""
if graph_attr is None:
graph_attr = {}
if node_attr is None:
node_attr = {}
if edge_attr is None:
edge_attr = {}
self.name = name
if not name and not filename:
filename = "diagrams_image"
Expand Down Expand Up @@ -215,14 +221,16 @@ def __init__(
self,
label: str = "cluster",
direction: str = "LR",
graph_attr: dict = {},
graph_attr: Optional[dict] = None,
):
"""Cluster represents a cluster context.
:param label: Cluster label.
:param direction: Data flow direction. Default is 'left to right'.
:param graph_attr: Provide graph_attr dot config attributes.
"""
if graph_attr is None:
graph_attr = {}
self.label = label
self.name = "cluster_" + self.label

Expand Down
4 changes: 4 additions & 0 deletions diagrams/azure/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ class CloudsimpleVirtualMachines(_Compute):
_icon = "cloudsimple-virtual-machines.png"


class ContainerApps(_Compute):
_icon = "container-apps.png"


class ContainerInstances(_Compute):
_icon = "container-instances.png"

Expand Down
4 changes: 4 additions & 0 deletions diagrams/azure/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ class OnPremisesDataGateways(_Network):
_icon = "on-premises-data-gateways.png"


class PrivateEndpoint(_Network):
_icon = "private-endpoint.png"


class PublicIpAddresses(_Network):
_icon = "public-ip-addresses.png"

Expand Down
4 changes: 4 additions & 0 deletions diagrams/gcp/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ class APIGateway(_API):
_icon = "api-gateway.png"


class Apigee(_API):
_icon = "apigee.png"


class Endpoints(_API):
_icon = "endpoints.png"

Expand Down
4 changes: 4 additions & 0 deletions diagrams/gcp/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ class _Operations(_GCP):
_icon_dir = "resources/gcp/operations"


class Logging(_Operations):
_icon = "logging.png"


class Monitoring(_Operations):
_icon = "monitoring.png"

Expand Down
4 changes: 4 additions & 0 deletions diagrams/generic/virtualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ class _Virtualization(_Generic):
_icon_dir = "resources/generic/virtualization"


class Qemu(_Virtualization):
_icon = "qemu.png"


class Virtualbox(_Virtualization):
_icon = "virtualbox.png"

Expand Down
4 changes: 4 additions & 0 deletions diagrams/onprem/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ class Tableau(_Analytics):
_icon = "tableau.png"


class Trino(_Analytics):
_icon = "trino.png"


# Aliases

PowerBI = Powerbi
15 changes: 15 additions & 0 deletions diagrams/onprem/messaging.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.

from . import _OnPrem


class _Messaging(_OnPrem):
_type = "messaging"
_icon_dir = "resources/onprem/messaging"


class Centrifugo(_Messaging):
_icon = "centrifugo.png"


# Aliases
4 changes: 4 additions & 0 deletions diagrams/onprem/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class Humio(_Monitoring):
_icon = "humio.png"


class Mimir(_Monitoring):
_icon = "mimir.png"


class Nagios(_Monitoring):
_icon = "nagios.png"

Expand Down
4 changes: 4 additions & 0 deletions diagrams/onprem/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ class Jaeger(_Tracing):
_icon = "jaeger.png"


class Tempo(_Tracing):
_icon = "tempo.png"


# Aliases
4 changes: 4 additions & 0 deletions diagrams/programming/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ class Micronaut(_Framework):
_icon = "micronaut.png"


class Quarkus(_Framework):
_icon = "quarkus.png"


class Rails(_Framework):
_icon = "rails.png"

Expand Down
4 changes: 4 additions & 0 deletions diagrams/saas/alerting.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class Opsgenie(_Alerting):
_icon = "opsgenie.png"


class Pagerduty(_Alerting):
_icon = "pagerduty.png"


class Pushover(_Alerting):
_icon = "pushover.png"

Expand Down
4 changes: 4 additions & 0 deletions diagrams/saas/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ class _Analytics(_Saas):
_icon_dir = "resources/saas/analytics"


class Dataform(_Analytics):
_icon = "dataform.png"


class Snowflake(_Analytics):
_icon = "snowflake.png"

Expand Down
6 changes: 6 additions & 0 deletions docs/nodes/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ Node classes list of azure provider.
<img width="30" src="/img/resources/azure/compute/cloudsimple-virtual-machines.png" alt="CloudsimpleVirtualMachines" style="float: left; padding-right: 5px;" >
**diagrams.azure.compute.CloudsimpleVirtualMachines**

<img width="30" src="/img/resources/azure/compute/container-apps.png" alt="ContainerApps" style="float: left; padding-right: 5px;" >
**diagrams.azure.compute.ContainerApps**

<img width="30" src="/img/resources/azure/compute/container-instances.png" alt="ContainerInstances" style="float: left; padding-right: 5px;" >
**diagrams.azure.compute.ContainerInstances**

Expand Down Expand Up @@ -572,6 +575,9 @@ Node classes list of azure provider.
<img width="30" src="/img/resources/azure/network/on-premises-data-gateways.png" alt="OnPremisesDataGateways" style="float: left; padding-right: 5px;" >
**diagrams.azure.network.OnPremisesDataGateways**

<img width="30" src="/img/resources/azure/network/private-endpoint.png" alt="PrivateEndpoint" style="float: left; padding-right: 5px;" >
**diagrams.azure.network.PrivateEndpoint**

<img width="30" src="/img/resources/azure/network/public-ip-addresses.png" alt="PublicIpAddresses" style="float: left; padding-right: 5px;" >
**diagrams.azure.network.PublicIpAddresses**

Expand Down
6 changes: 6 additions & 0 deletions docs/nodes/gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ Node classes list of gcp provider.
<img width="30" src="/img/resources/gcp/api/api-gateway.png" alt="APIGateway" style="float: left; padding-right: 5px;" >
**diagrams.gcp.api.APIGateway**

<img width="30" src="/img/resources/gcp/api/apigee.png" alt="Apigee" style="float: left; padding-right: 5px;" >
**diagrams.gcp.api.Apigee**

<img width="30" src="/img/resources/gcp/api/endpoints.png" alt="Endpoints" style="float: left; padding-right: 5px;" >
**diagrams.gcp.api.Endpoints**

Expand Down Expand Up @@ -278,6 +281,9 @@ Node classes list of gcp provider.
## gcp.operations


<img width="30" src="/img/resources/gcp/operations/logging.png" alt="Logging" style="float: left; padding-right: 5px;" >
**diagrams.gcp.operations.Logging**

<img width="30" src="/img/resources/gcp/operations/monitoring.png" alt="Monitoring" style="float: left; padding-right: 5px;" >
**diagrams.gcp.operations.Monitoring**

Expand Down
3 changes: 3 additions & 0 deletions docs/nodes/generic.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ Node classes list of generic provider.
## generic.virtualization


<img width="30" src="/img/resources/generic/virtualization/qemu.png" alt="Qemu" style="float: left; padding-right: 5px;" >
**diagrams.generic.virtualization.Qemu**

<img width="30" src="/img/resources/generic/virtualization/virtualbox.png" alt="Virtualbox" style="float: left; padding-right: 5px;" >
**diagrams.generic.virtualization.Virtualbox**

Expand Down
15 changes: 15 additions & 0 deletions docs/nodes/onprem.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ Node classes list of onprem provider.
<img width="30" src="/img/resources/onprem/analytics/tableau.png" alt="Tableau" style="float: left; padding-right: 5px;" >
**diagrams.onprem.analytics.Tableau**

<img width="30" src="/img/resources/onprem/analytics/trino.png" alt="Trino" style="float: left; padding-right: 5px;" >
**diagrams.onprem.analytics.Trino**

## onprem.auth


Expand Down Expand Up @@ -323,6 +326,12 @@ Node classes list of onprem provider.
<img width="30" src="/img/resources/onprem/logging/syslog-ng.png" alt="SyslogNg" style="float: left; padding-right: 5px;" >
**diagrams.onprem.logging.SyslogNg**

## onprem.messaging


<img width="30" src="/img/resources/onprem/messaging/centrifugo.png" alt="Centrifugo" style="float: left; padding-right: 5px;" >
**diagrams.onprem.messaging.Centrifugo**

## onprem.mlops


Expand Down Expand Up @@ -350,6 +359,9 @@ Node classes list of onprem provider.
<img width="30" src="/img/resources/onprem/monitoring/humio.png" alt="Humio" style="float: left; padding-right: 5px;" >
**diagrams.onprem.monitoring.Humio**

<img width="30" src="/img/resources/onprem/monitoring/mimir.png" alt="Mimir" style="float: left; padding-right: 5px;" >
**diagrams.onprem.monitoring.Mimir**

<img width="30" src="/img/resources/onprem/monitoring/nagios.png" alt="Nagios" style="float: left; padding-right: 5px;" >
**diagrams.onprem.monitoring.Nagios**

Expand Down Expand Up @@ -545,6 +557,9 @@ Node classes list of onprem provider.
<img width="30" src="/img/resources/onprem/tracing/jaeger.png" alt="Jaeger" style="float: left; padding-right: 5px;" >
**diagrams.onprem.tracing.Jaeger**

<img width="30" src="/img/resources/onprem/tracing/tempo.png" alt="Tempo" style="float: left; padding-right: 5px;" >
**diagrams.onprem.tracing.Tempo**

## onprem.vcs


Expand Down
3 changes: 3 additions & 0 deletions docs/nodes/programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ Node classes list of programming provider.
<img width="30" src="/img/resources/programming/framework/micronaut.png" alt="Micronaut" style="float: left; padding-right: 5px;" >
**diagrams.programming.framework.Micronaut**

<img width="30" src="/img/resources/programming/framework/quarkus.png" alt="Quarkus" style="float: left; padding-right: 5px;" >
**diagrams.programming.framework.Quarkus**

<img width="30" src="/img/resources/programming/framework/rails.png" alt="Rails" style="float: left; padding-right: 5px;" >
**diagrams.programming.framework.Rails**

Expand Down
6 changes: 6 additions & 0 deletions docs/nodes/saas.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Node classes list of saas provider.
<img width="30" src="/img/resources/saas/alerting/opsgenie.png" alt="Opsgenie" style="float: left; padding-right: 5px;" >
**diagrams.saas.alerting.Opsgenie**

<img width="30" src="/img/resources/saas/alerting/pagerduty.png" alt="Pagerduty" style="float: left; padding-right: 5px;" >
**diagrams.saas.alerting.Pagerduty**

<img width="30" src="/img/resources/saas/alerting/pushover.png" alt="Pushover" style="float: left; padding-right: 5px;" >
**diagrams.saas.alerting.Pushover**

Expand All @@ -23,6 +26,9 @@ Node classes list of saas provider.
## saas.analytics


<img width="30" src="/img/resources/saas/analytics/dataform.png" alt="Dataform" style="float: left; padding-right: 5px;" >
**diagrams.saas.analytics.Dataform**

<img width="30" src="/img/resources/saas/analytics/snowflake.png" alt="Snowflake" style="float: left; padding-right: 5px;" >
**diagrams.saas.analytics.Snowflake**

Expand Down
Loading

0 comments on commit a8c6188

Please sign in to comment.