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

draw.io build make target added #205

Merged
merged 14 commits into from
Oct 2, 2023
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
* text=auto
*.png binary
*.jpg binary
*.drawio binary
*.py text eol=lf
*.sh text eol=lf
*.sh text eol=lf
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ build/
docs/source/apiref
docs/source/release_notes.rst
docs/source/tutorials
docs/source/_static/drawio
docs/source/diagrams/*/export
pseusys marked this conversation as resolved.
Show resolved Hide resolved
*__pycache__*
*.idea/*
.idea/*
Expand Down
5 changes: 5 additions & 0 deletions dff/pipeline/pipeline/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

Overall, the actor acts as a bridge between the user's input and the dialog graph,
making sure that the conversation follows the expected flow and providing a personalized experience to the user.

Below you can see a diagram of user request processing with Actor.
Both request and result are saved to :py:class:`.Context`.
pseusys marked this conversation as resolved.
Show resolved Hide resolved

.. figure:: /_static/drawio/dfe/user_actor.png
"""
import logging
from typing import Union, Callable, Optional, Dict, List, Any, ForwardRef
Expand Down
1 change: 1 addition & 0 deletions docs/source/diagrams/dfe/user_actor.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile scale="20" border="0"><diagram id="JaFah7PjJ86j10p3dxxR" name="Page-1">zVhNk6IwEP01XrZqtwhf4nUcZ/ayJw87c4zQAjWRuCEo7q/fIB0BwRFX0blQ6Zfv1/26U4ys6Sp/FXQd/eIBsJFpBPnIeh6ZpuNa6lsAuxIgrmOXSCjiALEKmMd/AUED0SwOIG0MlJwzGa+boM+TBHzZwKgQfNsctuSsueuahtAC5j5lbfR3HMioRG1iVfhPiMMId3Y87FhRPRYvkkY04NsaZM1G1lRwLsvWKp8CK7jTtJTzXk70Hs4lIJF9JozxGHKnrwaBuimaXMiIhzyhbFahT5FcMdVJVBPyWL6ptvHDQeu9sLD9nNeNnTYSKXZvdeO9WqEwq2l7S89LP0D6EW7sZ2IDARrLmLEpZ1zsb2AtPR98v5ghBf+AWs/Cc2ynWKtNEzKX8kz4yISJgUVFCNqRJVRwVJuG1L4CX4E6sRoggFEZb5rRQjHowsO4yjGqgb7p9hOeZUNZhouOTJepUz0tVCMsGlkKQoNquQPe9jBjSieFJ7dRLGG+pvsbb5VUm96l6boUzzLOC7KPiQ4oeMtOol3fg8Xy2GknWd+AkJB/yij2TsaoJMwc310blbStdEgIZpOopsEDeI0bJv8hl0aoNvg4KyTST0jkMiEdeRFI4MC4y4sTd2xRt69cdPKr68V9lF60s7+GpwZivINw7YT7M26dz1ALVdWKevRSbOVLfu905YAX2F20e+bCct0B0hUxbeeR+cobWgWkpoFKEb1UcKsy7XSogDxKBc55FQj4k0Eqe8W+4FkSHJxxJv4v5/fm4U4soxnu43FHuBtGO9z1g/iqpG+0CLx10r8g3Kt3blWRD6Xi/uXZbcvEfJRK3D4qSdc8UWl/aJn04Hd4mdhdVWEwmZhf6W10SibGZTK5VTXRpaOuk4e9qfRhPhPKN58nKu4GqCcNL9+Q7oueT+ZRPSEdQjE7hGLfQig93rQPYf+amnAN+44xHPvKrH577ftq/w6t2T8=</diagram></mxfile>
1 change: 1 addition & 0 deletions docs/source/diagrams/dff/addons.drawio
pseusys marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile scale="20" border="0"><diagram id="JaFah7PjJ86j10p3dxxR" name="Page-1">5Z1Ld5w2FIB/zSztw1PAMnXStIt240WTVY8GNEANaAIazzi/vhIjGEBy42CQgK4MguHx6frqviR29kN++VzCY/IHjlC2s4zosrM/7izL9A2L/mEtL9cWx/evDXGZRvykW8Nj+h3xRoO3ntIIVb0TCcYZSY/9xhAXB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SlaKZGvqMLKRe5ArKUr76SHtMYvWTkevCaprZiv/Z5ftaSuK6DuO5hDwRaTQkxFVd/i2W32cIJV6X7bBrbcvFk0eFA37Bnii5eCSvITul+bWjdAiz4GipXbmlHhQ7i5vNN1REWPbLg24l9lK0O3d6d+ZN8oKcUuMxhdjuh+exTzD5911yOPsr1iqBR79Pd6JmtjPnKbdRKx9xhbX8QLVRaiWeaomdanoqpp0ktYZSWLSg4H9Zt5RilHzhpRGf2YYTu3j4eWR/rfIHT/vQv</diagram></mxfile>
1 change: 1 addition & 0 deletions docs/source/diagrams/dff/framework.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile scale="20" border="0"><diagram id="JaFah7PjJ86j10p3dxxR" name="Page-1">7VnZjts2FP0aA+1DAi2WLD/Omg6aoEENpM0jLV3JxFCkSlFe8vW9lKjNkmMPKjfTNA/jIS/3cw55eamZe5fu30mSbT6ICNjMsaL9zL2fOY7tBkv8py2HyjIPgsqQSBqZSq1hRb+AMVrGWtAI8l5FJQRTNOsbQ8E5hKpnI1KKXb9aLFh/1IwkMDCsQsKG1j9opDZmFbbb2n8BmmzMyF5gClJS1zULyTckEruOyX2YuXdSCFWl0v0dMI1dDUvV7vFEaTMvCVxd1GBetdgSVpi1zRyfYdvbPCMc04lO31PCRFLSgXxq4iCnCYeoBB5/gJM1goMLCjEpqXgTSboFXnGwBZkTRQUneuybJ91gn4GkwEOox8NJdoc0+KhDjbkUBY9Az9vC4t2GKlhlJNSlO5wV2jYqZZizMRlTxu4EE7Js60YEgjjUi1JSPEOnxA8DWMe65BlUuDHNhzAaZHElCvYdk4H1HYgUlDxgFVPqzw3FRuJ+YPK7VjB2bdt0xGLX2iBGpEnTd0skJgyXJ3j1RnidEFCwIw8WY4Au/YVL/CsAeoSn6w/x9PwxPN1gAjz96+IZByGEowJdB97cs66Pp2cvL8SzOUj/CZ6L6+KJ6gyi+RiegbN2/X9Bn2P7/QSeU+z34DyeEKEPM1kuOPQBxIXLw58a7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aw==</diagram></mxfile>
1 change: 1 addition & 0 deletions docs/source/diagrams/dff/infrastructure.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile scale="20" border="0"><diagram id="JaFah7PjJ86j10p3dxxR" name="Page-1">7Vpfc6MqHP00eeyOiqh5bJN27525O7MzfdjtI1GizBrJIPnT/fQLEVTENmkSk71tnyI/AeGc8zuAZgQmi+1XhpbZN5rgfOQ5yXYEpiPPcyPHEz8y8lxF/CiqAikjiarUBB7Jb6yCjoquSIJLoyKnNOdkaQZjWhQ45kYMMUY3ZrU5zc2nLlGKrcBjjHI7+oMkPFOzcEET/weTNFNPhpG6sUC6rppImaGEblohcD8CE0Ypr64W2wnOJXYalqrdwwt363ExXPBDGgBFRMmf9dxwIqaqipTxjKa0QPl9E70rf2Eey3m4opDxRa4u8Zbwn63rJ3HtfIGqNJXsO7rwrAsFZ88/24VWK1lsmu1Kul28YmucqIeVHDF+K3kVgThHZUliHX4guR6fDY7Cq6QrFmtqQ6UnxFKsqgFVT0LTaqgg/YrpAouxiQoM54iTtakSpMSW1vVUUzFi9NyqsKSk4GWr5+8yICqovPHHSjU6a0KDXHFR9ahLraE1oZ0AXhCDUuka5Ss1hQktON7KMfw77VXKf2gmctuQAcpJWkgiBMyYicAaM05E8tyqGwuSJDshMVyS32i260+SqgAQncO7EZz2UqYVKzvF21FPtqsOjYwyWFKtbpwvjh96BqQ3qvg2Ii2mOg3ofF4KLZlcvZUd6B+Rqj3Z6RyTne5fnJ1+eO7sNFh6jZLwCEoMbPr4qTl5at3p5+dAaBuTbZh7Mojrp/FoSmA0iGFaeQbcwEjfwHfMLqpBqVYnpZ+eZsscpwTlNBWxh1wQ4DmPmK2JgKWrCUZXRVJTvskIx49LtMNvI/ZHpgyMxbXrnJwuX6PF8sQXvc9zzKUEqKXE2TTbmXrZy1pbmbrhKXmjO25jiYRvo/J/AR4MOuD5NniuXqvb4LnwHOANYTqX2LId5CYg6tl+ja9l8Ho0LaGOvCAX47qbiYtUXsiNURUSvdXR03Q8F949oTllu7YAuwnE4c7YGf2FW3fGQQhQ0FX+OTQedTQe2Rr3YZ8/nAH18X7U643pwNAL4KPE74M+8mYgGAL6AMK90AcDQa+d7H2ai6/fFbR3j961zMW3V8EPai6+ezlz0Xx/msuL0A9mLuBdm4vfYy7waubif5qLRuKC5gI/zWUP9IOZS7Af+hmV7w5kl+JZMRd4HEKCeA5Zlng/AahcVh8b5mQrSfsLGKl9QDPiAJuR0GZEx05ixH5jclsUlCMBfHma1C9zzr9xuwf9sY1e71uS+vR/En724RNp/AaHryPdeRTjOO6T7iyCPnx1kXwL4H7Huz0b8HEP3uAccNunziUtpWFcDfUDVs9zoA66n5UuB7p+IfaRNA5NuGGPJQ8Gt33k/CAa7xgL9C8Iun3ifOca95zQdJSeN1iDoW1/xP4YEgfXtHH73PMNlyUuUizQdibVh/kryH2Og365J+F45pxL7uHYNBfvMLl3P1Yehbx97JnevX/IgeeZYu95jTUY5Pa+XIpd/mVM4J4Jm5H/dhsY9QSVWd2dLHxHnGNW7CKe458H5u4BKIA2zK6G/kRTEcXmf2/VB/rmz4Pg/g8=</diagram></mxfile>
1 change: 1 addition & 0 deletions docs/source/diagrams/dialog_graph/dialog.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile scale="20" border="0"><diagram id="rbImLL0oNeTYmnzgyJK0" name="Page-1">5ZpNb6MwEIZ/TY4bGYwJObZJ272stFIP2z1VDhiwSnBknK/99WuCHSBm81ERyia5xDOMwZ6ZB0evMoCT+eaF40X8gwUkGdgg2AzgdGDbFvTG8iv3bAuP43mFI+I0UEGl45X+IcoJlHdJA5LVAgVjiaCLutNnaUp8UfNhztm6HhaypP7UBY6I4Xj1cWJ6f9FAxGoXFiz93wmNYvVk5KkLc6xj1UayGAdsXXHBpwGccMZEMZpvJiTJc6fTUsx7/sfV/bo4ScU5E6AqRCa2em8kkFtVJuMiZhFLcfJUeh/9JV+R/AaWNGIxT9SQbKh4q4x/yzEYImVN8+oDbWy1kQq+fasalVm5WU7bWXpeyFIxYQnju0VDsPvsooKHvMDS7Sc4y6hfOJ9popeZCc4+yMFk182vfBDhxyrMTKXKbsaW3FfJclQdBeYR0dVWvjyRlYmqAC+EzYnciQzgJMGCruo9hVVrRvu4snxyoCrYXE29mhVOluquU4oTFknfUgjCcepLbA4rztkyDfYFXcdUkNcF3m1xLfmtF3lFuKCShIeERqn0CZYHhDK9lYwGiHiB05Rrz57BC3KdP41sjmZRX1V7V28Ua6TsdcmnDZQvrrBpeaCFxFtGUr8II+syjD7R8bbZ8Y7TdsfvpkqQ8bYSsGA0FVnlzj9zR9kC+/qqHtA98XxuvAMOil6soGyB/VbO6wrbwFEmV9JDFzgV70BT+Q6M7rkIyUP4MPFCvwk+1/fILLwCfMiWnVZLJTDxs2xk4me3QR+8An3gM/RdeIh9gj6ngT63F/TBozCdDB+1zJ5zlD3rltmDXbKH7ufkcxvY83rBnnGSjS47+SBomT73zJPP/N3039Pndknf6H5OPq+BvnEv6INHYToZDltmzzvz5LtB9sZdsjc28jwcDm8up9DuMKdaOmkSMCRDRGF4e+oFtJxa1ruVL9D9yBeoQb5A/ZAvEKj3wCn5wohvWb7QqarAWDD4Lr7Zrb7nwpC4fuN7LhiNZ+D8Sl8AHHK/UrJA9yNZoAbJAvVEsoBHCTod37JogUzRYk9cu7/WQs8nzcTNPOSgjojrUqhA9yNUoAahAvVDqDDOrBNCxWF820IFMoUKTdwNnnBdShPofqQJ1CBNoJ5IE/AoP6fjWxYnkClOlLw93uIZ16Ukga4vSfTiRXZNTUKa5d9vig4v/8MEn/4C</diagram></mxfile>
22 changes: 21 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.ONESHELL:

SHELL = /bin/bash

PYTHON = python3
Expand All @@ -8,6 +10,7 @@ TEST_COVERAGE_THRESHOLD=95
TEST_ALLOW_SKIP=all # for more info, see tests/conftest.py

PATH := $(VENV_PATH)/bin:$(PATH)
PWD := $(shell pwd)

help:
@echo "Thanks for your interest in Dialog Flow Framework!"
Expand Down Expand Up @@ -62,7 +65,22 @@ test: venv
test_all: venv wait_db test lint
.PHONY: test_all

doc: venv clean_docs
build_drawio:
docker run --rm --name="drawio-convert" -v $(PWD)/docs/source/diagrams:/data rlespinasse/drawio-export -f png --on-changes --remove-page-suffix
docker run --rm --name="drawio-reperm" -v $(PWD)/docs/source/diagrams:/data --entrypoint chown rlespinasse/drawio-export -R "$(shell id -u):$(shell id -g)" /data
pseusys marked this conversation as resolved.
Show resolved Hide resolved
for folder in docs/source/diagrams/*; do
foldername=`basename $${folder}`
for file in $${folder}/*; do
filename=`basename $${file}`
if [[ -d $${file} && $${filename} == "export" ]]; then
mkdir -p docs/source/_static/drawio/$${foldername}
cp -r $${file}/* docs/source/_static/drawio/$${foldername}
fi
done
done
.PHONY: build_drawio

doc: venv clean_docs build_drawio
python3 docs/source/utils/patching.py
sphinx-apidoc -e -E -f -o docs/source/apiref dff
sphinx-build -M clean docs/source docs/build
Expand Down Expand Up @@ -91,6 +109,8 @@ clean_docs:
rm -rf docs/tutorials
rm -rf docs/source/apiref
rm -rf docs/source/tutorials
rm -rf docs/source/_static/drawio
rm -rf docs/source/diagrams/**/export
pseusys marked this conversation as resolved.
Show resolved Hide resolved
.PHONY: clean_docs

clean: clean_docs
Expand Down