# marcpage/pylavi architecture

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

- Interactive diagram: https://gitdiagram.com/marcpage/pylavi
- Repository: https://github.com/marcpage/pylavi

## Overview

pylavi is a Python LabVIEW VI resource parser and checker. Its main user workflow is to provide VI paths and validation criteria, then receive reported problems and a process status; it also offers a resource-to-JSON assembler. The graph includes file discovery/configuration, resource parsing and decoding, and validation, plus the shared binary data-type layer. Some validation-to-parser call details are outside the excerpts, so those links are marked unverified rather than asserted as observed calls.

Main entry points: [`pylavi/validate.py`](https://github.com/marcpage/pylavi/blob/main/pylavi/validate.py) (Validation Checks), [`pylavi/file.py`](https://github.com/marcpage/pylavi/blob/main/pylavi/file.py) (Resource Loader), [`pylavi/resource_types.py`](https://github.com/marcpage/pylavi/blob/main/pylavi/resource_types.py) (Resource Records), [`pylavi/assembler.py`](https://github.com/marcpage/pylavi/blob/main/pylavi/assembler.py) (JSON Assembler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_validation["VI Validation"]
  node_validate_cli["Validation CLI<br/>[validate.py]"]
  node_file_scan["File Discovery<br/>[validate.py]"]
  node_criteria["Validation Checks<br/>[validate.py]"]
  node_problems["Problem Results<br/>[validate.py]"]
end

subgraph group_resource["Resource Parsing"]
  node_resource_file["Resource Loader<br/>[file.py]"]
  node_resource_records["Resource Records<br/>[resource_types.py]"]
  node_assembler["JSON Assembler<br/>[assembler.py]"]
end

subgraph group_types["Binary Types"]
  node_binary_types["Binary Data Types<br/>[data_types.py]"]
end

node_user(("CLI User"))
node_vi_files["VI Files"]

node_user -->|"sets criteria"| node_validate_cli
node_user -->|"selects files"| node_vi_files
node_vi_files -->|"scans paths"| node_file_scan
node_validate_cli -->|"starts discovery"| node_file_scan
node_file_scan -.->|"checks files"| node_criteria
node_criteria -->|"reports issues"| node_problems
node_criteria -.->|"uses parsed resources"| node_resource_file
node_criteria -->|"decodes records"| node_resource_records
node_resource_file -->|"uses binary types"| node_binary_types
node_resource_records -->|"uses binary types"| node_binary_types
node_user -->|"requests JSON"| node_assembler
node_assembler -->|"loads resources"| node_resource_file

click node_validate_cli "https://github.com/marcpage/pylavi/blob/main/pylavi/validate.py"
click node_file_scan "https://github.com/marcpage/pylavi/blob/main/pylavi/validate.py"
click node_criteria "https://github.com/marcpage/pylavi/blob/main/pylavi/validate.py"
click node_problems "https://github.com/marcpage/pylavi/blob/main/pylavi/validate.py"
click node_resource_file "https://github.com/marcpage/pylavi/blob/main/pylavi/file.py"
click node_resource_records "https://github.com/marcpage/pylavi/blob/main/pylavi/resource_types.py"
click node_assembler "https://github.com/marcpage/pylavi/blob/main/pylavi/assembler.py"
click node_binary_types "https://github.com/marcpage/pylavi/blob/main/pylavi/data_types.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_validate_cli,node_file_scan,node_criteria,node_problems,node_user toneBlue
class node_resource_file,node_resource_records,node_assembler toneAmber
class node_binary_types toneMint
class node_vi_files toneIndigo
```

## Components

### VI Validation

- [Validation CLI](https://github.com/marcpage/pylavi/blob/main/pylavi/validate.py): `pylavi/validate.py`
- [File Discovery](https://github.com/marcpage/pylavi/blob/main/pylavi/validate.py): `pylavi/validate.py`
- [Validation Checks](https://github.com/marcpage/pylavi/blob/main/pylavi/validate.py): `pylavi/validate.py`
- [Problem Results](https://github.com/marcpage/pylavi/blob/main/pylavi/validate.py): `pylavi/validate.py`

### Resource Parsing

- [Resource Loader](https://github.com/marcpage/pylavi/blob/main/pylavi/file.py): `pylavi/file.py`
- [Resource Records](https://github.com/marcpage/pylavi/blob/main/pylavi/resource_types.py): `pylavi/resource_types.py`
- [JSON Assembler](https://github.com/marcpage/pylavi/blob/main/pylavi/assembler.py): `pylavi/assembler.py`

### Binary Types

- [Binary Data Types](https://github.com/marcpage/pylavi/blob/main/pylavi/data_types.py): `pylavi/data_types.py`

### Other components

- **CLI User**
- **VI Files**

## Connections

- CLI User → Validation CLI: sets criteria (evidence: `README.md`)
- CLI User → VI Files: selects files (evidence: `README.md`)
- VI Files → File Discovery: scans paths (evidence: `pylavi/validate.py`)
- Validation CLI → File Discovery: starts discovery (evidence: `pylavi/validate.py`)
- File Discovery → Validation Checks: checks files (evidence: `pylavi/validate.py`)
- Validation Checks → Problem Results: reports issues (evidence: `pylavi/validate.py`)
- Validation Checks → Resource Loader: uses parsed resources (evidence: `pylavi/validate.py`)
- Validation Checks → Resource Records: decodes records (evidence: `pylavi/validate.py`)
- Resource Loader → Binary Data Types: uses binary types (evidence: `pylavi/file.py`)
- Resource Records → Binary Data Types: uses binary types (evidence: `pylavi/resource_types.py`)
- CLI User → JSON Assembler: requests JSON (evidence: `README.md`)
- JSON Assembler → Resource Loader: loads resources (evidence: `pylavi/assembler.py`)
