# batistadaniel/concurso-ti-bb architecture

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

- Interactive diagram: https://gitdiagram.com/batistadaniel/concurso-ti-bb
- Repository: https://github.com/batistadaniel/concurso-ti-bb

## Overview

##### Project Type and Purpose
- This is a single‐module, command‐line/Colab Python application.
- Purpose: ingest raw contest results (manually pasted), parse and classify candidates, and present tabular outputs (overall ranking and cutoffs by category).

##### Main Components
a. Data Source
- Static PDF files in “ANALISE DOS RESULTADOS PDF’s/” (Classificados BB TI 21 DOU.pdf, etc.).
- In practice, data are copied manually from these PDFs into a string constant in the code.
b. Data Ingestion
- User‐driven “Paste PDF data” step.
- Variable `dados` inside app.py.
c. Processing Module
- Class `ResultadoFinal` in app.py.
- Methods:
» resultado_final(): sorts and displays full ranking.
» ultima_pessoa_sem_cota(), ultima_pessoa_cota_pcd(), ultima_pessoa_cota_ppp(): compute cutoffs.
d. Output
- Console/table output in local terminal or interactive Colab notebook.
- Formatted as markdown‐style tables.
e. Execution Environment
- Python runtime (local or Google Colab).
- Optional libraries: none external (everything is pure Python).

##### Relationships and Data Flows
- PDF Files → (manual copy) → Data Ingestion step (`dados` variable).
- `dados` → ResultadoFinal (constructor).
- ResultadoFinal → parsing routines → in‐memory data structures (lists of candidates).
- Processing → sorted lists and cutoff rules.
- Processed data → console/Colab output (tabular display).

##### Architectural Patterns / Design Principles
- Single‐class core logic: keeps parsing and business rules encapsulated.
- Manual ETL (Extract/Transform/Load) step due to simplicity.
- Clear separation of concerns between ingestion, processing, and presentation.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "PDF Repository"
        PDFRepo[(“PDF Repository”)]:::datastore
        File1["Classificados BB TI 21 DOU.pdf"]:::datastore
        File2["Classificados BB TI 22 DOU.pdf"]:::datastore
        File3["Reserva BB TI 21 DOU.pdf"]:::datastore
        File4["Reserva BB TI 22 DOU.pdf"]:::datastore
    end

    User["User: Copy & Paste Data (dados)"]:::user
    PDFRepo --> User
    File1 --> User
    File2 --> User
    File3 --> User
    File4 --> User

    App["app.py: ResultadoFinal Class"]:::code
    User --> App

    Runtime(["Python Runtime / Google Colab"]):::runtime
    App --> Runtime

    Output["Console / Table Output"]:::output
    App --> Output

    %% Click Events
    click PDFRepo "https://github.com/batistadaniel/concurso-ti-bb/tree/main/ANALISE DOS RESULTADOS PDF's/"
    click File1 "https://github.com/batistadaniel/concurso-ti-bb/blob/main/ANALISE DOS RESULTADOS PDF's/Classificados BB TI 21 DOU.pdf"
    click File2 "https://github.com/batistadaniel/concurso-ti-bb/blob/main/ANALISE DOS RESULTADOS PDF's/Classificados BB TI 22 DOU.pdf"
    click File3 "https://github.com/batistadaniel/concurso-ti-bb/blob/main/ANALISE DOS RESULTADOS PDF's/Reserva BB TI 21 DOU.pdf"
    click File4 "https://github.com/batistadaniel/concurso-ti-bb/blob/main/ANALISE DOS RESULTADOS PDF's/Reserva BB TI 22 DOU.pdf"
    click App "https://github.com/batistadaniel/concurso-ti-bb/blob/main/app.py"
    click README "https://github.com/batistadaniel/concurso-ti-bb/blob/main/README.md"

    %% Styles
    classDef datastore fill:#9f6,stroke:#333,stroke-width:1px
    classDef code fill:#6cf,stroke:#333,stroke-width:1px
    classDef runtime fill:#ccc,stroke:#333,stroke-width:1px
    classDef output fill:#f96,stroke:#333,stroke-width:1px
    classDef user fill:#fc9,stroke:#333,stroke-width:1px
```
