# lukfor/nft-csv architecture

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

- Interactive diagram: https://gitdiagram.com/lukfor/nft-csv
- Repository: https://github.com/lukfor/nft-csv

## Overview

##### Component Relationships

- User Input → PathExtension (CSV file paths and options)
- PathExtension → TableWrapperBuilder (creation flow)
- TableWrapperBuilder → TableWrapper (instantiation)
- TableWrapper ↔ Tablesaw (data processing)
- TableComparator ← TableWrapper (comparison operations)

##### Implementation Details

Notes showing important implementation aspects:
- Configuration options
- Precision handling for number comparisons
- Column/row manipulation capabilities
- GZIP support

##### Integration Points

Integration with nf-test:
- Plugin registration point
- Path extension mechanism
- Test assertion integration

Key Considerations:
- Keep the main components (TableWrapper, PathExtension) prominent
- Clear boundaries between plugin code and external dependencies
- Extension nature of the project

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef core fill:#a8d1f0,stroke:#333
    classDef extension fill:#90EE90,stroke:#333
    classDef utility fill:#FFE5B4,stroke:#333
    classDef external fill:#E0E0E0,stroke:#333
    classDef config fill:#FFE5B4,stroke:#333,stroke-dasharray: 5 5

    %% External Dependencies Layer
    subgraph Dependencies
        NFTest["nf-test Framework"]:::external
        Tablesaw["Tablesaw Library"]:::external
    end

    %% Extension Layer
    subgraph Extension
        PathExt["PathExtension"]:::extension
        PluginReg["Plugin Registration"]:::extension
    end

    %% Core Components Layer
    subgraph Core
        TableWrapper["TableWrapper"]:::core
        TableBuilder["TableWrapperBuilder"]:::core
        Methods["Methods"]:::utility
        TableComp["TableComparator"]:::utility
    end

    %% Configuration Options
    subgraph Config
        CSVOpts["CSV Options"]:::config
        Operations["Table Operations"]:::config
    end

    %% Relationships
    PathExt --> TableBuilder
    TableBuilder --> TableWrapper
    TableWrapper <--> Tablesaw
    TableWrapper --> TableComp
    Methods --> TableWrapper
    PathExt --> NFTest
    PluginReg --> NFTest
    CSVOpts --> TableBuilder
    Operations --> TableWrapper

    %% Configuration Details
    CSVOpts --> |"sep, quote,<br/>header, decompress"| TableBuilder
    Operations --> |"sort, sortRows,<br/>sortColumns"| TableWrapper

    %% Click Events
    click TableWrapper "https://github.com/lukfor/nft-csv/blob/main/src/main/java/lukfor/nf/test/csv/TableWrapper.java"
    click TableBuilder "https://github.com/lukfor/nft-csv/blob/main/src/main/java/lukfor/nf/test/csv/TableWrapperBuilder.java"
    click Methods "https://github.com/lukfor/nft-csv/blob/main/src/main/java/lukfor/nf/test/csv/Methods.java"
    click TableComp "https://github.com/lukfor/nft-csv/blob/main/src/main/java/lukfor/nf/test/csv/TableComparator.java"
    click PathExt "https://github.com/lukfor/nft-csv/blob/main/src/main/java/lukfor/nf/test/csv/PathExtension.java"
    click PluginReg "https://github.com/lukfor/nft-csv/tree/main/src/main/resources/META-INF/nf-test-plugin"

    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["Extension Points"]:::extension
        L3["Utility Components"]:::utility
        L4["External Dependencies"]:::external
    end
```
