# r4ph3uz/ensimag architecture

> Architecture diagram of the GitHub repository r4ph3uz/ensimag, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/r4ph3uz/ensimag
- Repository: https://github.com/r4ph3uz/ensimag

## Overview

##### Project type and purpose
- This is not a single application or service but a “monorepo” of student Travaux Pratiques (TPs) for ENSIMAG courses.
- Its purpose is purely educational: to group multiple subject‐based labs (Algo, CEP, PLC, Archi, TL1, Proba, Unix puzzles, etc.), each containing source code, tests, scripts, configs, and resources.

##### File structure
- At the top level you have directories named after courses or topics:
- Algo, CEP, PLC, Archi, TL1, Proba, Jeu-de-piste-UNIX-avancé, etc.
- Each of these splits into subdirectories per lab or TP. For instance:
- Algo/programme-de-test-guillaume-raffin contains Python scripts (`generate.py`, `run_tests.py`), a `pat/` package (generators, geo library, tests), handmade test data, and utilities in `scripts/`.
- Algo/projet-algo-2024 contains generation code, geometric primitives, test data, and a main driver.
- CEP/TP1, CEP/TP2, … hold assembly, C code, Makefiles, linker scripts, test benches.
- You also see configuration files (`requirements.txt`), scripts (`run_tests.py`), and resource folders (`img/`).

##### README
- Confirms it’s a repository of TPs organized by subject, each with solutions and extra resources (slides, notes).

