MocodoScripts/mocodo_notebook.ipynb
Djalim Simaila 604d0b305d feat(mcd_mocodo.py): add 'licence_medicale' entity and 'posséder2' relationship
🐛 fix(mcd_mocodo.py): add date attributes to 'utiliser' and 'créer' relationships for better tracking of usage and creation events
2024-03-29 10:15:14 +01:00

1445 lines
94 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Mocodo 4.2.4 loaded.\n"
]
}
],
"source": [
"%reload_ext mocodo\n",
"from mocodo.magic import mocodo\n",
"import mcd_mocodo as mcd"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"def generer_mcd(domaine:str, ga:bool=False,seed:float=1):\n",
" \"\"\"\n",
" Genère un graphe MCD à partir d'un domaine exprimé en MCD mocodo\n",
"\n",
" :param domaine: Le domaine exprimé en MCD mocodo\n",
" :type domaine: str\n",
" :param ga: Utiliser l'algorithme génétique pour arranger les entités, par défaut False\n",
" :type ga: bool, optional\n",
" :param seed: La graine pour le réarangement des entités, par défaut 1\n",
" :type seed: float, optional\n",
"\n",
" \"\"\"\n",
" return mocodo(f\"\"\"\n",
" %mocodo --colors ocean -t arrange{\":algo=ga\" if ga else \"\"} --seed {seed} --detect_overlaps --select mcd\n",
" {domaine}\n",
" \"\"\")\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1217\" height=\"735\" viewBox=\"0 0 1217 735\">\n",
"<rect x=\"0\" y=\"0\" width=\"1217\" height=\"735\" fill=\"none\" stroke=\"none\" stroke-width=\"0\"/>\n",
"\n",
"<!-- Association POSSEDER2 -->\n",
"<g>\n",
"\t<line x1=\"133\" y1=\"53\" x2=\"133\" y2=\"148\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"361\" y1=\"148\" x2=\"133\" y2=\"148\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"133\" y1=\"359\" x2=\"133\" y2=\"148\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M160 122 a14 14 90 0 1 14 14 V148 h-82 V136 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M174 148 v12 a14 14 90 0 1 -14 14 H106 a14 14 90 0 1 -14 -14 V148 H82\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"92\" y=\"122\" width=\"82\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"92\" y1=\"148\" x2=\"174\" y2=\"148\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"99\" y=\"140.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">posséder</text>\n",
"\t</g>\n",
"\t<text x=\"138\" y=\"113\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,1</text>\n",
"\t<text x=\"235\" y=\"164\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"138\" y=\"244\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association CREER -->\n",
"<g>\n",
"\t<line x1=\"554\" y1=\"359\" x2=\"554\" y2=\"148\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"361\" y1=\"148\" x2=\"554\" y2=\"148\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M602 122 a14 14 90 0 1 14 14 V148 h-124 V136 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M616 148 v12 a14 14 90 0 1 -14 14 H506 a14 14 90 0 1 -14 -14 V148 H124\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"492\" y=\"122\" width=\"124\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"492\" y1=\"148\" x2=\"616\" y2=\"148\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"533\" y=\"140.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">créer</text>\n",
"\t\t<text x=\"499\" y=\"166.6\" fill=\"#607734\" font-family=\"Courier New\" font-size=\"14\">date_creation</text>\n",
"\t</g>\n",
"\t<text x=\"526\" y=\"235\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"464\" y=\"164\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association POSER1 -->\n",
"<g>\n",
"\t<line x1=\"895\" y1=\"148\" x2=\"714\" y2=\"148\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"554\" y1=\"359\" x2=\"714\" y2=\"148\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M729 122 a14 14 90 0 1 14 14 V148 h-58 V136 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M743 148 v12 a14 14 90 0 1 -14 14 H699 a14 14 90 0 1 -14 -14 V148 H58\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"685\" y=\"122\" width=\"58\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"685\" y1=\"148\" x2=\"743\" y2=\"148\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"693\" y=\"140.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">poser</text>\n",
"\t</g>\n",
"\t<text x=\"802\" y=\"164\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"\t<text x=\"645\" y=\"255.88\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association POSER -->\n",
"<g>\n",
"\t<line x1=\"895\" y1=\"148\" x2=\"1076\" y2=\"148\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"1173\" y1=\"148\" x2=\"1076\" y2=\"148\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M1091 122 a14 14 90 0 1 14 14 V148 h-58 V136 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M1105 148 v12 a14 14 90 0 1 -14 14 H1061 a14 14 90 0 1 -14 -14 V148 H58\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"1047\" y=\"122\" width=\"58\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"1047\" y1=\"148\" x2=\"1105\" y2=\"148\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"1055\" y=\"140.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">poser</text>\n",
"\t</g>\n",
"\t<text x=\"965\" y=\"164\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"\t<text x=\"1110\" y=\"140\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association INVITER -->\n",
"<g>\n",
"\t<path d=\"M554 359 C481.67 391 417.33 391 361 359\" fill=\"none\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<path d=\"M554 359 C481.67 327 417.33 327 361 359\" fill=\"none\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"361\" y1=\"148\" x2=\"361\" y2=\"359\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"133\" y1=\"359\" x2=\"361\" y2=\"359\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"361\" y1=\"525\" x2=\"361\" y2=\"359\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M418 324 a14 14 90 0 1 14 14 V350 h-142 V338 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M432 350 v30 a14 14 90 0 1 -14 14 H304 a14 14 90 0 1 -14 -14 V350 H142\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"290\" y=\"324\" width=\"142\" height=\"70\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"290\" y1=\"350\" x2=\"432\" y2=\"350\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"331\" y=\"342.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">inviter</text>\n",
"\t\t<text x=\"297\" y=\"368.6\" fill=\"#607734\" font-family=\"Courier New\" font-size=\"14\">date invitation</text>\n",
"\t</g>\n",
"\t<text x=\"440\" y=\"374\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"440\" y=\"352\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"366\" y=\"235\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"262\" y=\"375\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"366\" y=\"482\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association SIGNALER1 -->\n",
"<g>\n",
"\t<line x1=\"895\" y1=\"359\" x2=\"714\" y2=\"359\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"554\" y1=\"359\" x2=\"714\" y2=\"359\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M741 333 a14 14 90 0 1 14 14 V359 h-82 V347 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M755 359 v12 a14 14 90 0 1 -14 14 H687 a14 14 90 0 1 -14 -14 V359 H82\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"673\" y=\"333\" width=\"82\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"673\" y1=\"359\" x2=\"755\" y2=\"359\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"680\" y=\"351.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">signaler</text>\n",
"\t</g>\n",
"\t<text x=\"760\" y=\"375\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"\t<text x=\"645\" y=\"375\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association SIGNALER -->\n",
"<g>\n",
"\t<line x1=\"895\" y1=\"359\" x2=\"1076\" y2=\"359\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"1173\" y1=\"148\" x2=\"1076\" y2=\"359\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M1103 333 a14 14 90 0 1 14 14 V359 h-82 V347 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M1117 359 v12 a14 14 90 0 1 -14 14 H1049 a14 14 90 0 1 -14 -14 V359 H82\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"1035\" y=\"333\" width=\"82\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"1035\" y1=\"359\" x2=\"1117\" y2=\"359\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"1042\" y=\"351.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">signaler</text>\n",
"\t</g>\n",
"\t<text x=\"1007\" y=\"375\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"\t<text x=\"1158.31\" y=\"199\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association ASSIGNER -->\n",
"<g>\n",
"\t<line x1=\"133\" y1=\"664\" x2=\"133\" y2=\"525\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"133\" y1=\"359\" x2=\"133\" y2=\"525\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M160 499 a14 14 90 0 1 14 14 V525 h-82 V513 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M174 525 v12 a14 14 90 0 1 -14 14 H106 a14 14 90 0 1 -14 -14 V525 H82\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"92\" y=\"499\" width=\"82\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"92\" y1=\"525\" x2=\"174\" y2=\"525\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"99\" y=\"517.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">assigner</text>\n",
"\t</g>\n",
"\t<text x=\"138\" y=\"603\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"\t<text x=\"138\" y=\"482\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association UTILISER -->\n",
"<g>\n",
"\t<line x1=\"554\" y1=\"359\" x2=\"554\" y2=\"525\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"361\" y1=\"525\" x2=\"554\" y2=\"525\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M615 499 a14 14 90 0 1 14 14 V525 h-150 V513 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M629 525 v12 a14 14 90 0 1 -14 14 H493 a14 14 90 0 1 -14 -14 V525 H150\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"479\" y=\"499\" width=\"150\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"479\" y1=\"525\" x2=\"629\" y2=\"525\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"520\" y=\"517.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">utiliser</text>\n",
"\t\t<text x=\"486\" y=\"543.6\" fill=\"#607734\" font-family=\"Courier New\" font-size=\"14\">date_utilisation</text>\n",
"\t</g>\n",
"\t<text x=\"526\" y=\"491\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,1</text>\n",
"\t<text x=\"439\" y=\"517\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association REPONDRE -->\n",
"<g>\n",
"\t<line x1=\"554\" y1=\"359\" x2=\"714\" y2=\"525\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"895\" y1=\"525\" x2=\"714\" y2=\"525\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M741 499 a14 14 90 0 1 14 14 V525 h-82 V513 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M755 525 v12 a14 14 90 0 1 -14 14 H687 a14 14 90 0 1 -14 -14 V525 H82\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"673\" y=\"499\" width=\"82\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"673\" y1=\"525\" x2=\"755\" y2=\"525\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"680\" y=\"517.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">repondre</text>\n",
"\t</g>\n",
"\t<text x=\"645\" y=\"447.11\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,1</text>\n",
"\t<text x=\"769\" y=\"541\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association ACHETER -->\n",
"<g>\n",
"\t<line x1=\"554\" y1=\"359\" x2=\"714\" y2=\"664\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"895\" y1=\"664\" x2=\"714\" y2=\"664\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"361\" y1=\"525\" x2=\"714\" y2=\"664\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"133\" y1=\"664\" x2=\"714\" y2=\"664\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M758 638 a14 14 90 0 1 14 14 V664 h-116 V652 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M772 664 v12 a14 14 90 0 1 -14 14 H670 a14 14 90 0 1 -14 -14 V664 H116\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"656\" y=\"638\" width=\"116\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"656\" y1=\"664\" x2=\"772\" y2=\"664\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"684\" y=\"656.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">acheter</text>\n",
"\t\t<text x=\"663\" y=\"682.6\" fill=\"#607734\" font-family=\"Courier New\" font-size=\"14\">date dachat</text>\n",
"\t</g>\n",
"\t<text x=\"590.95\" y=\"491\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"794\" y=\"680\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"439\" y=\"548.83\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"203\" y=\"680\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Entity LICENCE_MEDICALE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"60\" y=\"9\" width=\"146\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"60\" y=\"35\" width=\"146\" height=\"62\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"60\" y=\"9\" width=\"146\" height=\"88\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"60\" y1=\"35\" x2=\"206\" y2=\"35\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"65\" y=\"27.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">licence_medicale</text>\n",
"\t<text x=\"65\" y=\"53.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">clé_medicale</text>\n",
"\t<line x1=\"65\" y1=\"56\" x2=\"167\" y2=\"56\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"65\" y=\"71.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_utilisation</text>\n",
"</g>\n",
"\n",
"<!-- Entity APPRENANT -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"263\" y=\"77\" width=\"196\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"263\" y=\"103\" width=\"196\" height=\"116\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"263\" y=\"77\" width=\"196\" height=\"142\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"263\" y1=\"103\" x2=\"459\" y2=\"103\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"323\" y=\"95.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">apprenant</text>\n",
"\t<text x=\"268\" y=\"121.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_apprenant</text>\n",
"\t<line x1=\"268\" y1=\"124\" x2=\"370\" y2=\"124\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"268\" y=\"139.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nom</text>\n",
"\t<text x=\"268\" y=\"157.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">prenom</text>\n",
"\t<text x=\"268\" y=\"175.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_naissance</text>\n",
"\t<text x=\"268\" y=\"193.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">classe</text>\n",
"\t<text x=\"268\" y=\"211.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">reponses_questionnaire</text>\n",
"</g>\n",
"\n",
"<!-- Entity QUESTION_POSEE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"830\" y=\"113\" width=\"130\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"830\" y=\"139\" width=\"130\" height=\"44\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"830\" y=\"113\" width=\"130\" height=\"70\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"830\" y1=\"139\" x2=\"960\" y2=\"139\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"836\" y=\"131.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">question_posée</text>\n",
"\t<text x=\"835\" y=\"157.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_quest</text>\n",
"\t<line x1=\"835\" y1=\"160\" x2=\"903\" y2=\"160\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"835\" y=\"175.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">question</text>\n",
"</g>\n",
"\n",
"<!-- Entity ANONYME -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"1138\" y=\"113\" width=\"70\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"1138\" y=\"139\" width=\"70\" height=\"44\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"1138\" y=\"113\" width=\"70\" height=\"70\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"1138\" y1=\"139\" x2=\"1208\" y2=\"139\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"1143\" y=\"131.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">anonyme</text>\n",
"\t<text x=\"1143\" y=\"157.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id</text>\n",
"\t<line x1=\"1143\" y1=\"160\" x2=\"1161\" y2=\"160\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"1143\" y=\"175.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">email</text>\n",
"</g>\n",
"\n",
"<!-- Entity DROIT -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"9\" y=\"252\" width=\"248\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"9\" y=\"278\" width=\"248\" height=\"188\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"9\" y=\"252\" width=\"248\" height=\"214\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"9\" y1=\"278\" x2=\"257\" y2=\"278\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"112\" y=\"270.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">droit</text>\n",
"\t<text x=\"14\" y=\"296.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_droit</text>\n",
"\t<line x1=\"14\" y1=\"299\" x2=\"82\" y2=\"299\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"14\" y=\"314.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">niveau_d_access</text>\n",
"\t<text x=\"14\" y=\"332.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nb_profil_crée</text>\n",
"\t<text x=\"14\" y=\"350.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nb_user_invite</text>\n",
"\t<text x=\"14\" y=\"368.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">peut_modifier_profil</text>\n",
"\t<text x=\"14\" y=\"386.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">peut_supprimer_profil</text>\n",
"\t<text x=\"14\" y=\"404.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">peut_faire_activité</text>\n",
"\t<text x=\"14\" y=\"422.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">peut_faire_test</text>\n",
"\t<text x=\"14\" y=\"440.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">peut_consulter_hist_activité</text>\n",
"\t<text x=\"14\" y=\"458.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">peut_consulter_hist_test</text>\n",
"</g>\n",
"\n",
"<!-- Entity COMPTE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"468\" y=\"243\" width=\"172\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"468\" y=\"269\" width=\"172\" height=\"206\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"468\" y=\"243\" width=\"172\" height=\"232\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"468\" y1=\"269\" x2=\"640\" y2=\"269\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"528\" y=\"261.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">compte</text>\n",
"\t<text x=\"473\" y=\"287.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">login</text>\n",
"\t<line x1=\"473\" y1=\"290\" x2=\"516\" y2=\"290\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"473\" y=\"305.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">email</text>\n",
"\t<text x=\"473\" y=\"323.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">password</text>\n",
"\t<text x=\"473\" y=\"341.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">état</text>\n",
"\t<text x=\"473\" y=\"359.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_derniere_co</text>\n",
"\t<text x=\"473\" y=\"377.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nom</text>\n",
"\t<text x=\"473\" y=\"395.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">prenom</text>\n",
"\t<text x=\"473\" y=\"413.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">mobile</text>\n",
"\t<text x=\"473\" y=\"431.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_création</text>\n",
"\t<text x=\"473\" y=\"449.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">moyen_paiement</text>\n",
"\t<text x=\"473\" y=\"467.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">est_connecté</text>\n",
"</g>\n",
"\n",
"<!-- Entity PROBLEME_SIGNALE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"788\" y=\"297\" width=\"214\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"788\" y=\"323\" width=\"214\" height=\"98\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"788\" y=\"297\" width=\"214\" height=\"124\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"788\" y1=\"323\" x2=\"1002\" y2=\"323\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"827\" y=\"315.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">probleme_signalé</text>\n",
"\t<text x=\"793\" y=\"341.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_prob</text>\n",
"\t<line x1=\"793\" y1=\"344\" x2=\"853\" y2=\"344\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"793\" y=\"359.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">version de lapplication</text>\n",
"\t<text x=\"793\" y=\"377.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">support</text>\n",
"\t<text x=\"793\" y=\"395.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date du signalement</text>\n",
"\t<text x=\"793\" y=\"413.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">commentaire</text>\n",
"</g>\n",
"\n",
"<!-- Entity LICENCE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"288\" y=\"490\" width=\"146\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"288\" y=\"516\" width=\"146\" height=\"44\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"288\" y=\"490\" width=\"146\" height=\"70\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"288\" y1=\"516\" x2=\"434\" y2=\"516\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"331\" y=\"508.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">licence</text>\n",
"\t<text x=\"293\" y=\"534.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">clé</text>\n",
"\t<line x1=\"293\" y1=\"537\" x2=\"319\" y2=\"537\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"293\" y=\"552.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_utilisation</text>\n",
"</g>\n",
"\n",
"<!-- Entity QUESTIONNAIRE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"797\" y=\"472\" width=\"196\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"797\" y=\"498\" width=\"196\" height=\"80\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"797\" y=\"472\" width=\"196\" height=\"106\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"797\" y1=\"498\" x2=\"993\" y2=\"498\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"840\" y=\"490.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">questionnaire</text>\n",
"\t<text x=\"802\" y=\"516.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_questionnaire</text>\n",
"\t<line x1=\"802\" y1=\"519\" x2=\"938\" y2=\"519\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"802\" y=\"534.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">forme_rappel</text>\n",
"\t<text x=\"802\" y=\"552.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">disponibilité</text>\n",
"\t<text x=\"802\" y=\"570.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">reponses_questionnaire</text>\n",
"</g>\n",
"\n",
"<!-- Entity ABONNEMENT -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"68\" y=\"611\" width=\"130\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"68\" y=\"637\" width=\"130\" height=\"80\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"68\" y=\"611\" width=\"130\" height=\"106\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"68\" y1=\"637\" x2=\"198\" y2=\"637\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"91\" y=\"629.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">abonnement</text>\n",
"\t<text x=\"73\" y=\"655.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nom_abonnement</text>\n",
"\t<line x1=\"73\" y1=\"658\" x2=\"192\" y2=\"658\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"73\" y=\"673.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">prix</text>\n",
"\t<text x=\"73\" y=\"691.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_début</text>\n",
"\t<text x=\"73\" y=\"709.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_fin</text>\n",
"</g>\n",
"\n",
"<!-- Entity PROMOTION -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"822\" y=\"602\" width=\"146\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"822\" y=\"628\" width=\"146\" height=\"98\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"822\" y=\"602\" width=\"146\" height=\"124\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"822\" y1=\"628\" x2=\"968\" y2=\"628\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"857\" y=\"620.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">promotion</text>\n",
"\t<text x=\"827\" y=\"646.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">code</text>\n",
"\t<line x1=\"827\" y1=\"649\" x2=\"862\" y2=\"649\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"827\" y=\"664.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_création</text>\n",
"\t<text x=\"827\" y=\"682.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">durée_reduction</text>\n",
"\t<text x=\"827\" y=\"700.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">reduction</text>\n",
"\t<text x=\"827\" y=\"718.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">conditions</text>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"generer_mcd(mcd.auth,seed=4)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"825\" height=\"694\" viewBox=\"0 0 825 694\">\n",
"<rect x=\"0\" y=\"0\" width=\"825\" height=\"694\" fill=\"none\" stroke=\"none\" stroke-width=\"0\"/>\n",
"\n",
"<!-- Association DECRIRE -->\n",
"<g>\n",
"\t<line x1=\"116\" y1=\"80\" x2=\"116\" y2=\"201\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"116\" y1=\"340\" x2=\"116\" y2=\"201\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M139 175 a14 14 90 0 1 14 14 V201 h-74 V189 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M153 201 v12 a14 14 90 0 1 -14 14 H93 a14 14 90 0 1 -14 -14 V201 H74\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"79\" y=\"175\" width=\"74\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"79\" y1=\"201\" x2=\"153\" y2=\"201\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"86\" y=\"193.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">decrire</text>\n",
"\t</g>\n",
"\t<text x=\"121\" y=\"149\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"121\" y=\"297\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"</g>\n",
"\n",
"<!-- Association POSSESER -->\n",
"<g>\n",
"\t<line x1=\"525\" y1=\"340\" x2=\"525\" y2=\"201\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"525\" y1=\"80\" x2=\"525\" y2=\"201\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M552 175 a14 14 90 0 1 14 14 V201 h-82 V189 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M566 201 v12 a14 14 90 0 1 -14 14 H498 a14 14 90 0 1 -14 -14 V201 H82\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"484\" y=\"175\" width=\"82\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"484\" y1=\"201\" x2=\"566\" y2=\"201\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"491\" y=\"193.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">posséser</text>\n",
"\t</g>\n",
"\t<text x=\"530\" y=\"243\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"\t<text x=\"530\" y=\"167\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association REALISER -->\n",
"<g>\n",
"\t<line x1=\"525\" y1=\"569\" x2=\"306\" y2=\"340\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"116\" y1=\"340\" x2=\"306\" y2=\"340\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"525\" y1=\"340\" x2=\"306\" y2=\"340\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"525\" y1=\"80\" x2=\"306\" y2=\"340\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M363 314 a14 14 90 0 1 14 14 V340 h-142 V328 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M377 340 v12 a14 14 90 0 1 -14 14 H249 a14 14 90 0 1 -14 -14 V340 H142\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"235\" y=\"314\" width=\"142\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"235\" y1=\"340\" x2=\"377\" y2=\"340\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"272\" y=\"332.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">réaliser</text>\n",
"\t\t<text x=\"242\" y=\"358.6\" fill=\"#607734\" font-family=\"Courier New\" font-size=\"14\">points accordés</text>\n",
"\t</g>\n",
"\t<text x=\"411\" y=\"488.23\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"207\" y=\"356\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"382\" y=\"356\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"\t<text x=\"463.98\" y=\"167\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association AJOUTER -->\n",
"<g>\n",
"\t<line x1=\"525\" y1=\"569\" x2=\"730\" y2=\"340\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"730\" y1=\"569\" x2=\"730\" y2=\"340\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"525\" y1=\"340\" x2=\"730\" y2=\"340\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"525\" y1=\"80\" x2=\"730\" y2=\"340\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M753 314 a14 14 90 0 1 14 14 V340 h-74 V328 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M767 340 v12 a14 14 90 0 1 -14 14 H707 a14 14 90 0 1 -14 -14 V340 H74\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"693\" y=\"314\" width=\"74\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"693\" y1=\"340\" x2=\"767\" y2=\"340\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"700\" y=\"332.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">ajouter</text>\n",
"\t</g>\n",
"\t<text x=\"616\" y=\"482.41\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"735\" y=\"526\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"645\" y=\"356\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"\t<text x=\"558.88\" y=\"167\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Entity FICHE_ACTIVITE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"9\" y=\"27\" width=\"214\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"9\" y=\"53\" width=\"214\" height=\"80\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"9\" y=\"27\" width=\"214\" height=\"106\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"9\" y1=\"53\" x2=\"223\" y2=\"53\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"57\" y=\"45.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">fiche_activité</text>\n",
"\t<text x=\"14\" y=\"71.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_fiche</text>\n",
"\t<line x1=\"14\" y1=\"74\" x2=\"82\" y2=\"74\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"14\" y=\"89.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">comp_travaillé</text>\n",
"\t<text x=\"14\" y=\"107.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">pourquoi_travailler_comp</text>\n",
"\t<text x=\"14\" y=\"125.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">variantes</text>\n",
"</g>\n",
"\n",
"<!-- Entity APPRENANT -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"427\" y=\"9\" width=\"196\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"427\" y=\"35\" width=\"196\" height=\"116\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"427\" y=\"9\" width=\"196\" height=\"142\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"427\" y1=\"35\" x2=\"623\" y2=\"35\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"487\" y=\"27.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">apprenant</text>\n",
"\t<text x=\"432\" y=\"53.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_apprenant</text>\n",
"\t<line x1=\"432\" y1=\"56\" x2=\"534\" y2=\"56\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"432\" y=\"71.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nom</text>\n",
"\t<text x=\"432\" y=\"89.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">prenom</text>\n",
"\t<text x=\"432\" y=\"107.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_naissance</text>\n",
"\t<text x=\"432\" y=\"125.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">classe</text>\n",
"\t<text x=\"432\" y=\"143.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">reponses_questionnaire</text>\n",
"</g>\n",
"\n",
"<!-- Entity ACTIVITE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"30\" y=\"305\" width=\"172\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"30\" y=\"331\" width=\"172\" height=\"44\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"30\" y=\"305\" width=\"172\" height=\"70\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"30\" y1=\"331\" x2=\"202\" y2=\"331\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"82\" y=\"323.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">activité</text>\n",
"\t<text x=\"35\" y=\"349.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_activité</text>\n",
"\t<line x1=\"35\" y1=\"352\" x2=\"129\" y2=\"352\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"35\" y=\"367.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">caracteristiques ia</text>\n",
"</g>\n",
"\n",
"<!-- Entity HISTORIQUE_ACTIVITE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"410\" y=\"251\" width=\"230\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"410\" y=\"277\" width=\"230\" height=\"152\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"410\" y=\"251\" width=\"230\" height=\"178\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"410\" y1=\"277\" x2=\"640\" y2=\"277\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"445\" y=\"269.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">historique_activité</text>\n",
"\t<text x=\"415\" y=\"295.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id</text>\n",
"\t<line x1=\"415\" y1=\"298\" x2=\"433\" y2=\"298\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"415\" y=\"313.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">durée</text>\n",
"\t<text x=\"415\" y=\"331.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date de réalisation</text>\n",
"\t<text x=\"415\" y=\"349.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">note difficulté</text>\n",
"\t<text x=\"415\" y=\"367.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">note plaisir</text>\n",
"\t<text x=\"415\" y=\"385.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">note concentration</text>\n",
"\t<text x=\"415\" y=\"403.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">note durée</text>\n",
"\t<text x=\"415\" y=\"421.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">activité proposée par algo</text>\n",
"</g>\n",
"\n",
"<!-- Entity COMPTE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"439\" y=\"453\" width=\"172\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"439\" y=\"479\" width=\"172\" height=\"206\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"439\" y=\"453\" width=\"172\" height=\"232\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"439\" y1=\"479\" x2=\"611\" y2=\"479\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"499\" y=\"471.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">compte</text>\n",
"\t<text x=\"444\" y=\"497.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">login</text>\n",
"\t<line x1=\"444\" y1=\"500\" x2=\"487\" y2=\"500\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"444\" y=\"515.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">email</text>\n",
"\t<text x=\"444\" y=\"533.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">password</text>\n",
"\t<text x=\"444\" y=\"551.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">état</text>\n",
"\t<text x=\"444\" y=\"569.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_derniere_co</text>\n",
"\t<text x=\"444\" y=\"587.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nom</text>\n",
"\t<text x=\"444\" y=\"605.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">prenom</text>\n",
"\t<text x=\"444\" y=\"623.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">mobile</text>\n",
"\t<text x=\"444\" y=\"641.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_création</text>\n",
"\t<text x=\"444\" y=\"659.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">moyen_paiement</text>\n",
"\t<text x=\"444\" y=\"677.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">est_connecté</text>\n",
"</g>\n",
"\n",
"<!-- Entity ACTIVITE_AJOUTEE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"644\" y=\"534\" width=\"172\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"644\" y=\"560\" width=\"172\" height=\"44\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"644\" y=\"534\" width=\"172\" height=\"70\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"644\" y1=\"560\" x2=\"816\" y2=\"560\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"662\" y=\"552.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">activité_ajoutee</text>\n",
"\t<text x=\"649\" y=\"578.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">titre</text>\n",
"\t<line x1=\"649\" y1=\"581\" x2=\"692\" y2=\"581\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"649\" y=\"596.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">caracteristiques ia</text>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"generer_mcd(mcd.activites,seed=2)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"612\" height=\"384\" viewBox=\"0 0 612 384\">\n",
"<rect x=\"0\" y=\"0\" width=\"612\" height=\"384\" fill=\"none\" stroke=\"none\" stroke-width=\"0\"/>\n",
"\n",
"<!-- Association ETRE3 -->\n",
"<g>\n",
"\t<line x1=\"263\" y1=\"210\" x2=\"263\" y2=\"62\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"428\" y1=\"62\" x2=\"263\" y2=\"62\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M274 36 a14 14 90 0 1 14 14 V62 h-50 V50 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M288 62 v12 a14 14 90 0 1 -14 14 H252 a14 14 90 0 1 -14 -14 V62 H50\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"238\" y=\"36\" width=\"50\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"238\" y1=\"62\" x2=\"288\" y2=\"62\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"246\" y=\"54.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">etre</text>\n",
"\t</g>\n",
"\t<text x=\"268\" y=\"131\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"293\" y=\"78\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"</g>\n",
"\n",
"<!-- Association ETRE2 -->\n",
"<g>\n",
"\t<line x1=\"263\" y1=\"210\" x2=\"107\" y2=\"210\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"107\" y1=\"340\" x2=\"107\" y2=\"210\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M118 184 a14 14 90 0 1 14 14 V210 h-50 V198 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M132 210 v12 a14 14 90 0 1 -14 14 H96 a14 14 90 0 1 -14 -14 V210 H50\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"82\" y=\"184\" width=\"50\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"82\" y1=\"210\" x2=\"132\" y2=\"210\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"90\" y=\"202.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">etre</text>\n",
"\t</g>\n",
"\t<text x=\"149\" y=\"226\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"112\" y=\"297\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"</g>\n",
"\n",
"<!-- Association CONTENIR -->\n",
"<g>\n",
"\t<line x1=\"568\" y1=\"210\" x2=\"428\" y2=\"210\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"263\" y1=\"210\" x2=\"428\" y2=\"210\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M455 184 a14 14 90 0 1 14 14 V210 h-82 V198 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M469 210 v12 a14 14 90 0 1 -14 14 H401 a14 14 90 0 1 -14 -14 V210 H82\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"387\" y=\"184\" width=\"82\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"387\" y1=\"210\" x2=\"469\" y2=\"210\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"394\" y=\"202.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">contenir</text>\n",
"\t</g>\n",
"\t<text x=\"505\" y=\"226\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"354\" y=\"226\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association ETRE1 -->\n",
"<g>\n",
"\t<line x1=\"263\" y1=\"210\" x2=\"263\" y2=\"340\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"428\" y1=\"340\" x2=\"263\" y2=\"340\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M274 314 a14 14 90 0 1 14 14 V340 h-50 V328 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M288 340 v12 a14 14 90 0 1 -14 14 H252 a14 14 90 0 1 -14 -14 V340 H50\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"238\" y=\"314\" width=\"50\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"238\" y1=\"340\" x2=\"288\" y2=\"340\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"246\" y=\"332.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">etre</text>\n",
"\t</g>\n",
"\t<text x=\"268\" y=\"297\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"302\" y=\"356\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"</g>\n",
"\n",
"<!-- Entity FICHE_ACTIVITE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"321\" y=\"9\" width=\"214\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"321\" y=\"35\" width=\"214\" height=\"80\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"321\" y=\"9\" width=\"214\" height=\"106\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"321\" y1=\"35\" x2=\"535\" y2=\"35\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"369\" y=\"27.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">fiche_activité</text>\n",
"\t<text x=\"326\" y=\"53.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_fiche</text>\n",
"\t<line x1=\"326\" y1=\"56\" x2=\"394\" y2=\"56\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"326\" y=\"71.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">comp_travaillé</text>\n",
"\t<text x=\"326\" y=\"89.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">pourquoi_travailler_comp</text>\n",
"\t<text x=\"326\" y=\"107.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">variantes</text>\n",
"</g>\n",
"\n",
"<!-- Entity RESSOURCE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"177\" y=\"139\" width=\"172\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"177\" y=\"165\" width=\"172\" height=\"116\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"177\" y=\"139\" width=\"172\" height=\"142\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"177\" y1=\"165\" x2=\"349\" y2=\"165\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"225\" y=\"157.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">Ressource</text>\n",
"\t<text x=\"182\" y=\"183.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_ress</text>\n",
"\t<line x1=\"182\" y1=\"186\" x2=\"242\" y2=\"186\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"182\" y=\"201.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">titre</text>\n",
"\t<text x=\"182\" y=\"219.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">description</text>\n",
"\t<text x=\"182\" y=\"237.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_publication</text>\n",
"\t<text x=\"182\" y=\"255.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">type</text>\n",
"\t<text x=\"182\" y=\"273.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">niveau_d_access</text>\n",
"</g>\n",
"\n",
"<!-- Entity MOT_CLE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"533\" y=\"184\" width=\"70\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"533\" y=\"210\" width=\"70\" height=\"26\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"533\" y=\"184\" width=\"70\" height=\"52\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"533\" y1=\"210\" x2=\"603\" y2=\"210\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"538\" y=\"202.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">mot_clé</text>\n",
"\t<text x=\"538\" y=\"228.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">mot</text>\n",
"\t<line x1=\"538\" y1=\"231\" x2=\"564\" y2=\"231\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"</g>\n",
"\n",
"<!-- Entity ARTICLE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"9\" y=\"305\" width=\"196\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"9\" y=\"331\" width=\"196\" height=\"44\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"9\" y=\"305\" width=\"196\" height=\"70\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"9\" y1=\"331\" x2=\"205\" y2=\"331\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"77\" y=\"323.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">article</text>\n",
"\t<text x=\"14\" y=\"349.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_article</text>\n",
"\t<line x1=\"14\" y1=\"352\" x2=\"99\" y2=\"352\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"14\" y=\"367.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">lien_vers_site_externe</text>\n",
"</g>\n",
"\n",
"<!-- Entity VIDEO -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"330\" y=\"305\" width=\"196\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"330\" y=\"331\" width=\"196\" height=\"44\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"330\" y=\"305\" width=\"196\" height=\"70\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"330\" y1=\"331\" x2=\"526\" y2=\"331\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"407\" y=\"323.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">vidéo</text>\n",
"\t<text x=\"335\" y=\"349.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_video</text>\n",
"\t<line x1=\"335\" y1=\"352\" x2=\"403\" y2=\"352\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"335\" y=\"367.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">lien_vers_site_externe</text>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"generer_mcd(mcd.ressources,seed=2)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"568\" height=\"564\" viewBox=\"0 0 568 564\">\n",
"<rect x=\"0\" y=\"0\" width=\"568\" height=\"564\" fill=\"none\" stroke=\"none\" stroke-width=\"0\"/>\n",
"\n",
"<!-- Association POSSESER1 -->\n",
"<g>\n",
"\t<line x1=\"112\" y1=\"237\" x2=\"112\" y2=\"80\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"289\" y1=\"80\" x2=\"112\" y2=\"80\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M139 54 a14 14 90 0 1 14 14 V80 h-82 V68 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M153 80 v12 a14 14 90 0 1 -14 14 H85 a14 14 90 0 1 -14 -14 V80 H82\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"71\" y=\"54\" width=\"82\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"71\" y1=\"80\" x2=\"153\" y2=\"80\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"78\" y=\"72.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">posséser</text>\n",
"\t</g>\n",
"\t<text x=\"117\" y=\"167\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"\t<text x=\"163\" y=\"96\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association REALISER2 -->\n",
"<g>\n",
"\t<line x1=\"289\" y1=\"439\" x2=\"289\" y2=\"237\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"461\" y1=\"237\" x2=\"289\" y2=\"237\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"112\" y1=\"237\" x2=\"289\" y2=\"237\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"289\" y1=\"80\" x2=\"289\" y2=\"237\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M316 211 a14 14 90 0 1 14 14 V237 h-82 V225 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M330 237 v12 a14 14 90 0 1 -14 14 H262 a14 14 90 0 1 -14 -14 V237 H82\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"248\" y=\"211\" width=\"82\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"248\" y1=\"237\" x2=\"330\" y2=\"237\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"255\" y=\"229.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">réaliser</text>\n",
"\t</g>\n",
"\t<text x=\"294\" y=\"315\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"335\" y=\"253\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"220\" y=\"253\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"\t<text x=\"294\" y=\"167\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Entity APPRENANT -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"191\" y=\"9\" width=\"196\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"191\" y=\"35\" width=\"196\" height=\"116\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"191\" y=\"9\" width=\"196\" height=\"142\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"191\" y1=\"35\" x2=\"387\" y2=\"35\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"251\" y=\"27.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">apprenant</text>\n",
"\t<text x=\"196\" y=\"53.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_apprenant</text>\n",
"\t<line x1=\"196\" y1=\"56\" x2=\"298\" y2=\"56\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"196\" y=\"71.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nom</text>\n",
"\t<text x=\"196\" y=\"89.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">prenom</text>\n",
"\t<text x=\"196\" y=\"107.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_naissance</text>\n",
"\t<text x=\"196\" y=\"125.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">classe</text>\n",
"\t<text x=\"196\" y=\"143.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">reponses_questionnaire</text>\n",
"</g>\n",
"\n",
"<!-- Entity HISTORIQUE_TEST -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"9\" y=\"175\" width=\"206\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"9\" y=\"201\" width=\"206\" height=\"98\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"9\" y=\"175\" width=\"206\" height=\"124\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"9\" y1=\"201\" x2=\"215\" y2=\"201\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"49\" y=\"193.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">historique_test</text>\n",
"\t<text x=\"14\" y=\"219.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_entree</text>\n",
"\t<line x1=\"14\" y1=\"222\" x2=\"91\" y2=\"222\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"14\" y=\"237.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">durée</text>\n",
"\t<text x=\"14\" y=\"255.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">score</text>\n",
"\t<text x=\"14\" y=\"273.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">temps de réaction moyen</text>\n",
"\t<text x=\"14\" y=\"291.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date de réalisation</text>\n",
"</g>\n",
"\n",
"<!-- Entity TEST_DE_POSITIONNEMENT -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"363\" y=\"193\" width=\"196\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"363\" y=\"219\" width=\"196\" height=\"62\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"363\" y=\"193\" width=\"196\" height=\"88\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"363\" y1=\"219\" x2=\"559\" y2=\"219\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"368\" y=\"211.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">test_de_positionnement</text>\n",
"\t<text x=\"368\" y=\"237.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_testpos</text>\n",
"\t<line x1=\"368\" y1=\"240\" x2=\"453\" y2=\"240\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"368\" y=\"255.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">consigne</text>\n",
"\t<text x=\"368\" y=\"273.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">caracteristiques ia</text>\n",
"</g>\n",
"\n",
"<!-- Entity COMPTE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"203\" y=\"323\" width=\"172\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"203\" y=\"349\" width=\"172\" height=\"206\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"203\" y=\"323\" width=\"172\" height=\"232\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"203\" y1=\"349\" x2=\"375\" y2=\"349\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"263\" y=\"341.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">compte</text>\n",
"\t<text x=\"208\" y=\"367.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">login</text>\n",
"\t<line x1=\"208\" y1=\"370\" x2=\"251\" y2=\"370\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"208\" y=\"385.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">email</text>\n",
"\t<text x=\"208\" y=\"403.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">password</text>\n",
"\t<text x=\"208\" y=\"421.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">état</text>\n",
"\t<text x=\"208\" y=\"439.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_derniere_co</text>\n",
"\t<text x=\"208\" y=\"457.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nom</text>\n",
"\t<text x=\"208\" y=\"475.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">prenom</text>\n",
"\t<text x=\"208\" y=\"493.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">mobile</text>\n",
"\t<text x=\"208\" y=\"511.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_création</text>\n",
"\t<text x=\"208\" y=\"529.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">moyen_paiement</text>\n",
"\t<text x=\"208\" y=\"547.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">est_connecté</text>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"generer_mcd(mcd.test,seed=3)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"851\" height=\"559\" viewBox=\"0 0 851 559\">\n",
"<rect x=\"0\" y=\"0\" width=\"851\" height=\"559\" fill=\"none\" stroke=\"none\" stroke-width=\"0\"/>\n",
"\n",
"<!-- Association REALISER -->\n",
"<g>\n",
"\t<line x1=\"95\" y1=\"219\" x2=\"285\" y2=\"219\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"285\" y1=\"44\" x2=\"285\" y2=\"219\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"487\" y1=\"219\" x2=\"285\" y2=\"219\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M342 193 a14 14 90 0 1 14 14 V219 h-142 V207 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M356 219 v12 a14 14 90 0 1 -14 14 H228 a14 14 90 0 1 -14 -14 V219 H142\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"214\" y=\"193\" width=\"142\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"214\" y1=\"219\" x2=\"356\" y2=\"219\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"251\" y=\"211.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">réaliser</text>\n",
"\t\t<text x=\"221\" y=\"237.6\" fill=\"#607734\" font-family=\"Courier New\" font-size=\"14\">points accordés</text>\n",
"\t</g>\n",
"\t<text x=\"186\" y=\"235\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"290\" y=\"95\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"361\" y=\"235\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association REALISER3 -->\n",
"<g>\n",
"\t<line x1=\"487\" y1=\"219\" x2=\"659\" y2=\"219\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"659\" y1=\"367\" x2=\"659\" y2=\"219\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M686 193 a14 14 90 0 1 14 14 V219 h-82 V207 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M700 219 v12 a14 14 90 0 1 -14 14 H632 a14 14 90 0 1 -14 -14 V219 H82\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"618\" y=\"193\" width=\"82\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"618\" y1=\"219\" x2=\"700\" y2=\"219\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"625\" y=\"211.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">réaliser</text>\n",
"\t</g>\n",
"\t<text x=\"590\" y=\"235\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"664\" y=\"306\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association ATTEINDRE -->\n",
"<g>\n",
"\t<line x1=\"487\" y1=\"219\" x2=\"487\" y2=\"367\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"487\" y1=\"497\" x2=\"487\" y2=\"367\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M519 341 a14 14 90 0 1 14 14 V367 h-92 V355 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M533 367 v12 a14 14 90 0 1 -14 14 H455 a14 14 90 0 1 -14 -14 V367 H92\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"441\" y=\"341\" width=\"92\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"441\" y1=\"367\" x2=\"533\" y2=\"367\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"449\" y=\"359.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">atteindre</text>\n",
"\t</g>\n",
"\t<text x=\"492\" y=\"306\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"492\" y=\"454\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"</g>\n",
"\n",
"<!-- Association DEBLOQUER -->\n",
"<g>\n",
"\t<line x1=\"659\" y1=\"367\" x2=\"790\" y2=\"367\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"790\" y1=\"497\" x2=\"790\" y2=\"367\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M822 341 a14 14 90 0 1 14 14 V367 h-92 V355 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M836 367 v12 a14 14 90 0 1 -14 14 H758 a14 14 90 0 1 -14 -14 V367 H92\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"744\" y=\"341\" width=\"92\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"744\" y1=\"367\" x2=\"836\" y2=\"367\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"752\" y=\"359.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">debloquer</text>\n",
"\t</g>\n",
"\t<text x=\"716\" y=\"383\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"795\" y=\"436\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"</g>\n",
"\n",
"<!-- Association DEBLOQUER1 -->\n",
"<g>\n",
"\t<line x1=\"487\" y1=\"497\" x2=\"659\" y2=\"497\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<line x1=\"790\" y1=\"497\" x2=\"659\" y2=\"497\" stroke=\"#726f83\" stroke-width=\"1\"/>\n",
"\t<g>\n",
"\t\t<path d=\"M691 471 a14 14 90 0 1 14 14 V497 h-92 V485 a14 14 90 0 1 14 -14\" fill=\"#b2bba4\" stroke=\"#b2bba4\" stroke-width=\"0\"/>\n",
"\t\t<path d=\"M705 497 v12 a14 14 90 0 1 -14 14 H627 a14 14 90 0 1 -14 -14 V497 H92\" fill=\"#ccd6ba\" stroke=\"#ccd6ba\" stroke-width=\"0\"/>\n",
"\t\t<rect x=\"613\" y=\"471\" width=\"92\" height=\"52\" fill=\"none\" rx=\"14\" stroke=\"#85956b\" stroke-width=\"1.5\"/>\n",
"\t\t<line x1=\"613\" y1=\"497\" x2=\"705\" y2=\"497\" stroke=\"#85956b\" stroke-width=\"1\"/>\n",
"\t\t<text x=\"621\" y=\"489.6\" fill=\"#27360c\" font-family=\"Courier New\" font-size=\"14\">debloquer</text>\n",
"\t</g>\n",
"\t<text x=\"565\" y=\"513\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">0,N</text>\n",
"\t<text x=\"710\" y=\"513\" fill=\"#726f83\" font-family=\"Courier New\" font-size=\"12\">1,1</text>\n",
"</g>\n",
"\n",
"<!-- Entity ACTIVITE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"199\" y=\"9\" width=\"172\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"199\" y=\"35\" width=\"172\" height=\"44\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"199\" y=\"9\" width=\"172\" height=\"70\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"199\" y1=\"35\" x2=\"371\" y2=\"35\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"251\" y=\"27.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">activité</text>\n",
"\t<text x=\"204\" y=\"53.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_activité</text>\n",
"\t<line x1=\"204\" y1=\"56\" x2=\"298\" y2=\"56\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"204\" y=\"71.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">caracteristiques ia</text>\n",
"</g>\n",
"\n",
"<!-- Entity COMPTE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"9\" y=\"103\" width=\"172\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"9\" y=\"129\" width=\"172\" height=\"206\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"9\" y=\"103\" width=\"172\" height=\"232\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"9\" y1=\"129\" x2=\"181\" y2=\"129\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"69\" y=\"121.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">compte</text>\n",
"\t<text x=\"14\" y=\"147.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">login</text>\n",
"\t<line x1=\"14\" y1=\"150\" x2=\"57\" y2=\"150\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"14\" y=\"165.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">email</text>\n",
"\t<text x=\"14\" y=\"183.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">password</text>\n",
"\t<text x=\"14\" y=\"201.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">état</text>\n",
"\t<text x=\"14\" y=\"219.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_derniere_co</text>\n",
"\t<text x=\"14\" y=\"237.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nom</text>\n",
"\t<text x=\"14\" y=\"255.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">prenom</text>\n",
"\t<text x=\"14\" y=\"273.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">mobile</text>\n",
"\t<text x=\"14\" y=\"291.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_création</text>\n",
"\t<text x=\"14\" y=\"309.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">moyen_paiement</text>\n",
"\t<text x=\"14\" y=\"327.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">est_connecté</text>\n",
"</g>\n",
"\n",
"<!-- Entity APPRENANT -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"389\" y=\"148\" width=\"196\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"389\" y=\"174\" width=\"196\" height=\"116\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"389\" y=\"148\" width=\"196\" height=\"142\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"389\" y1=\"174\" x2=\"585\" y2=\"174\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"449\" y=\"166.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">apprenant</text>\n",
"\t<text x=\"394\" y=\"192.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_apprenant</text>\n",
"\t<line x1=\"394\" y1=\"195\" x2=\"496\" y2=\"195\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"394\" y=\"210.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nom</text>\n",
"\t<text x=\"394\" y=\"228.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">prenom</text>\n",
"\t<text x=\"394\" y=\"246.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date_de_naissance</text>\n",
"\t<text x=\"394\" y=\"264.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">classe</text>\n",
"\t<text x=\"394\" y=\"282.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">reponses_questionnaire</text>\n",
"</g>\n",
"\n",
"<!-- Entity DEFI -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"607\" y=\"314\" width=\"104\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"607\" y=\"340\" width=\"104\" height=\"80\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"607\" y=\"314\" width=\"104\" height=\"106\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"607\" y1=\"340\" x2=\"711\" y2=\"340\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"642\" y=\"332.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">defi</text>\n",
"\t<text x=\"612\" y=\"358.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_defi</text>\n",
"\t<line x1=\"612\" y1=\"361\" x2=\"672\" y2=\"361\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"612\" y=\"376.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nom</text>\n",
"\t<text x=\"612\" y=\"394.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">objectif</text>\n",
"\t<text x=\"612\" y=\"412.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">date limite</text>\n",
"</g>\n",
"\n",
"<!-- Entity PALIER -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"414\" y=\"462\" width=\"146\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"414\" y=\"488\" width=\"146\" height=\"44\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"414\" y=\"462\" width=\"146\" height=\"70\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"414\" y1=\"488\" x2=\"560\" y2=\"488\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"461\" y=\"480.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">palier</text>\n",
"\t<text x=\"419\" y=\"506.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_palier</text>\n",
"\t<line x1=\"419\" y1=\"509\" x2=\"496\" y2=\"509\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"419\" y=\"524.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nombre de points</text>\n",
"</g>\n",
"\n",
"<!-- Entity BADGE -->\n",
"<g>\n",
"\t<g>\n",
"\t\t<rect x=\"738\" y=\"444\" width=\"104\" height=\"26\" fill=\"#97b8ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"738\" y=\"470\" width=\"104\" height=\"80\" fill=\"#c0d4ff\" stroke=\"none\" stroke-width=\"0\" opacity=\"1\"/>\n",
"\t\t<rect x=\"738\" y=\"444\" width=\"104\" height=\"106\" fill=\"none\" stroke=\"#578dff\" stroke-width=\"1.5\" opacity=\"1\"/>\n",
"\t\t<line x1=\"738\" y1=\"470\" x2=\"842\" y2=\"470\" stroke=\"#578dff\" stroke-width=\"1\"/>\n",
"\t</g>\n",
"\t<text x=\"769\" y=\"462.6\" fill=\"#131114\" font-family=\"Courier New\" font-size=\"14\">badge</text>\n",
"\t<text x=\"743\" y=\"488.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">id_badge</text>\n",
"\t<line x1=\"743\" y1=\"491\" x2=\"811\" y2=\"491\" stroke=\"#3e3c42\" stroke-width=\"1\"/>\n",
"\t<text x=\"743\" y=\"506.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">nom</text>\n",
"\t<text x=\"743\" y=\"524.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">description</text>\n",
"\t<text x=\"743\" y=\"542.6\" fill=\"#3e3c42\" font-family=\"Courier New\" font-size=\"14\">image</text>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"generer_mcd(mcd.recompenses,seed=3)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"def generer_mmd(domaine:str):\n",
" \"\"\"\n",
" Genère un graphe Mermaid Crowfoot notation à partir d'un domaine exprimé en MCD mocodo.\n",
" \n",
" :param domaine: Le domaine exprimé en MCD mocodo\n",
" :type domaine: str\n",
" \"\"\"\n",
"\n",
" return mocodo(f\"\"\"\n",
" %mocodo --colors ocean -t crow:mmd\n",
" {domaine}\n",
" \"\"\")\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"<div style=\"position: relative; height: 3ex; background-color: transparent\">\n",
"<hr style=\"margin: 1ex 0 0 0; border-top: 1px solid #BBB\">\n",
"<span style=\"position: absolute; right: 0; color: #BBB\">\n",
"<tt>\n",
"mocodo_notebook/sandbox_erd_crow.mmd\n",
"</tt>\n",
"</span>\n",
"</div>\n"
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"```mmd\n",
"erDiagram\n",
" licence {\n",
" TYPE cle PK\n",
" TYPE date_utilisation\n",
" }\n",
" licence_medicale {\n",
" TYPE cle_medicale PK\n",
" TYPE date_utilisation\n",
" TYPE \n",
" }\n",
" promotion {\n",
" TYPE code PK\n",
" TYPE date_de_creation\n",
" TYPE duree_reduction\n",
" TYPE reduction\n",
" TYPE conditions\n",
" }\n",
" abonnement {\n",
" TYPE nom_abonnement PK\n",
" TYPE prix\n",
" TYPE date_de_debut\n",
" TYPE date_de_fin\n",
" }\n",
" droit {\n",
" TYPE id_droit PK\n",
" TYPE niveau_d_access\n",
" TYPE nb_profil_cree\n",
" TYPE nb_user_invite\n",
" TYPE peut_modifier_profil\n",
" TYPE peut_supprimer_profil\n",
" TYPE peut_faire_activite\n",
" TYPE peut_faire_test\n",
" TYPE peut_consulter_hist_activite\n",
" TYPE peut_consulter_hist_test\n",
" }\n",
" questionnaire {\n",
" TYPE id_questionnaire PK\n",
" TYPE forme_rappel\n",
" TYPE disponibilite\n",
" TYPE reponses_questionnaire\n",
" }\n",
" probleme_signale {\n",
" TYPE id_prob PK\n",
" TYPE version_de_l_application\n",
" TYPE support\n",
" TYPE date_du_signalement\n",
" TYPE commentaire\n",
" }\n",
" question_posee {\n",
" TYPE id_quest PK\n",
" TYPE question\n",
" }\n",
" anonyme {\n",
" TYPE id PK\n",
" TYPE email\n",
" }\n",
" inviter {\n",
" TYPE date_invitation PK\n",
" TYPE \n",
" }\n",
" creer {\n",
" TYPE date_creation PK\n",
" }\n",
" acheter {\n",
" TYPE date_d_achat PK\n",
" }\n",
" activite_ajoutee {\n",
" TYPE titre PK\n",
" TYPE caracteristiques_ia\n",
" }\n",
" historique_activite {\n",
" TYPE id PK\n",
" TYPE duree\n",
" TYPE date_de_realisation\n",
" TYPE note_difficulte\n",
" TYPE note_plaisir\n",
" TYPE note_concentration\n",
" TYPE note_duree\n",
" TYPE activite_proposee_par_algo\n",
" TYPE points_accordes\n",
" }\n",
" palier {\n",
" TYPE id_palier PK\n",
" TYPE nombre_de_points\n",
" }\n",
" defi {\n",
" TYPE id_defi PK\n",
" TYPE nom\n",
" TYPE objectif\n",
" TYPE date_limite\n",
" }\n",
" badge {\n",
" TYPE id_badge PK\n",
" TYPE nom\n",
" TYPE description\n",
" TYPE image\n",
" }\n",
" mot_cle {\n",
" TYPE mot PK\n",
" }\n",
" Ressource {\n",
" TYPE id_ress PK\n",
" TYPE titre\n",
" TYPE description\n",
" TYPE date_de_publication\n",
" TYPE type\n",
" TYPE niveau_d_access\n",
" }\n",
" video {\n",
" TYPE id_video PK\n",
" TYPE lien_vers_site_externe\n",
" }\n",
" article {\n",
" TYPE id_article PK\n",
" TYPE lien_vers_site_externe\n",
" }\n",
" test_de_positionnement {\n",
" TYPE id_testpos PK\n",
" TYPE consigne\n",
" TYPE caracteristiques_ia\n",
" }\n",
" historique_test {\n",
" TYPE id_entree PK\n",
" TYPE duree\n",
" TYPE score\n",
" TYPE temps_de_reaction_moyen\n",
" TYPE date_de_realisation\n",
" }\n",
" apprenant {\n",
" TYPE id_apprenant PK\n",
" TYPE nom\n",
" TYPE prenom\n",
" TYPE date_de_naissance\n",
" TYPE classe\n",
" TYPE reponses_questionnaire\n",
" }\n",
" compte {\n",
" TYPE login PK\n",
" TYPE email\n",
" TYPE password\n",
" TYPE etat\n",
" TYPE date_de_derniere_co\n",
" TYPE nom\n",
" TYPE prenom\n",
" TYPE mobile\n",
" TYPE date_de_creation\n",
" TYPE moyen_paiement\n",
" TYPE est_connecte\n",
" }\n",
" fiche_activite {\n",
" TYPE id_fiche PK\n",
" TYPE comp_travaille\n",
" TYPE pourquoi_travailler_comp\n",
" TYPE variantes\n",
" }\n",
" activite {\n",
" TYPE id_activite PK\n",
" TYPE caracteristiques_ia\n",
" }\n",
" licence_medicale }o--o| apprenant: posseder2\n",
" licence_medicale }o--o| droit: posseder2\n",
" inviter }o..|| compte: DF\n",
" inviter }o..|| compte: DF\n",
" inviter }o..|| apprenant: DF\n",
" inviter }o..|| droit: DF\n",
" inviter }o..|| licence: DF\n",
" compte }o--o| licence: utiliser\n",
" compte }o--o| questionnaire: repondre\n",
" creer }o..|| compte: DF\n",
" creer }o..|| apprenant: DF\n",
" acheter }o..|| compte: DF\n",
" acheter }o..|| promotion: DF\n",
" acheter }o..|| licence: DF\n",
" acheter }o..|| abonnement: DF\n",
" abonnement }o--|| droit: assigner\n",
" question_posee }o--|| anonyme: poser\n",
" question_posee }o--|| compte: poser\n",
" probleme_signale }o--|| anonyme: signaler\n",
" probleme_signale }o--|| compte: signaler\n",
" historique_activite }o--|| compte: realiser\n",
" historique_activite }o--|| activite: realiser\n",
" historique_activite }o--|| apprenant: realiser\n",
" historique_activite }o--|| compte: ajouter\n",
" historique_activite }o--|| activite_ajoutee: ajouter\n",
" historique_activite }o--|| apprenant: ajouter\n",
" historique_activite }o--|| apprenant: posseser\n",
" fiche_activite ||--o{ activite: decrire\n",
" apprenant }o--o{ palier: atteindre\n",
" apprenant }o--o{ defi: realiser\n",
" defi ||--o{ badge: debloquer\n",
" palier ||--o{ badge: debloquer\n",
" mot_cle }o--o{ Ressource: contenir\n",
" Ressource ||--o{ video: etre\n",
" Ressource ||--o{ article: etre\n",
" Ressource ||--o{ fiche_activite: etre\n",
" historique_test }o--|| compte: realiser2\n",
" historique_test }o--|| test_de_positionnement: realiser2\n",
" historique_test }o--|| apprenant: realiser2\n",
" historique_test }o--|| apprenant: posseser\n",
"\n",
"```"
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"generer_mmd(mcd.texte_complet)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"def generer_types(domaine:str):\n",
" \"\"\"\n",
" Infère les types des attribut d'un domaine exprimé en MCD mocodo.\n",
" \n",
" :param domaine: Le domaine exprimé en MCD mocodo\n",
" :type domaine: str\n",
" \"\"\"\n",
" return mocodo(f\"\"\"\n",
" %mocodo -t create:types=TODO --select rw\n",
" {domaine}\n",
" \"\"\")\n",
"\n",
"def generer_mld(domaine:str):\n",
" \"\"\"\n",
" Genère un MLD textuel à partir d'un domaine exprimé en MCD mocodo.\n",
" \n",
" :param domaine: Le domaine exprimé en MCD mocodo\n",
" :type domaine: str\n",
" \"\"\"\n",
" return mocodo(f\"\"\"\n",
" %mocodo -t mld\n",
" {domaine}\n",
" \"\"\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}