# jerogutiar/python architecture

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

- Interactive diagram: https://gitdiagram.com/jerogutiar/python
- Repository: https://github.com/jerogutiar/python

## Overview

##### Project type and purpose
- This is not a full-stack application or microservice suite, but an educational code repository: a collection of standalone Python exercises (condicionales, bucles, diccionarios, funciones, etc.).
- Each directory groups exercises by date or difficulty (Básico, Intermedio, Avanzado, Moodle), and each exercise is a single Python script (often paired with a testing harness).

##### File structure
- Top-level “buckets” are date-named folders (e.g., 21_04_2025, 22_04_2025, 06_05_2025) and a special “Moodle” folder.
- Inside each date folder, you have either flat scripts (Ejercicio_01.py, etc.) or subfolders (e.g., 06_05_2025/1-exercises1) containing functions.py, testing.py, README.md.
- No databases, no external services, no build/deploy scripts—just source code and minimal markdown documentation.
- A global Enunciados.md provides the problem statements index.

##### README for additional insights
- README defines the pedagogical scope: conditional logic, loops, data structures, functions.
- Execution instructions: clone the repo, cd into a folder, run `python nombre_del_archivo.py`.
- Target environment: Python 3.11+, with an optional virtual environment.

a. Components
- Developer / Student (actor)
- Git remote (GitHub) – source repository
- Local file system (cloned repo) – folder tree with exercise scripts
- Python runtime (3.11+) and optional virtual environment
- Console/Terminal (I/O)
- (Optional) IDE/Text editor for code navigation & debugging
b. Relationships / Data flows
- Developer uses Git to clone/pull from GitHub → Local file system
- Developer opens IDE/Editor and navigates the folder tree → views exercise scripts & READMEs
- Developer invokes Python interpreter → loads .py script → executes logic → outputs to Console
- (If tests present) testing.py imports functions.py → outputs pass/fail results
c. Architectural patterns & design principles
- Modular organization by topic/date
- Separation of concerns: each exercise isolated in its own file (or subfolder for multi-file exercises)
- Single responsibility: each .py focuses on one problem statement
d. Key technologies
- Python 3.11 runtime
- Git (version control)
- Markdown (documentation, Enunciados.md & per-folder READMEs)
- Optional virtual environment (venv)

##### Elements
- Rectangles for each component: GitHub, Local FS, Python Interpreter, IDE, Console.
- GitHub → Local FS (git clone/pull)
- Developer → IDE / Console (edit/run commands)
- IDE → Local FS (open files)
- Console → Python Interpreter (run .py) → outputs back to Console
- Blue rectangles for developer tools (IDE, Console)
- Green for code artifacts (scripts, folders)
- Orange for runtime (Python interpreter, virtual env)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Version Control
    subgraph "Version Control"
        GH["GitHub Remote"]:::remote
    end

    %% Local Repository
    subgraph "Local Repository"    
        Enu["Enunciados.md"]:::docs
        README["readme.md"]:::docs

        subgraph "Date-based Folders"  
            Folder21["21_04_2025/ (many Ejercicio_N.py)"]:::code
            Folder22["22_04_2025/"]:::code
            Folder23["23_04_2025/"]:::code
            Folder24["24_04_2025/"]:::code
        end

        subgraph "Modular Exercises (06_05_2025)"
            subgraph "1-exercises1"
                F1["functions.py"]:::code
                T1["testing.py"]:::code
                R1["README.md"]:::docs
                T1 -->|"imports"| F1
            end
            subgraph "2-exercises2"
                F2["advance_functions.py"]:::code
                T2["testing.py"]:::code
                R2["README.md"]:::docs
                T2 -->|"imports"| F2
            end
            subgraph "3-exercises3"
                F3["functions.py"]:::code
                T3["testing.py"]:::code
                R3["README.md"]:::docs
                T3 -->|"imports"| F3
            end
        end

        subgraph "Difficulty Grouped (13_05_2025)"
            DIR13["13_05_2025/"]:::code
            README13["README.md"]:::docs
        end

        subgraph "Moodle Exercises"
            MoodleDir["Moodle/ (various .py & .md)"]:::code
        end
    end

    %% Development Environment
    subgraph "Development Environment"
        Dev["Developer / Student"]:::actor
        IDE["IDE / Text Editor"]:::tool
        VENV["VirtualEnv (__pycache__...)"]:::runtime
    end

    %% Execution
    subgraph "Execution"
        Console["Console / Terminal"]:::tool
        Py["Python 3.11+ Interpreter"]:::runtime
    end

    %% Relationships
    Dev -->|"git clone/pull"| GH
    GH -->|"cloned repo"| Enu
    Dev -->|"opens"| IDE
    IDE -->|"views files"| Enu
    IDE -->|"navigates"| Folder21
    IDE -->|"navigates"| Folder22
    IDE -->|"navigates"| Folder24
    IDE -->|"navigates"| DIR13
    IDE -->|"opens"| F1
    Dev -->|"activate"| VENV
    Dev -->|"run .py"| Console
    Console -->|"executes"| Py
    Py -->|"loads script"| T1
    Py -->|"loads script"| F1
    Py -->|"outputs"| Console

    %% Click Events
    click Enu "https://github.com/jerogutiar/python/blob/main/Enunciados.md"
    click README "https://github.com/jerogutiar/python/blob/main/readme.md"
    click Folder21 "https://github.com/jerogutiar/python/tree/main/21_04_2025/"
    click Folder22 "https://github.com/jerogutiar/python/tree/main/22_04_2025/"
    click Folder23 "https://github.com/jerogutiar/python/tree/main/23_04_2025/"
    click Folder24 "https://github.com/jerogutiar/python/tree/main/24_04_2025/"
    click F1 "https://github.com/jerogutiar/python/blob/main/06_05_2025/1-exercises1/functions.py"
    click T1 "https://github.com/jerogutiar/python/blob/main/06_05_2025/1-exercises1/testing.py"
    click R1 "https://github.com/jerogutiar/python/blob/main/06_05_2025/1-exercises1/README.md"
    click F2 "https://github.com/jerogutiar/python/blob/main/06_05_2025/2-exercises2/advance_functions.py"
    click T2 "https://github.com/jerogutiar/python/blob/main/06_05_2025/2-exercises2/testing.py"
    click R2 "https://github.com/jerogutiar/python/blob/main/06_05_2025/2-exercises2/README.md"
    click F3 "https://github.com/jerogutiar/python/blob/main/06_05_2025/3-exercises3/functions.py"
    click T3 "https://github.com/jerogutiar/python/blob/main/06_05_2025/3-exercises3/testing.py"
    click R3 "https://github.com/jerogutiar/python/blob/main/06_05_2025/3-exercises3/README.md"
    click README13 "https://github.com/jerogutiar/python/blob/main/13_05_2025/README.md"

    %% Styles
    classDef actor fill:#87CEFA,stroke:#333,stroke-width:1px
    classDef remote fill:#DDA0DD,stroke:#333,stroke-width:1px
    classDef code fill:#98FB98,stroke:#333,stroke-width:1px
    classDef docs fill:#E0FFFF,stroke:#333,stroke-width:1px
    classDef tool fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef runtime fill:#FFA500,stroke:#333,stroke-width:1px
```
