Skip to content

Commit b49cf0a

Browse files
authored
Merge pull request #35 from SourceCodeOER/replace-figures
Replace figures by forest
2 parents 6afa97f + 4ae99a7 commit b49cf0a

File tree

5 files changed

+143
-13
lines changed

5 files changed

+143
-13
lines changed

commonPreamble.sty

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,23 @@
135135
% Pour les couleurs
136136
\usepackage[dvipsnames]{xcolor}
137137

138+
% Pour générer les arbres
139+
\usepackage[edges]{forest}
140+
141+
% pour les petites icones des dossiers
142+
\definecolor{folderbg}{RGB}{124,166,198}
143+
\definecolor{folderborder}{RGB}{110,144,169}
144+
145+
\def\Size{4pt}
146+
\tikzset{
147+
folder/.pic={
148+
\filldraw[draw=folderborder,top color=folderbg!50,bottom color=folderbg]
149+
(-1.05*\Size,0.2\Size+5pt) rectangle ++(.75*\Size,-0.2\Size-5pt);
150+
\filldraw[draw=folderborder,top color=folderbg!50,bottom color=folderbg]
151+
(-1.15*\Size,-\Size) rectangle (1.15*\Size,\Size);
152+
}
153+
}
154+
138155
% Pour les maudits accents dans listings, vaut mieux prévenir que guérir
139156
% Aussi gérer les lignes trop longues
140157
\lstset{%

sections/chapters/solution/api/index.tex

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,74 @@ \subsection{Structure du projet}
1111

1212
% Généré avec tree sur Windows et https://carbon.now.sh/
1313
\begin{figure}[H]
14-
\includegraphics[width=\textwidth,height=0.25\textheight,keepaspectratio]{images/serveur/tree_folders.png}
1514
\centering
15+
\begin{forest}
16+
for tree={
17+
font=\ttfamily,
18+
grow'=0,
19+
child anchor=west,
20+
parent anchor=south,
21+
anchor=west,
22+
calign=first,
23+
inner xsep=7pt,
24+
edge path={
25+
\noexpand\path [draw, \forestoption{edge}]
26+
(!u.south west) +(7.5pt,0) |- (.child anchor) pic {folder} \forestoption{edge label};
27+
},
28+
% style for your file node
29+
file/.style={edge path={\noexpand\path [draw, \forestoption{edge}]
30+
(!u.south west) +(7.5pt,0) |- (.child anchor) \forestoption{edge label};},
31+
inner xsep=2pt,font=\small\ttfamily
32+
},
33+
before typesetting nodes={
34+
if n=1
35+
{insert before={[,phantom]}}
36+
{}
37+
},
38+
fit=band,
39+
before computing xy={l=15pt},
40+
}
41+
[sourcecode\textunderscore api
42+
[.github
43+
]
44+
[bin
45+
]
46+
[config
47+
]
48+
[controllers
49+
]
50+
[docs
51+
]
52+
[files
53+
]
54+
[middlewares
55+
]
56+
[migrations
57+
]
58+
[models
59+
]
60+
[openapi
61+
]
62+
[tests
63+
]
64+
[app.js,file
65+
]
66+
[app.yml,file
67+
]
68+
]
69+
\end{forest}
1670
\caption[SourceCode : Arborescence de l'API]{Arborescence de l'\Gls{api}}
1771
\label{fig:arborenceAPI}
1872
\end{figure}
1973

2074
Cette structure ne vous est peut-être pas inconnue, car il s'agit de la structure officielle de Sequelize\footnote{
2175
\url{https://github.com/sequelize/cli} - commande "sequelize init"
22-
}, sur laquelle nous avons ajouté quelques dossiers :
76+
}, sur laquelle nous avons ajouté quelques dossiers et fichiers :
2377

