Metadata-Version: 2.5
Name: lightfall-utils
Version: 0.1.0
Summary: Shared Qt/EPICS infrastructure for ALS control applications: managed threading, loguru logging, semantic theming, layered config, and a caproto/Qt bridge
Author: ALS Controls Team
License-Expression: BSD-3-Clause
License-File: LEGAL.md
License-File: LICENSE.md
Requires-Python: >=3.11
Requires-Dist: loguru>=0.7
Requires-Dist: pydantic>=2.0
Requires-Dist: pyside6>=6.6
Requires-Dist: pyyaml>=6.0
Provides-Extra: ca
Requires-Dist: caproto>=1.1; extra == 'ca'
Provides-Extra: dev
Requires-Dist: caproto>=1.1; extra == 'dev'
Requires-Dist: pyright>=1.1; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest-qt>=4.2; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.1; extra == 'dev'
Provides-Extra: docs
Requires-Dist: myst-parser>=2.0; extra == 'docs'
Requires-Dist: sphinx-immaterial>=0.12; extra == 'docs'
Requires-Dist: sphinx<9.0,>=7.0; extra == 'docs'
Provides-Extra: multihomed
Requires-Dist: netifaces>=0.11; (sys_platform != 'darwin') and extra == 'multihomed'
Description-Content-Type: text/markdown

# lightfall-utils

Shared Qt/EPICS infrastructure for ALS control applications (Lightfall, CAtfish).

Extracted from [Lightfall](https://github.com/als-controls/lightfall). Modules:

- `lightfall_utils.threads` — managed Qt thread pool, `QThreadFuture`, main-thread marshalling
- `lightfall_utils.logging` / `log_buffer` — loguru configuration, timing, in-process log ring buffer
- `lightfall_utils.qt_affinity` — GUI-thread assertion helpers (`gui_thread_only`)
- `lightfall_utils.config` — priority-layered YAML config with pydantic validation
- `lightfall_utils.theming` — semantic design tokens, theme registry/manager, QSS generation
- `lightfall_utils.ca` — caproto → Qt signal bridge (`SharedContext`, `PV`); requires the `ca` extra
- `lightfall_utils.caproto_shutdown` — drains caproto's user-callback thread pools cleanly at application shutdown

Install: `pip install lightfall-utils[ca]`. Add the `multihomed` extra alongside `ca` for caproto multi-homed interface enumeration (`pip install lightfall-utils[ca,multihomed]`).

Development:

```bash
python -m venv .venv
.venv\Scripts\activate    # Windows (source .venv/bin/activate on Unix)
pip install -e ".[dev]"
pytest
```