##### Be detailed but not over‐complicated
- Break each TP into its three logical components.
- That there is no inter‐TP dependency—each is independent.
- Essential elements: code, build/test, data—across all subjects.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "ENSIMAG-TP Monorepo"
        subgraph "Algo"
            subgraph "programme-de-test-guillaume-raffin"
                Code1["Source Code (pat)"]:::code
                Build1["Build/Test"]:::build
                Scripts1["Utilities/Scripts"]:::build
                Data1["Test Data/Resources"]:::testdata
                Build1 -->|builds| Code1
                Build1 -->|runs tests on| Data1
                Build1 -->|uses| Scripts1
            end
            subgraph "projet-algo-2024"
                Code2["Source Code"]:::code
                Build2["Build/Test"]:::build
                Data2["Test Data/Resources"]:::testdata
                Build2 -->|builds| Code2
                Build2 -->|runs tests on| Data2
            end
        end
        subgraph "Archi"
            subgraph "TP1"
                CodeA1["RTL Source Code"]:::code
                BuildA1["Orchestrator"]:::build
                TB1["Test Benches"]:::testdata
                BuildA1 -->|runs| CodeA1
                BuildA1 -->|simulates| TB1
            end
            subgraph "TP2"
                CodeA2["RTL Source Code"]:::code
                BuildA2["Orchestrator"]:::build
                TB2["Test Benches"]:::testdata
                BuildA2 -->|runs| CodeA2
                BuildA2 -->|simulates| TB2
            end
        end
        subgraph "CEP"
            subgraph "TP1"
                CodeC1["Source Code & Assembly"]:::code
                BuildC1["Build/Test"]:::build
                DataC1["Test Data/Resources"]:::testdata
                BuildC1 -->|builds| CodeC1
                BuildC1 -->|tests| DataC1
            end
            subgraph "TP2"
                CodeC2["Source Code & Assembly"]:::code
                BuildC2["Build/Test"]:::build
                DataC2["Test Data/Resources"]:::testdata
                BuildC2 -->|builds| CodeC2
                BuildC2 -->|tests| DataC2
            end
        end
        subgraph "PLC"
            subgraph "kdtree"
                CodeP1["Source Code"]:::code
                BuildP1["Build/Test"]:::build
                DataP1["Test Data/Resources"]:::testdata
                BuildP1 -->|builds| CodeP1
                BuildP1 -->|tests| DataP1
            end
            subgraph "canard"
                CodeP2["Source Code"]:::code
                BuildP2["Build/Test"]:::build
                DataP2["Resources"]:::testdata
                BuildP2 -->|builds| CodeP2
                BuildP2 -->|uses| DataP2
            end
        end
        subgraph "Jeu-de-piste-UNIX-avance"
            subgraph "TP1"
                CodeU["Scripts/Binaries"]:::code
                BuildU["Orchestrator"]:::build
                DataU["Test Data/Resources"]:::testdata
                BuildU -->|executes| CodeU
                BuildU -->|validates| DataU
            end
        end
        subgraph "TL1"
            subgraph "TPCalcPython"
                CodeT["Source Code"]:::code
                BuildT["Build/Test"]:::build
                DataT["Definitions/Resources"]:::testdata
                BuildT -->|runs| CodeT
                BuildT -->|uses| DataT
            end
        end
        subgraph "Proba"
            DataPr["Resource Files"]:::testdata
        end
    end

    click Code1 "https://github.com/r4ph3uz/ensimag/tree/main//Algo/programme-de-test-guillaume-raffin/pat"
    click Build1 "https://github.com/r4ph3uz/ensimag/blob/main//Algo/programme-de-test-guillaume-raffin/generate.py"
    click Scripts1 "https://github.com/r4ph3uz/ensimag/tree/main//Algo/programme-de-test-guillaume-raffin/scripts"
    click Data1 "https://github.com/r4ph3uz/ensimag/tree/main//Algo/programme-de-test-guillaume-raffin/handmade-tests"
    click Code2 "https://github.com/r4ph3uz/ensimag/tree/main//Algo/projet-algo-2024/geo"
    click Build2 "https://github.com/r4ph3uz/ensimag/blob/main//Algo/projet-algo-2024/test_temps.py"
    click Data2 "https://github.com/r4ph3uz/ensimag/tree/main//Algo/projet-algo-2024/tests"
    click CodeA1 "https://github.com/r4ph3uz/ensimag/tree/main//Archi/TP1"
    click TB1 "https://github.com/r4ph3uz/ensimag/blob/main//Archi/TP1/tb_*.vhd"
    click CodeA2 "https://github.com/r4ph3uz/ensimag/tree/main//Archi/TP2"
    click TB2 "https://github.com/r4ph3uz/ensimag/blob/main//Archi/TP2/tb_VGA.vhd"
    click CodeC1 "https://github.com/r4ph3uz/ensimag/tree/main//CEP/TP/tp1"
    click BuildC1 "https://github.com/r4ph3uz/ensimag/tree/main//CEP/TP/tp1/Makefile"
    click DataC1 "https://github.com/r4ph3uz/ensimag/tree/main//CEP/TP/tp1/test"
    click CodeC2 "https://github.com/r4ph3uz/ensimag/tree/main//CEP/TP/tp2"
    click BuildC2 "https://github.com/r4ph3uz/ensimag/tree/main//CEP/TP/tp2/Makefile"
    click DataC2 "https://github.com/r4ph3uz/ensimag/tree/main//CEP/TP/tp2/test"
    click CodeP1 "https://github.com/r4ph3uz/ensimag/tree/main//PLC/exo/avance/TPs/kdtree/src"
    click BuildP1 "https://github.com/r4ph3uz/ensimag/tree/main//PLC/exo/avance/TPs/kdtree/Makefile"
    click DataP1 "https://github.com/r4ph3uz/ensimag/tree/main//PLC/exo/avance/TPs/kdtree/test_pictures"
    click CodeP2 "https://github.com/r4ph3uz/ensimag/tree/main//PLC/exo/avance/TPs/canard"
    click BuildP2 "https://github.com/r4ph3uz/ensimag/tree/main//PLC/exo/avance/TPs/canard/Makefile"
    click DataP2 "https://github.com/r4ph3uz/ensimag/blob/main//PLC/exo/avance/TPs/canard/maillages.tar.gz"
    click CodeU "https://github.com/r4ph3uz/ensimag/tree/main//Jeu-de-piste-UNIX-avance/tp1"
    click BuildU "https://github.com/r4ph3uz/ensimag/blob/main//Jeu-de-piste-UNIX-avance/tp1/tp_pas_a_pas.sh"
    click DataU "https://github.com/r4ph3uz/ensimag/tree/main//Jeu-de-piste-UNIX-avance/tp1/dir1"
    click CodeT "https://github.com/r4ph3uz/ensimag/tree/main//TL1/TPCalcPython"
    click BuildT "https://github.com/r4ph3uz/ensimag/blob/main//TL1/TPCalcPython/test_calc.py"
    click DataT "https://github.com/r4ph3uz/ensimag/blob/main//TL1/TPCalcPython/tokenDEF.py"
    click DataPr "https://github.com/r4ph3uz/ensimag/blob/main//Proba/Test-0.md"

    classDef code fill:#c8e6c9,stroke:#2e7d32;
    classDef build fill:#bbdefb,stroke:#1565c0;
    classDef testdata fill:#ffe0b2,stroke:#e65100;
```