2478
% A voir s'il faut minimiser l'itemize
2579
% nosep,noitemsep,topsep=0pt,partopsep=0pt,after=\vspace*{2pt}
26-
\begin{itemize}
27-
\item openapi : nos fichiers \Gls{oas}, utilisés par OpenAPI-Enforcer (cf. figure \ref{fig:OASEnforcer})
80+
\begin{itemize}[nosep,noitemsep,topsep=0pt,partopsep=0pt,after=\vspace*{2pt}]
81+
\item openapi : nos fichiers \Gls{oas}, utilisés par OpenAPI-Enforcer (cf. figure \ref{fig:OASEnforcer}) (le point d'entrée principal étant app.yml)
2882
\item controllers : nos fichiers chargés de répondre aux requêtes \textbf{HTTP}, utilisés par OpenAPI-Enforcer (cf. figure \ref{fig:OASEnforcer})
2983
\item tests : nos tests pour valider l'implémentation (cf. section \ref{section:validation})
3084
\item docs : la documentation de l'\Gls{api} en \textbf{HTML}\footnote{
@@ -36,6 +90,7 @@ \subsection{Structure du projet}
3690
\item upload / files : resp. lieu de stockage des fichiers importés / stockés
3791
\item .github : nos scripts d'automatisation de type Github Actions (cf. section \ref{section:GithubActions})
3892
\item bin : du code n'entrant dans aucun autre dossier
93+
\item app.js : le point d'entrée principal de l'\Gls{api}, construite sur Express (cf. section \ref{section:choixTechnologiques})
3994
\end{itemize}
4095

4196
\pagebreak

sections/chapters/solution/client/index.tex

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,20 @@ \section{Client}
88
Afin de vous donner une idée plus claire de ce qui va être abordé, voici une représentation du groupe d'URL de premier niveau que contient \texttt{SourceCode}.\\
99

1010
\begin{figure}[H]
11-
\includegraphics[width=\textwidth,height=0.15\textheight,keepaspectratio]{images/client/overview_client.jpeg}
1211
\centering
12+
\begin{forest}
13+
highlight/.style={fill=cyan,fill opacity=0.4,rounded corners},
14+
forked edges,
15+
for tree={folder,grow'=0,font=\ttfamily, inner sep = 1pt, outer sep = 0pt}
16+
[/
17+
[login,highlight]
18+
[register,highlight]
19+
[exercices/]
20+
[gestion/]
21+
[administration/]
22+
[tutoriel]
23+
]
24+
\end{forest}
1325
\caption[SourceCode : Représentation des URL de premier niveau]{URL de premier niveau}
1426
\end{figure}
1527

@@ -62,8 +74,16 @@ \subsection{Exercices}
6274
La bibliothèque constitue l'élément central de \texttt{SourceCode} pour le partage de ressources. C'est dans cet espace que les \glspl{resinfo} validées par la communauté apparaitront.\\
6375

6476
\begin{figure}[H]
65-
\includegraphics[width=\textwidth,height=0.08\textheight,keepaspectratio]{images/client/exercices.jpeg}
6677
\centering
78+
\begin{forest}
79+
highlight/.style={fill=cyan,fill opacity=0.4,rounded corners},
80+
forked edges,
81+
for tree={folder,grow'=0,font=\ttfamily}
82+
[exercices/
83+
[/,highlight]
84+
[\textunderscore id/,highlight]
85+
]
86+
\end{forest}
6787
\caption[SourceCode : partie bibliothèque]{Partie bibliothèque (URL)}
6888
\end{figure}
6989

@@ -192,8 +212,25 @@ \subsection{Gestion}
192212
Ce module est accessible aux utilisateurs (possédant un compte) et aux administrateurs.
193213

194214
\begin{figure}[H]
195-
\includegraphics[width=\textwidth,height=0.2\textheight,keepaspectratio]{images/client/gestion.jpeg}
196215
\centering
216+
\begin{forest}
217+
highlight/.style={fill=cyan,fill opacity=0.4,rounded corners},
218+
forked edges,
219+
for tree={folder,grow'=0,font=\ttfamily, inner sep = 1pt, outer sep = 0pt}
220+
[gestion/
221+
[mes-exercices,
222+
[/,highlight]
223+
[creer-exercice,highlight]
224+
[\textunderscore id/,highlight]
225+
]
226+
[mes-favoris/,
227+
[/,highlight]
228+
[creer-favori,highlight]
229+
[\textunderscore id/,highlight]
230+
]
231+
[profil,highlight]
232+
]
233+
\end{forest}
197234
\caption[SourceCode : module de gestion (URL)]{Module de gestion (URL)}
198235
\end{figure}
199236

@@ -364,7 +401,7 @@ \subsection{Administration}
364401

365402
Le module d'administration comprend :
366403

367-
\begin{itemize}
404+
\begin{itemize}[nosep,noitemsep,topsep=0pt,partopsep=0pt,after=\vspace*{2pt}]
368405
\item La gestion des \glspl{resinfo} (\textit{exercices/})
369406
\item L'importation de \glspl{resinfo} (\textit{importer-des-exercices})
370407
\item La gestion des \glspl{tag} (\textit{tags/})
@@ -375,8 +412,30 @@ \subsection{Administration}
375412
Ce module est uniquement accessible aux (super-)administrateurs.
376413

377414
\begin{figure}[H]
378-
\includegraphics[width=\textwidth,height=0.25\textheight,keepaspectratio]{images/client/administration.jpeg}
379415
\centering
416+
\begin{forest}
417+
highlight/.style={fill=cyan,fill opacity=0.4,rounded corners},
418+
for tree={grow'=0,font=\ttfamily,inner sep = 1pt, outer sep = 3pt}
419+
[administration/
420+
[exercices/
421+
[/,highlight]
422+
[creer-exercice/,highlight]
423+
[\textunderscore id/,highlight]
424+
]
425+
[tags/
426+
[/,highlight]
427+
[creer-tag,highlight]
428+
[\textunderscore id/,highlight]
429+
]
430+
[categories/
431+
[/,highlight]
432+
[creer-categorie,highlight]
433+
[\textunderscore id/,highlight]
434+
]
435+
[utilisateurs,highlight]
436+
[importer-des-exercices,highlight]
437+
]
438+
\end{forest}
380439
\caption[SourceCode : partie administration (URL)]{Partie administration (URL)}
381440
\end{figure}
382441

sections/remerciements.tex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
\chapter*{Remerciements}
2-
\addcontentsline{toc}{chapter}{Remerciements}
32

43
Le présent travail est le fruit de la collaboration d'une multitude de personnes que nous souhaiterions chaleureusement remercier : \\
54

structure.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
% ./ si folder courant
88
%\import{folder}{fichier.tex}
99

10+
% Remerciements ( Un classique )
11+
\import{sections/}{remerciements}
12+
1013
% Numérotation en chiffres romains ( I , II )
1114
\frontmatter
1215

@@ -22,9 +25,6 @@
2225
%\glsaddall
2326
\printglossary
2427

25-
% Remerciements ( Un classique )
26-
\import{sections/}{remerciements}
27-
2828
% Le Préambule
2929
\import{sections/}{preambule}
3030

0 commit comments

Comments
 (0)