Metadata-Version: 2.4
Name: cuvis-ai-schemas
Version: 0.1.2
Summary: Lightweight schema definitions for cuvis-ai ecosystem
Author-email: "Cubert GmbH, Ulm, Germany" <SDK@cubert-gmbh.com>
License: Apache-2.0
Project-URL: Homepage, https://www.cubert-hyperspectral.com/
Project-URL: Repository, https://github.com/cubert-hyperspectral/cuvis-ai-schemas
Project-URL: Documentation, https://cubert-hyperspectral.github.io/cuvis-ai-schemas/
Project-URL: Issues, https://github.com/cubert-hyperspectral/cuvis-ai-schemas/issues
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <3.12,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic<3.0.0,>=2.0.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: proto
Requires-Dist: grpcio>=1.56.0; extra == "proto"
Requires-Dist: protobuf>=4.25.0; extra == "proto"
Requires-Dist: grpcio-tools>=1.56.0; extra == "proto"
Provides-Extra: torch
Requires-Dist: torch>=2.0.0; extra == "torch"
Requires-Dist: torchvision; extra == "torch"
Provides-Extra: numpy
Requires-Dist: numpy>=1.21.0; extra == "numpy"
Provides-Extra: lightning
Requires-Dist: pytorch-lightning>=2.0.0; extra == "lightning"
Provides-Extra: full
Requires-Dist: cuvis-ai-schemas[lightning,numpy,proto,torch]; extra == "full"
Provides-Extra: dev
Requires-Dist: ruff; extra == "dev"
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: mypy>=1.8.0; extra == "dev"
Requires-Dist: types-protobuf; extra == "dev"
Requires-Dist: types-grpcio; extra == "dev"
Requires-Dist: types-PyYAML; extra == "dev"
Requires-Dist: interrogate>=1.7.0; extra == "dev"
Dynamic: license-file

# cuvis-ai-schemas

Lightweight schema definitions for the cuvis-ai ecosystem.

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
[![Python](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/)

## Overview

`cuvis-ai-schemas` is a centralized, dependency-light package of schema definitions used across the cuvis-ai ecosystem. It enables type-safe communication between services without heavy runtime requirements.

Key points:
- Minimal deps (pydantic + pyyaml)
- Full Pydantic validation
- Optional extras for proto, torch, numpy, lightning

## Installation

```bash
uv add cuvis-ai-schemas
uv add "cuvis-ai-schemas[proto]"
uv add "cuvis-ai-schemas[full]"
```

Extras:
- `proto`: gRPC and protobuf support
- `torch`: PyTorch dtype handling (validation only)
- `numpy`: NumPy array support
- `lightning`: PyTorch Lightning training configs
- `full`: All features
- `dev`: Development dependencies

## Usage

```python
from cuvis_ai_schemas.pipeline import PipelineConfig, NodeConfig

pipeline = PipelineConfig(
    nodes=[NodeConfig(id="node_1", class_name="DataLoader", params={"batch_size": 32})],
    connections=[],
)

pipeline_json = pipeline.to_json()
pipeline = PipelineConfig.from_json(pipeline_json)
```

## Development

```bash
uv sync --extra dev
uv run pytest tests/ -v
uv run ruff check cuvis_ai_schemas/ tests/
uv run ruff format cuvis_ai_schemas/ tests/
uv run mypy cuvis_ai_schemas/
```

## Contributing

Contributions are welcome. Please:
1. Ensure tests pass
2. Run ruff format and ruff check
3. Keep type hints and update docs as needed

## License

Licensed under the Apache License 2.0. See [LICENSE](LICENSE) for details.
