Metadata-Version: 2.4
Name: matterlab_pressure_gauges
Version: 1.1.0
Summary: A Python API for the pressure gauges in the Matter Lab.
Author: Han Hao, Martin Seifrid, Tony C. Wu
License-Expression: MIT
Project-URL: homepage, https://gitlab.com/aspuru-guzik-group/self-driving-lab/devices/pressuregauge
Keywords: pressuregauge,automation,matterlab
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: System :: Hardware
Classifier: Topic :: System :: Hardware :: Hardware Drivers
Classifier: Topic :: System :: Hardware :: Universal Serial Bus (USB)
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: matterlab_serial_device
Provides-Extra: dev
Requires-Dist: mypy>=0; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: pytest-cov>=3; extra == "dev"
Requires-Dist: pytest-rerunfailures; extra == "dev"
Requires-Dist: pytest-timeout; extra == "dev"
Requires-Dist: ruff; extra == "dev"

# Matter Lab Pressure Gauges

`matterlab_pressure_gauges` provides Python drivers for pressure gauges used in Matter Lab automation workflows.

The package currently includes:

- `Gauge`: abstract base class for pressure gauge interfaces
- `InficonPCGGauge`: serial driver for Inficon PCG gauges

## Installation

Use the `matterlab` conda environment and install the package in editable mode during development:

```bash
pip install -e .[dev]
```

The package depends on `matterlab_serial_device` for serial communication.

## Quick Start

```python
from matterlab_pressure_gauges import InficonPCGGauge

gauge = InficonPCGGauge(com_port="COM4", address=1)
print(gauge.pressure, gauge.unit)
print(gauge.error)
print(gauge.product_name)
```

## Testing

Simulation tests are the default and are the only tests intended for CI enforcement.

One-click local sim run:

```bash
python examples/test_sim.py
```

Direct pytest run:

```bash
pytest
```

Real hardware tests are present for manual validation but are skipped unless explicitly enabled.

Run real tests with explicit hardware parameters:

```bash
pytest tests/test_inficon_gauge_real.py --run-real --com-port COM4 --address 1
```

You can also provide the settings through environment variables:

```bash
set PRESSURE_GAUGE_COM_PORT=COM4
set PRESSURE_GAUGE_ADDRESS=1
pytest tests/test_inficon_gauge_real.py --run-real
```

## Examples

Additional examples live in [examples/README.md](examples/README.md):

- `examples/test_sim.py` for the sim suite
- `examples/real_devices.py` for readable hardware usage examples

## Development Notes

- Source code lives under `src/`
- Pytest uses `src` as the import root
- Hardware-backed tests are marked with `@pytest.mark.real`
- Generated coverage, build, and cache artifacts are ignored
