From a70c53ff49db6e1825ce1907a779128f7ba5da63 Mon Sep 17 00:00:00 2001 From: AlexGacon Date: Sun, 5 Feb 2023 18:17:55 +0100 Subject: [PATCH] Add information on how to add new provider --- CONTRIBUTING.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 90e28a1..fcddc82 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,6 +43,21 @@ Then just run the `./autogen.sh` to generate the added or updated node classes. [black]: https://pypi.org/project/black [inkscape]: https://inkscape.org/ko/release +### Add new provider + +To add a new provider to Diagrams, please follow the steps below in addition to the image intructions above: +- in `autogen.sh` add in the `providers` variable the new provider code +- in `config.py`: + - in the `providers` variable, add the new provider code + - in the `FILE_PREFIXES` variable, add a new entry with your new provider code. And eventually a file prefix + - Optionnaly, update the `UPPER_WORDS` variable to a new entry with your new provider code. + - in the `ALIASES` variable, add a new entry with your new provider code. See below on how to add new aliases. +- in `scripts/resource.py`: + - add a function `cleaner_XXX` (replace XXX by your provider name). For the implementation look at the existing functions + - in the `cleaners` variable, add an entry with your new provider code and the function defined above +- in `sidebars.json`, update the `Nodes` array to add the reference of the new provider +- in the `diagrams` folder, add a new file `__init__.py` for the new provider. For the content look at the existing providers + ### Update Aliases Some node classes have alias. For example, `aws.compute.ECS` class is an alias