# andrerh09/proyecto2 architecture

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

- Interactive diagram: https://gitdiagram.com/andrerh09/proyecto2
- Repository: https://github.com/andrerh09/proyecto2

## Overview

##### Project type and purpose
- Hybrid tool combining a Java‐based PDF/Invoice testing automation suite (PAutoMat_Actions) and a Python desktop dashboard for software quality metrics (dashboard_calidad).

##### Main components
A. Java Automation (PAutoMat_Actions)
- Page Object Model: pages/, utils/
- Test suite: src/test/java (JUnit, Selenium + chromedriver)
- Resources: ImageTester JAR, test PDFs, properties
- Build: Maven (pom.xml), target jar, JaCoCo coverage
- CI: GitHub workflows (ci, nightly, release, security‐scan)
B. Python Dashboard (dashboard_calidad)
- Parsers: jacoco_parser.py, junit_parser.py
- Metrics: performance, reliability, maintainability, quality_rating
- UI: PyQt or Tk widgets (charts.py, main_window.py, widgets.py), CSS assets
- Packaging: build/dashboard_calidad.spec, requirements.txt

##### Interactions and data flow
1. Java tests run (locally or CI) → generate JUnit XML & JaCoCo coverage XML → output under target/ and surefire-reports
2. Python dashboard reads those XML files via parsers → computes metrics → renders interactive charts in UI

##### Architectural highlights
- Clear separation: Test executor vs. Metrics dashboard
- Reusable parsing → modular metrics calculation → pluggable UI
- CI automation validates tests, security, nightly builds

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Java Automation Subsystem
    subgraph "Java Automation" 
        direction TB
        JA_Project["PAutoMat_Actions"]:::javaComponent
        CI["GitHub Workflows"]:::process
        Build["Maven Build (pom.xml)"]:::process
        POM["Page Object Model (pages/)"]:::javaComponent
        Utils["Utilities (FileUtils.java)"]:::javaComponent
        Tests["Test Suite (JUnit + Selenium)"]:::javaComponent
        Resources["Resources (ImageTester JAR, PDFs, chromedriver, properties)"]:::javaComponent
        Outputs_JUnit["Surefire JUnit XML Reports"]:::output
        Outputs_JaCoCo["JaCoCo Coverage XML & HTML"]:::output

        JA_Project -->|contains| CI
        JA_Project -->|contains| Build
        JA_Project -->|contains| POM
        JA_Project -->|contains| Utils
        JA_Project -->|contains| Tests
        JA_Project -->|contains| Resources
        Build -->|"runs tests"| Tests
        Build -->|"generates"| Outputs_JUnit
        Build -->|"generates"| Outputs_JaCoCo
    end

    %% Python Dashboard Subsystem
    subgraph "Python Dashboard" 
        direction TB
        PY_Project["dashboard_calidad"]:::pythonComponent
        Entry["Entry Point (main.py)"]:::pythonComponent
        Parsers["Parsers (jacoco_parser.py, junit_parser.py)"]:::pythonComponent
        Metrics["Metrics Modules"]:::process
        UI["UI Components (charts.py, main_window.py, widgets.py)"]:::pythonComponent
        Styles["CSS Assets"]:::pythonComponent

        PY_Project -->|contains| Entry
        PY_Project -->|contains| Parsers
        PY_Project -->|contains| Metrics
        PY_Project -->|contains| UI
        PY_Project -->|contains| Styles
        Outputs_JUnit -->|input| Parsers
        Outputs_JaCoCo -->|input| Parsers
        Parsers -->|compute| Metrics
        Metrics -->|render| UI
    end

    %% Legend
    subgraph "Legend"
        direction TB
        JC["Java Components"]:::javaComponent
        PC["Python Components"]:::pythonComponent
        PR["Processes"]:::process
        OP["Outputs"]:::output
    end

    %% Click Events
    click JA_Project "https://github.com/andrerh09/proyecto2/tree/master/PAutoMat_Actions/"
    click CI "https://github.com/andrerh09/proyecto2/tree/master/PAutoMat_Actions/.github/workflows/"
    click Build "https://github.com/andrerh09/proyecto2/blob/master/PAutoMat_Actions/pom.xml"
    click POM "https://github.com/andrerh09/proyecto2/tree/master/PAutoMat_Actions/src/main/java/pages/"
    click Utils "https://github.com/andrerh09/proyecto2/blob/master/PAutoMat_Actions/src/main/java/utils/FileUtils.java"
    click Tests "https://github.com/andrerh09/proyecto2/tree/master/PAutoMat_Actions/src/test/java/"
    click Resources "https://github.com/andrerh09/proyecto2/tree/master/PAutoMat_Actions/resources/"
    click Outputs_JUnit "https://github.com/andrerh09/proyecto2/tree/master/PAutoMat_Actions/target/surefire-reports/"
    click Outputs_JaCoCo "https://github.com/andrerh09/proyecto2/tree/master/PAutoMat_Actions/target/"

    click Entry "https://github.com/andrerh09/proyecto2/blob/master/dashboard_calidad/main.py"
    click Parsers "https://github.com/andrerh09/proyecto2/blob/master/dashboard_calidad/parsers/jacoco_parser.py"
    click Metrics "https://github.com/andrerh09/proyecto2/blob/master/dashboard_calidad/metrics/performance_metrics.py"
    click UI "https://github.com/andrerh09/proyecto2/blob/master/dashboard_calidad/ui/charts.py"
    click Styles "https://github.com/andrerh09/proyecto2/blob/master/dashboard_calidad/assets/styles.css"
    
    %% Styles
    classDef javaComponent fill:#AED6F1,stroke:#1B4F72,color:#1B2631
    classDef pythonComponent fill:#A9DFBF,stroke:#145A32,color:#1B2631
    classDef process fill:#E59866,stroke:#A04000,color:#1B2631
    classDef output fill:#82E0AA,stroke:#1D8348,color:#1B2631
```
