# shreyas5080/student-analysis architecture

> Architecture diagram of the GitHub repository shreyas5080/student-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shreyas5080/student-analysis
- Repository: https://github.com/shreyas5080/student-analysis

## Overview

This is a small command-line student performance analytics application. The workflow starts at `main.py`, loads and validates the CSV, computes per-student and class results, then prints a report. Validation is the key internal quality layer; analysis also applies the grading rule and derives subject summaries and top performers. The graph preserves those distinct responsibilities without treating helper functions as separate pipeline stages. Relationships are based on the shown source and README; the sample CSV’s contents were not inspected.

Main entry points: [`functions.py`](https://github.com/shreyas5080/student-analysis/blob/main/functions.py) (Analyze students), [`main.py`](https://github.com/shreyas5080/student-analysis/blob/main/main.py) (Run analysis), [`students.csv`](https://github.com/shreyas5080/student-analysis/blob/main/students.csv) (Student records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Analysis runtime"]
  node_entry["Run analysis<br/>[main.py]"]
  node_loader["Load CSV<br/>[functions.py]"]
  node_validation["Validate records<br/>[functions.py]"]
  node_analysis["Analyze students<br/>[functions.py]"]
  node_grading["Grade and pass rules<br/>[functions.py]"]
  node_subjects["Subject averages<br/>[functions.py]"]
  node_classresults["Class stats and leaders<br/>[functions.py]"]
  node_display["Format report<br/>[main.py]"]
end

subgraph group_data["Input data"]
  node_dataset["Student records<br/>[students.csv]"]
end

node_user(("User"))
node_terminal(("Console"))

node_user -->|"runs"| node_entry
node_entry -->|"calls"| node_loader
node_dataset -->|"CSV input"| node_loader
node_loader -->|"validates"| node_validation
node_entry -->|"calls"| node_analysis
node_analysis -->|"validates"| node_validation
node_analysis -->|"applies rules"| node_grading
node_analysis -->|"computes"| node_subjects
node_analysis -->|"computes"| node_classresults
node_entry -->|"passes results"| node_display
node_display -->|"prints report"| node_terminal

click node_entry "https://github.com/shreyas5080/student-analysis/blob/main/main.py"
click node_dataset "https://github.com/shreyas5080/student-analysis/blob/main/students.csv"
click node_loader "https://github.com/shreyas5080/student-analysis/blob/main/functions.py"
click node_validation "https://github.com/shreyas5080/student-analysis/blob/main/functions.py"
click node_analysis "https://github.com/shreyas5080/student-analysis/blob/main/functions.py"
click node_grading "https://github.com/shreyas5080/student-analysis/blob/main/functions.py"
click node_subjects "https://github.com/shreyas5080/student-analysis/blob/main/functions.py"
click node_classresults "https://github.com/shreyas5080/student-analysis/blob/main/functions.py"
click node_display "https://github.com/shreyas5080/student-analysis/blob/main/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_loader,node_validation,node_analysis,node_grading,node_subjects,node_classresults,node_display,node_user toneBlue
class node_dataset toneAmber
class node_terminal toneIndigo
```

## Components

### Analysis runtime

- [Run analysis](https://github.com/shreyas5080/student-analysis/blob/main/main.py): `main.py`
- [Load CSV](https://github.com/shreyas5080/student-analysis/blob/main/functions.py): `functions.py`
- [Validate records](https://github.com/shreyas5080/student-analysis/blob/main/functions.py): `functions.py`
- [Analyze students](https://github.com/shreyas5080/student-analysis/blob/main/functions.py): `functions.py`
- [Grade and pass rules](https://github.com/shreyas5080/student-analysis/blob/main/functions.py): `functions.py`
- [Subject averages](https://github.com/shreyas5080/student-analysis/blob/main/functions.py): `functions.py`
- [Class stats and leaders](https://github.com/shreyas5080/student-analysis/blob/main/functions.py): `functions.py`
- [Format report](https://github.com/shreyas5080/student-analysis/blob/main/main.py): `main.py`

### Input data

- [Student records](https://github.com/shreyas5080/student-analysis/blob/main/students.csv): `students.csv`

### Other components

- **User**
- **Console**

## Connections

- User → Run analysis: runs (evidence: `README.md`)
- Run analysis → Load CSV: calls (evidence: `main.py`)
- Student records → Load CSV: CSV input (evidence: `functions.py`)
- Load CSV → Validate records: validates (evidence: `functions.py`)
- Run analysis → Analyze students: calls (evidence: `main.py`)
- Analyze students → Validate records: validates (evidence: `functions.py`)
- Analyze students → Grade and pass rules: applies rules (evidence: `functions.py`)
- Analyze students → Subject averages: computes (evidence: `functions.py`)
- Analyze students → Class stats and leaders: computes (evidence: `functions.py`)
- Run analysis → Format report: passes results (evidence: `main.py`)
- Format report → Console: prints report (evidence: `main.py`)
