diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ef8e42f3..ed784b99 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,21 +5,21 @@ on: branches: - master paths: - - '.github/workflows/test.yml' - - '**.py' + - ".github/workflows/test.yml" + - "**.py" pull_request: branches: - master paths: - - '.github/workflows/test.yml' - - '**.py' + - ".github/workflows/test.yml" + - "**.py" jobs: test: strategy: matrix: - python: ['3.6', '3.7', '3.8', '3.9'] - runs-on: ubuntu-latest + python: ["3.6", "3.7", "3.8", "3.9"] + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 diff --git a/config.py b/config.py index 08b34004..dc0590b4 100644 --- a/config.py +++ b/config.py @@ -13,7 +13,7 @@ DIR_TEMPLATE = "templates" PROVIDERS = ( "base", - "onprem" + "onprem", "aws", "azure", "digitalocean", @@ -83,7 +83,7 @@ UPPER_WORDS = { "sa", "sc", "sts", "svc", ), "oci": ("oci", "ocid", "oke", "ocir", "ddos", "waf", "bm", "vm", "cdn", "vpn", "dns", "nat", "dms", "api", "id"), - "elastic": ("apm", "siem", "ece", "eck"), + "elastic": ("apm", "siem", "ece", "eck", "sql"), "generic": ("vpn", "ios", "xen", "sql", "lxc"), "outscale": ("osc",), "openstack": ("rpm", "loci", "nfv", "ec2api"), @@ -446,7 +446,9 @@ ALIASES = { }, "elastic": { "elasticsearch": { + "Elasticsearch": "ElasticSearch", "Logstash": "LogStash", + "MachineLearning": "ML", } }, "outscale": { diff --git a/diagrams/__init__.py b/diagrams/__init__.py index 55947a0f..fd34a0fd 100644 --- a/diagrams/__init__.py +++ b/diagrams/__init__.py @@ -154,6 +154,7 @@ class Diagram(_Cluster): outformat: str = "png", autolabel: bool = False, show: bool = True, + strict: bool = False, graph_attr: dict = {}, node_attr: dict = {}, edge_attr: dict = {}, @@ -171,6 +172,7 @@ class Diagram(_Cluster): :param graph_attr: Provide graph_attr dot config attributes. :param node_attr: Provide node_attr dot config attributes. :param edge_attr: Provide edge_attr dot config attributes. + :param strict: Rendering should merge multi-edges. """ self.name = name @@ -182,6 +184,7 @@ class Diagram(_Cluster): super().__init__(self.name, filename=self.filename) self.edges = {} + self.dot = Digraph(self.name, filename=self.filename, strict=strict) # Set attributes. self.dot.attr(compound="true") diff --git a/diagrams/c4/__init__.py b/diagrams/c4/__init__.py index 40577c8c..90ce7a92 100644 --- a/diagrams/c4/__init__.py +++ b/diagrams/c4/__init__.py @@ -58,24 +58,50 @@ def C4Node(name, technology="", description="", type="Container", **kwargs): def Container(name, technology="", description="", **kwargs): - return C4Node(name, technology=technology, description=description, type="Container") + container_attributes = { + "name": name, + "technology": technology, + "description": description, + "type": "Container", + } + container_attributes.update(kwargs) + return C4Node(**container_attributes) def Database(name, technology="", description="", **kwargs): - return C4Node(name, technology=technology, description=description, type="Database", shape="cylinder", labelloc="b") + database_attributes = { + "name": name, + "technology": technology, + "description": description, + "type": "Database", + "shape": "cylinder", + "labelloc": "b", + } + database_attributes.update(kwargs) + return C4Node(**database_attributes) def System(name, description="", external=False, **kwargs): - type = "External System" if external else "System" - fillcolor = "gray60" if external else "dodgerblue4" - return C4Node(name, description=description, type=type, fillcolor=fillcolor) + system_attributes = { + "name": name, + "description": description, + "type": "External System" if external else "System", + "fillcolor": "gray60" if external else "dodgerblue4", + } + system_attributes.update(kwargs) + return C4Node(**system_attributes) def Person(name, description="", external=False, **kwargs): - type = "External Person" if external else "Person" - fillcolor = "gray60" if external else "dodgerblue4" - style = "rounded,filled" - return C4Node(name, description=description, type=type, fillcolor=fillcolor, style=style) + person_attributes = { + "name": name, + "description": description, + "type": "External Person" if external else "Person", + "fillcolor": "gray60" if external else "dodgerblue4", + "style": "rounded,filled", + } + person_attributes.update(kwargs) + return C4Node(**person_attributes) def SystemBoundary(name, **kwargs): @@ -90,8 +116,10 @@ def SystemBoundary(name, **kwargs): def Relationship(label="", **kwargs): - edge_attribtues = {"style": "dashed", "color": "gray60"} - if label: - edge_attribtues.update({"label": _format_edge_label(label)}) - edge_attribtues.update(kwargs) - return Edge(**edge_attribtues) + edge_attributes = { + "style": "dashed", + "color": "gray60", + "label": _format_edge_label(label) if label else "", + } + edge_attributes.update(kwargs) + return Edge(**edge_attributes) diff --git a/diagrams/elastic/elasticsearch.py b/diagrams/elastic/elasticsearch.py index eec16b7a..6234eb9c 100644 --- a/diagrams/elastic/elasticsearch.py +++ b/diagrams/elastic/elasticsearch.py @@ -56,7 +56,7 @@ class SecuritySettings(_Elasticsearch): _icon = "security-settings.png" -class Sql(_Elasticsearch): +class SQL(_Elasticsearch): _icon = "sql.png" @@ -66,4 +66,6 @@ class Stack(_Elasticsearch): # Aliases +ElasticSearch = Elasticsearch LogStash = Logstash +ML = MachineLearning diff --git a/diagrams/onprem/network.py b/diagrams/onprem/network.py index 0dcee1ca..15d81b24 100644 --- a/diagrams/onprem/network.py +++ b/diagrams/onprem/network.py @@ -120,6 +120,10 @@ class Wildfly(_Network): _icon = "wildfly.png" +class Yarp(_Network): + _icon = "yarp.png" + + class Zookeeper(_Network): _icon = "zookeeper.png" diff --git a/diagrams/onprem/registry.py b/diagrams/onprem/registry.py index 8ee3a401..259df50e 100644 --- a/diagrams/onprem/registry.py +++ b/diagrams/onprem/registry.py @@ -12,4 +12,8 @@ class Harbor(_Registry): _icon = "harbor.png" +class Jfrog(_Registry): + _icon = "jfrog.png" + + # Aliases diff --git a/diagrams/programming/framework.py b/diagrams/programming/framework.py index e4ba3b68..46f67750 100644 --- a/diagrams/programming/framework.py +++ b/diagrams/programming/framework.py @@ -64,6 +64,10 @@ class Starlette(_Framework): _icon = "starlette.png" +class Svelte(_Framework): + _icon = "svelte.png" + + class Vue(_Framework): _icon = "vue.png" diff --git a/docs/nodes/elastic.md b/docs/nodes/elastic.md index a24d046b..bc1c9647 100644 --- a/docs/nodes/elastic.md +++ b/docs/nodes/elastic.md @@ -57,7 +57,7 @@ Node classes list of elastic provider. **diagrams.elastic.elasticsearch.Beats** Elasticsearch -**diagrams.elastic.elasticsearch.Elasticsearch** +**diagrams.elastic.elasticsearch.Elasticsearch**, **ElasticSearch** (alias) Kibana **diagrams.elastic.elasticsearch.Kibana** @@ -69,7 +69,7 @@ Node classes list of elastic provider. **diagrams.elastic.elasticsearch.Logstash**, **LogStash** (alias) MachineLearning -**diagrams.elastic.elasticsearch.MachineLearning** +**diagrams.elastic.elasticsearch.MachineLearning**, **ML** (alias) MapServices **diagrams.elastic.elasticsearch.MapServices** @@ -86,8 +86,8 @@ Node classes list of elastic provider. SecuritySettings **diagrams.elastic.elasticsearch.SecuritySettings** -Sql -**diagrams.elastic.elasticsearch.Sql** +SQL +**diagrams.elastic.elasticsearch.SQL** Stack **diagrams.elastic.elasticsearch.Stack** diff --git a/docs/nodes/onprem.md b/docs/nodes/onprem.md index 143eed90..b256bc2f 100644 --- a/docs/nodes/onprem.md +++ b/docs/nodes/onprem.md @@ -461,6 +461,9 @@ Node classes list of onprem provider. Wildfly **diagrams.onprem.network.Wildfly** +Yarp +**diagrams.onprem.network.Yarp** + Zookeeper **diagrams.onprem.network.Zookeeper** @@ -500,6 +503,9 @@ Node classes list of onprem provider. Harbor **diagrams.onprem.registry.Harbor** +Jfrog +**diagrams.onprem.registry.Jfrog** + ## onprem.search diff --git a/docs/nodes/programming.md b/docs/nodes/programming.md index de826bb8..c6af42f7 100644 --- a/docs/nodes/programming.md +++ b/docs/nodes/programming.md @@ -125,6 +125,9 @@ Node classes list of programming provider. Starlette **diagrams.programming.framework.Starlette** +Svelte +**diagrams.programming.framework.Svelte** + Vue **diagrams.programming.framework.Vue** diff --git a/poetry.lock b/poetry.lock index 76254af6..93ed5601 100644 --- a/poetry.lock +++ b/poetry.lock @@ -13,14 +13,6 @@ typed-ast = {version = ">=1.4.0,<2.0", markers = "implementation_name == \"cpyth typing-extensions = {version = ">=3.10", markers = "python_version < \"3.10\""} wrapt = ">=1.11,<1.14" -[[package]] -name = "atomicwrites" -version = "1.3.0" -description = "Atomic file writes." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - [[package]] name = "attrs" version = "19.3.0" @@ -37,9 +29,9 @@ tests = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.i [[package]] name = "black" -version = "22.10.0" +version = "22.12.0" description = "The uncompromising code formatter." -category = "main" +category = "dev" optional = false python-versions = ">=3.7" @@ -62,7 +54,7 @@ uvloop = ["uvloop (>=0.15.2)"] name = "click" version = "8.1.3" description = "Composable command line interface toolkit" -category = "main" +category = "dev" optional = false python-versions = ">=3.7" @@ -74,28 +66,39 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} name = "colorama" version = "0.4.3" description = "Cross-platform colored terminal text." -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +[[package]] +name = "exceptiongroup" +version = "1.1.0" +description = "Backport of PEP 654 (exception groups)" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +test = ["pytest (>=6)"] + [[package]] name = "graphviz" -version = "0.19.1" +version = "0.20.1" description = "Simple Python interface for Graphviz" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.extras] dev = ["flake8", "pep8-naming", "tox (>=3)", "twine", "wheel"] -docs = ["sphinx (>=1.8)", "sphinx-autodoc-typehints", "sphinx-rtd-theme"] -test = ["coverage", "mock (>=4)", "pytest (>=6)", "pytest-cov", "pytest-mock (>=3)"] +docs = ["sphinx (>=5)", "sphinx-autodoc-typehints", "sphinx-rtd-theme"] +test = ["coverage", "mock (>=4)", "pytest (>=7)", "pytest-cov", "pytest-mock (>=3)"] [[package]] name = "importlib-metadata" version = "1.5.0" description = "Read metadata from Python packages" -category = "main" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" @@ -130,11 +133,11 @@ xdg-home = ["appdirs (>=1.4.0)"] [[package]] name = "jinja2" -version = "3.0.1" +version = "3.1.2" description = "A very fast and expressive template engine." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] MarkupSafe = ">=2.0" @@ -170,7 +173,7 @@ python-versions = "*" name = "mypy-extensions" version = "0.4.3" description = "Experimental type system extensions for programs checked with the mypy typechecker." -category = "main" +category = "dev" optional = false python-versions = "*" @@ -189,7 +192,7 @@ pyparsing = ">=2.0.2" name = "pathspec" version = "0.10.1" description = "Utility library for gitignore style pattern matching of file paths." -category = "main" +category = "dev" optional = false python-versions = ">=3.7" @@ -197,7 +200,7 @@ python-versions = ">=3.7" name = "platformdirs" version = "2.4.0" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -219,14 +222,6 @@ importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] dev = ["pre-commit", "tox"] -[[package]] -name = "py" -version = "1.10.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - [[package]] name = "pylint" version = "2.12.0" @@ -254,22 +249,21 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "pytest" -version = "7.0.1" +version = "7.2.0" description = "pytest: simple powerful testing with Python" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] -atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" -py = ">=1.8.2" -tomli = ">=1.0.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] @@ -306,7 +300,7 @@ python-versions = "*" name = "tomli" version = "1.2.3" description = "A lil' TOML parser" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -322,7 +316,7 @@ python-versions = ">=3.6" name = "typing-extensions" version = "4.1.1" description = "Backported and Experimental Type Hints for Python 3.6+" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -338,7 +332,7 @@ python-versions = "*" name = "zipp" version = "3.1.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -349,43 +343,30 @@ testing = ["func-timeout", "jaraco.itertools"] [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "89ec17def343e74e340a9a5261a015804005fc9911ae35d5dacb40c1edb591aa" +content-hash = "bd314565d6ceadde7dfc215293ff1365ad294a2219d822620beeadac0d1f3736" [metadata.files] astroid = [ {file = "astroid-2.9.0-py3-none-any.whl", hash = "sha256:776ca0b748b4ad69c00bfe0fff38fa2d21c338e12c84aa9715ee0d473c422778"}, {file = "astroid-2.9.0.tar.gz", hash = "sha256:5939cf55de24b92bda00345d4d0659d01b3c7dafb5055165c330bc7c568ba273"}, ] -atomicwrites = [ - {file = "atomicwrites-1.3.0-py2.py3-none-any.whl", hash = "sha256:03472c30eb2c5d1ba9227e4c2ca66ab8287fbfbbda3888aa93dc2e28fc6811b4"}, - {file = "atomicwrites-1.3.0.tar.gz", hash = "sha256:75a9445bac02d8d058d5e1fe689654ba5a6556a1dfd8ce6ec55a0ed79866cfa6"}, -] attrs = [ {file = "attrs-19.3.0-py2.py3-none-any.whl", hash = "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c"}, {file = "attrs-19.3.0.tar.gz", hash = "sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72"}, ] black = [ - {file = "black-22.10.0-1fixedarch-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:5cc42ca67989e9c3cf859e84c2bf014f6633db63d1cbdf8fdb666dcd9e77e3fa"}, - {file = "black-22.10.0-1fixedarch-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:5d8f74030e67087b219b032aa33a919fae8806d49c867846bfacde57f43972ef"}, - {file = "black-22.10.0-1fixedarch-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:197df8509263b0b8614e1df1756b1dd41be6738eed2ba9e9769f3880c2b9d7b6"}, - {file = "black-22.10.0-1fixedarch-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:2644b5d63633702bc2c5f3754b1b475378fbbfb481f62319388235d0cd104c2d"}, - {file = "black-22.10.0-1fixedarch-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:e41a86c6c650bcecc6633ee3180d80a025db041a8e2398dcc059b3afa8382cd4"}, - {file = "black-22.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2039230db3c6c639bd84efe3292ec7b06e9214a2992cd9beb293d639c6402edb"}, - {file = "black-22.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ff67aec0a47c424bc99b71005202045dc09270da44a27848d534600ac64fc7"}, - {file = "black-22.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:819dc789f4498ecc91438a7de64427c73b45035e2e3680c92e18795a839ebb66"}, - {file = "black-22.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5b9b29da4f564ba8787c119f37d174f2b69cdfdf9015b7d8c5c16121ddc054ae"}, - {file = "black-22.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8b49776299fece66bffaafe357d929ca9451450f5466e997a7285ab0fe28e3b"}, - {file = "black-22.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:21199526696b8f09c3997e2b4db8d0b108d801a348414264d2eb8eb2532e540d"}, - {file = "black-22.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e464456d24e23d11fced2bc8c47ef66d471f845c7b7a42f3bd77bf3d1789650"}, - {file = "black-22.10.0-cp37-cp37m-win_amd64.whl", hash = "sha256:9311e99228ae10023300ecac05be5a296f60d2fd10fff31cf5c1fa4ca4b1988d"}, - {file = "black-22.10.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fba8a281e570adafb79f7755ac8721b6cf1bbf691186a287e990c7929c7692ff"}, - {file = "black-22.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:915ace4ff03fdfff953962fa672d44be269deb2eaf88499a0f8805221bc68c87"}, - {file = "black-22.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:444ebfb4e441254e87bad00c661fe32df9969b2bf224373a448d8aca2132b395"}, - {file = "black-22.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:974308c58d057a651d182208a484ce80a26dac0caef2895836a92dd6ebd725e0"}, - {file = "black-22.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72ef3925f30e12a184889aac03d77d031056860ccae8a1e519f6cbb742736383"}, - {file = "black-22.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:432247333090c8c5366e69627ccb363bc58514ae3e63f7fc75c54b1ea80fa7de"}, - {file = "black-22.10.0-py3-none-any.whl", hash = "sha256:c957b2b4ea88587b46cf49d1dc17681c1e672864fd7af32fc1e9664d572b3458"}, - {file = "black-22.10.0.tar.gz", hash = "sha256:f513588da599943e0cde4e32cc9879e825d58720d6557062d1098c5ad80080e1"}, + {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"}, + {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"}, + {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"}, + {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"}, + {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"}, + {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"}, + {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"}, + {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"}, + {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"}, + {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"}, + {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"}, + {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"}, ] click = [ {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, @@ -395,9 +376,13 @@ colorama = [ {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"}, {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, ] +exceptiongroup = [ + {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"}, + {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"}, +] graphviz = [ - {file = "graphviz-0.19.1-py3-none-any.whl", hash = "sha256:f34088c08be2ec16279dfa9c3b4ff3d1453c5c67597a33e2819b000e18d4c546"}, - {file = "graphviz-0.19.1.zip", hash = "sha256:09ed0cde452d015fe77c4845a210eb642f28d245f5bc250d4b97808cb8f49078"}, + {file = "graphviz-0.20.1-py3-none-any.whl", hash = "sha256:587c58a223b51611c0cf461132da386edd896a029524ca61a1462b880bf97977"}, + {file = "graphviz-0.20.1.zip", hash = "sha256:8c58f14adaa3b947daf26c19bc1e98c4e0702cdc31cf99153e6f06904d492bf8"}, ] importlib-metadata = [ {file = "importlib_metadata-1.5.0-py2.py3-none-any.whl", hash = "sha256:b97607a1a18a5100839aec1dc26a1ea17ee0d93b20b0f008d80a5a050afb200b"}, @@ -412,8 +397,8 @@ isort = [ {file = "isort-4.3.21.tar.gz", hash = "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1"}, ] jinja2 = [ - {file = "Jinja2-3.0.1-py3-none-any.whl", hash = "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4"}, - {file = "Jinja2-3.0.1.tar.gz", hash = "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"}, + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] lazy-object-proxy = [ {file = "lazy-object-proxy-1.4.3.tar.gz", hash = "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0"}, @@ -533,10 +518,6 @@ pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, ] -py = [ - {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, - {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, -] pylint = [ {file = "pylint-2.12.0-py3-none-any.whl", hash = "sha256:ba00afcb1550bc217bbcb0eb76c10cb8335f7417a3323bdd980c29fb5b59f8d2"}, {file = "pylint-2.12.0.tar.gz", hash = "sha256:245c87e5da54c35b623c21b35debf87d93b18bf9e0229515cc172d0b83d627cd"}, @@ -546,8 +527,8 @@ pyparsing = [ {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, ] pytest = [ - {file = "pytest-7.0.1-py3-none-any.whl", hash = "sha256:9ce3ff477af913ecf6321fe337b93a2c0dcf2a0a1439c43f5452112c1e4280db"}, - {file = "pytest-7.0.1.tar.gz", hash = "sha256:e30905a0c131d3d94b89624a1cc5afec3e0ba2fbdb151867d8e0ebd49850f171"}, + {file = "pytest-7.2.0-py3-none-any.whl", hash = "sha256:892f933d339f068883b6fd5a459f03d85bfcb355e4981e146d2c7616c21fef71"}, + {file = "pytest-7.2.0.tar.gz", hash = "sha256:c4014eb40e10f11f355ad4e3c2fb2c6c6d1919c73f3b5a433de4708202cade59"}, ] rope = [ {file = "rope-0.14.0-py2-none-any.whl", hash = "sha256:6b728fdc3e98a83446c27a91fc5d56808a004f8beab7a31ab1d7224cecc7d969"}, diff --git a/pyproject.toml b/pyproject.toml index 28c0e29f..4862fc13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "diagrams" -version = "0.23.1" +version = "0.23.2" description = "Diagram as Code" license = "MIT" authors = ["mingrammer "] @@ -11,17 +11,17 @@ include = ["resources/**/*"] [tool.poetry.dependencies] python = "^3.7" -graphviz = ">=0.13.2,<0.20.0" +graphviz = ">=0.13.2,<0.21.0" jinja2 = ">=2.10,<4.0" contextvars = { version = "^2.4", python = "~3.6" } typed-ast = "^1.5.4" [tool.poetry.dev-dependencies] -pytest = "^7.0" +pytest = "^7.2" pylint = "^2.7" rope = "^0.14.0" isort = "^4.3" -black = "^22.10.0" +black = "^22.12.0" [tool.black] line-length = 120 diff --git a/resources/onprem/network/yarp.png b/resources/onprem/network/yarp.png new file mode 100644 index 00000000..4078dd5c Binary files /dev/null and b/resources/onprem/network/yarp.png differ diff --git a/resources/onprem/registry/jfrog.png b/resources/onprem/registry/jfrog.png new file mode 100644 index 00000000..931bfd81 Binary files /dev/null and b/resources/onprem/registry/jfrog.png differ diff --git a/resources/programming/framework/flask.png b/resources/programming/framework/flask.png index 98fe1fdb..18c396a6 100644 Binary files a/resources/programming/framework/flask.png and b/resources/programming/framework/flask.png differ diff --git a/resources/programming/framework/svelte.png b/resources/programming/framework/svelte.png new file mode 100644 index 00000000..463cc473 Binary files /dev/null and b/resources/programming/framework/svelte.png differ diff --git a/tests/test_c4.py b/tests/test_c4.py index 25c85455..3877ec0f 100644 --- a/tests/test_c4.py +++ b/tests/test_c4.py @@ -10,7 +10,7 @@ from diagrams.c4 import Person, Container, Database, System, SystemBoundary, Rel class C4Test(unittest.TestCase): def setUp(self): - self.name = "diagram-" + "".join([random.choice(string.hexdigits) for n in range(7)]) + self.name = "diagram-" + "".join([random.choice(string.hexdigits) for n in range(7)]).lower() def tearDown(self): setdiagram(None) diff --git a/website/package-lock.json b/website/package-lock.json index b99f0576..9c1ef5e0 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -2875,9 +2875,9 @@ "dev": true }, "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true }, "decompress": { @@ -5426,13 +5426,10 @@ "dev": true }, "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true }, "jsonfile": { "version": "6.1.0", @@ -7278,9 +7275,9 @@ "dev": true }, "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true }, "query-string": { diff --git a/website/static/img/advanced_web_service_with_on-premise.png b/website/static/img/advanced_web_service_with_on-premise.png index 83298236..c2edf4d7 100644 Binary files a/website/static/img/advanced_web_service_with_on-premise.png and b/website/static/img/advanced_web_service_with_on-premise.png differ diff --git a/website/static/img/advanced_web_service_with_on-premise_colored.png b/website/static/img/advanced_web_service_with_on-premise_colored.png index f775cd50..d404d3c2 100644 Binary files a/website/static/img/advanced_web_service_with_on-premise_colored.png and b/website/static/img/advanced_web_service_with_on-premise_colored.png differ diff --git a/website/static/img/resources/elastic/agent/agent.png b/website/static/img/resources/elastic/agent/agent.png new file mode 100644 index 00000000..f2a90e0d Binary files /dev/null and b/website/static/img/resources/elastic/agent/agent.png differ diff --git a/website/static/img/resources/elastic/agent/endpoint.png b/website/static/img/resources/elastic/agent/endpoint.png new file mode 100644 index 00000000..4daf3ca3 Binary files /dev/null and b/website/static/img/resources/elastic/agent/endpoint.png differ diff --git a/website/static/img/resources/elastic/agent/fleet.png b/website/static/img/resources/elastic/agent/fleet.png new file mode 100644 index 00000000..55dd3686 Binary files /dev/null and b/website/static/img/resources/elastic/agent/fleet.png differ diff --git a/website/static/img/resources/elastic/agent/integrations.png b/website/static/img/resources/elastic/agent/integrations.png new file mode 100644 index 00000000..9bd75395 Binary files /dev/null and b/website/static/img/resources/elastic/agent/integrations.png differ diff --git a/website/static/img/resources/elastic/beats/apm.png b/website/static/img/resources/elastic/beats/apm.png new file mode 100644 index 00000000..fdb5796a Binary files /dev/null and b/website/static/img/resources/elastic/beats/apm.png differ diff --git a/website/static/img/resources/elastic/beats/auditbeat.png b/website/static/img/resources/elastic/beats/auditbeat.png new file mode 100644 index 00000000..4e41ae78 Binary files /dev/null and b/website/static/img/resources/elastic/beats/auditbeat.png differ diff --git a/website/static/img/resources/elastic/beats/filebeat.png b/website/static/img/resources/elastic/beats/filebeat.png new file mode 100644 index 00000000..778af3d3 Binary files /dev/null and b/website/static/img/resources/elastic/beats/filebeat.png differ diff --git a/website/static/img/resources/elastic/beats/functionbeat.png b/website/static/img/resources/elastic/beats/functionbeat.png new file mode 100644 index 00000000..080e9f46 Binary files /dev/null and b/website/static/img/resources/elastic/beats/functionbeat.png differ diff --git a/website/static/img/resources/elastic/beats/heartbeat.png b/website/static/img/resources/elastic/beats/heartbeat.png new file mode 100644 index 00000000..975daa7b Binary files /dev/null and b/website/static/img/resources/elastic/beats/heartbeat.png differ diff --git a/website/static/img/resources/elastic/beats/metricbeat.png b/website/static/img/resources/elastic/beats/metricbeat.png new file mode 100644 index 00000000..80082cd4 Binary files /dev/null and b/website/static/img/resources/elastic/beats/metricbeat.png differ diff --git a/website/static/img/resources/elastic/beats/packetbeat.png b/website/static/img/resources/elastic/beats/packetbeat.png new file mode 100644 index 00000000..9ede7e1e Binary files /dev/null and b/website/static/img/resources/elastic/beats/packetbeat.png differ diff --git a/website/static/img/resources/elastic/beats/winlogbeat.png b/website/static/img/resources/elastic/beats/winlogbeat.png new file mode 100644 index 00000000..70f12acb Binary files /dev/null and b/website/static/img/resources/elastic/beats/winlogbeat.png differ diff --git a/website/static/img/resources/elastic/elasticsearch/logstash-pipeline.png b/website/static/img/resources/elastic/elasticsearch/logstash-pipeline.png new file mode 100644 index 00000000..4a772456 Binary files /dev/null and b/website/static/img/resources/elastic/elasticsearch/logstash-pipeline.png differ diff --git a/website/static/img/resources/elastic/elasticsearch/map-services.png b/website/static/img/resources/elastic/elasticsearch/map-services.png new file mode 100644 index 00000000..774d0c3c Binary files /dev/null and b/website/static/img/resources/elastic/elasticsearch/map-services.png differ diff --git a/website/static/img/resources/elastic/elasticsearch/searchable-snapshots.png b/website/static/img/resources/elastic/elasticsearch/searchable-snapshots.png new file mode 100644 index 00000000..3fdd73d9 Binary files /dev/null and b/website/static/img/resources/elastic/elasticsearch/searchable-snapshots.png differ diff --git a/website/static/img/resources/elastic/elasticsearch/stack.png b/website/static/img/resources/elastic/elasticsearch/stack.png new file mode 100644 index 00000000..71e6651b Binary files /dev/null and b/website/static/img/resources/elastic/elasticsearch/stack.png differ diff --git a/website/static/img/resources/elastic/enterprisesearch/crawler.png b/website/static/img/resources/elastic/enterprisesearch/crawler.png new file mode 100644 index 00000000..555801d0 Binary files /dev/null and b/website/static/img/resources/elastic/enterprisesearch/crawler.png differ diff --git a/website/static/img/resources/elastic/observability/observability.png b/website/static/img/resources/elastic/observability/observability.png index 5844caa9..f4408894 100644 Binary files a/website/static/img/resources/elastic/observability/observability.png and b/website/static/img/resources/elastic/observability/observability.png differ diff --git a/website/static/img/resources/elastic/security/xdr.png b/website/static/img/resources/elastic/security/xdr.png new file mode 100644 index 00000000..972f1f16 Binary files /dev/null and b/website/static/img/resources/elastic/security/xdr.png differ diff --git a/website/static/img/resources/onprem/network/yarp.png b/website/static/img/resources/onprem/network/yarp.png new file mode 100644 index 00000000..4078dd5c Binary files /dev/null and b/website/static/img/resources/onprem/network/yarp.png differ diff --git a/website/static/img/resources/onprem/storage/portworx.png b/website/static/img/resources/onprem/storage/portworx.png new file mode 100644 index 00000000..7464ed04 Binary files /dev/null and b/website/static/img/resources/onprem/storage/portworx.png differ diff --git a/website/static/img/resources/programming/framework/flask.png b/website/static/img/resources/programming/framework/flask.png index 98fe1fdb..18c396a6 100644 Binary files a/website/static/img/resources/programming/framework/flask.png and b/website/static/img/resources/programming/framework/flask.png differ diff --git a/website/static/img/simple_web_service_with_db_cluster_diagram.png b/website/static/img/simple_web_service_with_db_cluster_diagram.png index 96a74505..e92681c7 100644 Binary files a/website/static/img/simple_web_service_with_db_cluster_diagram.png and b/website/static/img/simple_web_service_with_db_cluster_diagram.png differ diff --git a/website/yarn.lock b/website/yarn.lock index f9ea82cf..662d1acd 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -1847,8 +1847,8 @@ decamelize@^1.1.2: resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz" + version "0.2.2" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" decompress-response@^3.2.0, decompress-response@^3.3.0: version "3.3.0" @@ -3566,10 +3566,8 @@ json-stringify-safe@~5.0.1: resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" json5@^2.1.2: - version "2.2.0" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz" - dependencies: - minimist "^1.2.5" + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" jsonfile@^6.0.1: version "6.1.0" @@ -4768,13 +4766,13 @@ q@^1.1.2: version "1.5.1" resolved "https://registry.npmjs.org/q/-/q-1.5.1.tgz" -qs@6.7.0: +qs@6.7.0, qs@^6.4.0: version "6.7.0" resolved "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz" -qs@^6.4.0, qs@~6.5.2: - version "6.5.2" - resolved "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz" +qs@~6.5.2: + version "6.5.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" query-string@^5.0.1: version "5.1.1"