Metadata-Version: 2.4
Name: py_dvt_ate
Version: 0.1.0
Summary: Coupled Physics DVT Simulation Platform
Author: Kai Chappell
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: numpy>=1.24
Requires-Dist: pandas>=2.0
Requires-Dist: plotly>=5.18
Requires-Dist: pyarrow>=14.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0
Requires-Dist: scipy>=1.11
Requires-Dist: streamlit>=1.28
Requires-Dist: typer>=0.9
Provides-Extra: api
Requires-Dist: fastapi>=0.100; extra == 'api'
Requires-Dist: uvicorn>=0.23; extra == 'api'
Requires-Dist: websockets>=11.0; extra == 'api'
Provides-Extra: dev
Requires-Dist: mypy>=1.0; extra == 'dev'
Requires-Dist: pandas-stubs>=2.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
Provides-Extra: reports
Requires-Dist: jinja2>=3.1; extra == 'reports'
Requires-Dist: weasyprint>=60.0; extra == 'reports'
Description-Content-Type: text/markdown

# py_dvt_ate

**Coupled Physics DVT Simulation Platform**

A software simulation environment for offline development of ATE (Automated Test Equipment) characterisation algorithms. Accurately models thermal-electrical coupling, enabling DVT engineers to develop and validate test sequences without physical laboratory access.

## Overview

py_dvt_ate simulates a complete DVT test bench:

- **Thermal Chamber** - Temperature control with realistic ramp and settling behaviour
- **Programmable Power Supply** - Voltage/current control and measurement
- **Digital Multimeter** - DC voltage measurement with configurable integration time
- **DUT Models** - Device Under Test simulation with thermal-electrical coupling (e.g., LDO voltage regulators)

## Key Features

- **Coupled Physics Simulation** - DUT self-heating affects electrical parameters realistically
- **SCPI Protocol** - Industry-standard commands for instrument control
- **Hardware Abstraction** - Same test code works with simulated or real instruments
- **Multiple Interfaces** - CLI, programmatic API, and Streamlit dashboard
- **Data Persistence** - SQLite for metadata, Parquet for time-series measurements

## Documentation

| Document | Purpose |
|----------|---------|
| [Requirements](docs/01_requirements.md) | Defines **what** the system must do |
| [Technical Specification](docs/02_technical_specification.md) | Specifies **how** to implement the system |
| [Architecture Decisions](docs/03_architecture_decisions.md) | Explains **why** decisions were made |

## Installation

```bash
# Install with development dependencies
pip install -e ".[dev]"
```

## Quick Start

### Interactive Dashboard

Launch the Streamlit dashboard to visualise the physics simulation and run tests:

```bash
py-dvt-ate dashboard
```

This opens a browser window with:
- **Live Simulation** - Real-time temperature/voltage charts with physics coupling
- **Test Execution** - Run TempCo characterisation tests
- **Results Viewer** - Browse and analyse historical test results

### CLI Commands

```bash
# Start the simulation server (TCP ports for SCPI instruments)
py-dvt-ate serve

# List available tests
py-dvt-ate tests list

# Run a TempCo test
py-dvt-ate tests run tempco --config config/tempco_test.yaml
```

### Programmatic API

```python
from py_dvt_ate.instruments import InstrumentFactory
from py_dvt_ate.simulation import SimulationServer

# Start simulation server
server = SimulationServer()
server.start()

# Create instruments via HAL
factory = InstrumentFactory()
instruments = factory.create_from_config("config/default.yaml")

# Control instruments using standard interfaces
instruments.chamber.set_temperature(85.0)
instruments.psu.set_voltage(1, 5.0)
instruments.psu.enable_output(1, True)
voltage = instruments.dmm.measure_dc_voltage()

print(f"Output voltage: {voltage:.4f} V")
```

## Project Status

**Status:** MVP Complete (v0.1.0)

The core vertical slice is functional:
- Physics engine with thermal-electrical coupling
- Virtual instruments (chamber, PSU, DMM)
- Hardware Abstraction Layer
- SCPI-over-TCP server
- Test framework with TempCo test
- Streamlit dashboard
- SQLite/Parquet data persistence

See the requirements document for the full scope and future phases.

## Technology Stack

- **Language:** Python 3.11+
- **Physics:** NumPy, SciPy
- **Configuration:** Pydantic, YAML
- **CLI:** Typer
- **Dashboard:** Streamlit
- **Data:** SQLite, PyArrow (Parquet)

## Author

Kai Chappell

## Licence

Proprietary - All rights reserved. See [LICENSE](LICENSE) for details.
