Skip to content

Commit

Permalink
update (model): Jupyter with PlantUML - properties
Browse files Browse the repository at this point in the history
  • Loading branch information
santanche committed Sep 28, 2024
1 parent 05b734e commit 7ef108b
Showing 1 changed file with 50 additions and 7 deletions.
57 changes: 50 additions & 7 deletions model/basics/step-by-step.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"id": "27ce02ea-d456-4eb3-860c-64eb8665e250",
"metadata": {},
"outputs": [],
Expand All @@ -20,15 +20,15 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 2,
"id": "4bc559a1-f44b-4ed8-a633-33f5ca1273b6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Writing output for /home/santanche/git/component2learn/model/basics/2eb61326-d47f-4210-9dc0-f7f37caa4d3f.uml to 2eb61326-d47f-4210-9dc0-f7f37caa4d3f.svg\n"
"Writing output for /home/santanche/git/component2learn/model/basics/b7711b3c-95c4-489f-9158-45d1882653c3.uml to b7711b3c-95c4-489f-9158-45d1882653c3.svg\n"
]
},
{
Expand All @@ -40,7 +40,7 @@
"<IPython.core.display.SVG object>"
]
},
"execution_count": 5,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -96,11 +96,54 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"id": "1c4ebaef-1c49-4c40-b3dd-e1164675431f",
"metadata": {},
"outputs": [],
"source": []
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Writing output for /home/santanche/git/component2learn/model/basics/93f7d0e0-a4d3-46bd-9861-2fa543908ba8.uml to 93f7d0e0-a4d3-46bd-9861-2fa543908ba8.svg\n"
]
},
{
"data": {
"image/svg+xml": [
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" contentStyleType=\"text/css\" height=\"155px\" preserveAspectRatio=\"none\" style=\"width:297px;height:155px;background:#FFFFFF;\" version=\"1.1\" viewBox=\"0 0 297 155\" width=\"297px\" zoomAndPan=\"magnify\"><defs/><g><!--cluster Table--><g id=\"cluster_Table\"><rect fill=\"none\" height=\"121\" rx=\"2.5\" ry=\"2.5\" style=\"stroke:#181818;stroke-width:1.0;\" width=\"73\" x=\"7\" y=\"7\"/><rect fill=\"none\" height=\"10\" style=\"stroke:#181818;stroke-width:1.0;\" width=\"15\" x=\"60\" y=\"12\"/><rect fill=\"none\" height=\"2\" style=\"stroke:#181818;stroke-width:1.0;\" width=\"4\" x=\"58\" y=\"14\"/><rect fill=\"none\" height=\"2\" style=\"stroke:#181818;stroke-width:1.0;\" width=\"4\" x=\"58\" y=\"18\"/><text fill=\"#000000\" font-family=\"sans-serif\" font-size=\"14\" font-weight=\"bold\" lengthAdjust=\"spacing\" textLength=\"43.3125\" x=\"21.8438\" y=\"32.9951\">Table</text></g><!--cluster ScatterPlot--><g id=\"cluster_ScatterPlot\"><rect fill=\"none\" height=\"121\" rx=\"2.5\" ry=\"2.5\" style=\"stroke:#181818;stroke-width:1.0;\" width=\"130\" x=\"161\" y=\"7\"/><rect fill=\"none\" height=\"10\" style=\"stroke:#181818;stroke-width:1.0;\" width=\"15\" x=\"271\" y=\"12\"/><rect fill=\"none\" height=\"2\" style=\"stroke:#181818;stroke-width:1.0;\" width=\"4\" x=\"269\" y=\"14\"/><rect fill=\"none\" height=\"2\" style=\"stroke:#181818;stroke-width:1.0;\" width=\"4\" x=\"269\" y=\"18\"/><text fill=\"#000000\" font-family=\"sans-serif\" font-size=\"14\" font-weight=\"bold\" lengthAdjust=\"spacing\" textLength=\"88.9834\" x=\"181.5083\" y=\"32.9951\">ScatterPlot</text></g><text fill=\"#000000\" font-family=\"sans-serif\" font-size=\"14\" lengthAdjust=\"spacing\" textLength=\"60.1494\" x=\"31.9253\" y=\"146.9951\">file_path</text><rect fill=\"#F1F1F1\" height=\"12\" style=\"stroke:#181818;stroke-width:1.5;\" width=\"12\" x=\"56\" y=\"122\"/><text fill=\"#000000\" font-family=\"sans-serif\" font-size=\"14\" lengthAdjust=\"spacing\" textLength=\"38.4932\" x=\"159.7534\" y=\"146.9951\">xfield</text><rect fill=\"#F1F1F1\" height=\"12\" style=\"stroke:#181818;stroke-width:1.5;\" width=\"12\" x=\"173\" y=\"122\"/><text fill=\"#000000\" font-family=\"sans-serif\" font-size=\"14\" lengthAdjust=\"spacing\" textLength=\"38.4932\" x=\"206.7534\" y=\"146.9951\">yfield</text><rect fill=\"#F1F1F1\" height=\"12\" style=\"stroke:#181818;stroke-width:1.5;\" width=\"12\" x=\"220\" y=\"122\"/><text fill=\"#000000\" font-family=\"sans-serif\" font-size=\"14\" lengthAdjust=\"spacing\" textLength=\"27.3711\" x=\"259.3145\" y=\"146.9951\">title</text><rect fill=\"#F1F1F1\" height=\"12\" style=\"stroke:#181818;stroke-width:1.5;\" width=\"12\" x=\"267\" y=\"122\"/><!--entity DataFlow--><g id=\"elem_DataFlow\"><ellipse cx=\"140\" cy=\"40.5\" fill=\"#F1F1F1\" rx=\"8\" ry=\"8\" style=\"stroke:#181818;stroke-width:0.5;\"/><text fill=\"#000000\" font-family=\"sans-serif\" font-size=\"14\" lengthAdjust=\"spacing\" textLength=\"65.3857\" x=\"107.3071\" y=\"70.4951\">DataFlow</text></g><!--link Table to DataFlow--><g id=\"link_Table_DataFlow\"><path d=\"M90.93,40.5 C104.22,40.5 107.51,40.5 120.8,40.5 \" fill=\"none\" id=\"Table-to-DataFlow\" style=\"stroke:#181818;stroke-width:1.0;\"/><path d=\"M127.7218,32.0428 A9,9 0 0 0 127.7218 48.9572\" fill=\"none\" style=\"stroke:#181818;stroke-width:1.5;\"/></g><!--link DataFlow to ScatterPlot--><g id=\"link_DataFlow_ScatterPlot\"><path d=\"M149.47,40.5 C152.7475,40.5 156.025,40.5 159.3025,40.5 C159.7122,40.5 160.1219,40.5 160.5316,40.5 C160.634,40.5 160.7364,40.5 160.8388,40.5 C160.89,40.5 160.9413,40.5 160.9925,40.5 \" fill=\"none\" id=\"DataFlow-ScatterPlot\" style=\"stroke:#181818;stroke-width:1.0;\"/></g><!--SRC=[ROt12i8m44Jl-OejzD0S-XVYMT1RAR8cMmniio5igKNyTsj12UfjUCoygL8MHtxA1FKQ4sLTcZhYIDO09Cagay86J4NHV-h6E1cJH8eA9xmmmNqTG64P0jCveLwjUPXkw_JGDh13nJtBN1gE3bKf7rZqntCR0h6tNtJvIpKeq-llVG8jT8MyVm80]--></g></svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%plantuml\n",
"\n",
"@startuml\n",
"\n",
"!procedure $property($name)\n",
" portout $name\n",
"!endprocedure\n",
"\n",
"component Table {\n",
" $property(file_path)\n",
"}\n",
"[Table] -( DataFlow\n",
"\n",
"component ScatterPlot {\n",
" $property(xfield)\n",
" $property(yfield)\n",
" $property(title)\n",
"}\n",
"DataFlow - [ScatterPlot]\n",
"\n",
"@enduml"
]
}
],
"metadata": {
Expand Down

0 comments on commit 7ef108b

Please sign in to comment.