Metadata-Version: 2.4
Name: lr-dmx-tester
Version: 0.0.3
Summary: RPC client helpers for DMX tester firmware
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Embedded Systems
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyserial>=3.5
Provides-Extra: dev
Requires-Dist: build>=1.2.2; extra == "dev"
Requires-Dist: mypy>=1.11; extra == "dev"
Requires-Dist: pytest>=8.3; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Requires-Dist: twine>=5.1; extra == "dev"
Dynamic: license-file

# dmx-tester-rpc

Python package for communicating with DMX tester firmware over the RPC serial interface.

## Install for development

```bash
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .[dev]
```

## Run the CLI

After installation, the package exposes a `dmx_tester` command:

```bash
source .venv/bin/activate
dmx_tester --help
dmx_tester /dev/ttyACM1 latency --n-reports 3
dmx_tester 1050266122 send --data-val 0x12 --data-len 24
```

## Build distributables

```bash
source .venv/bin/activate
python -m build
```

## Upload to PyPI

```bash
source .venv/bin/activate
python -m twine upload dist/*
```

## GitLab tag release

GitLab CI publishes this package automatically when a tag matches:

```text
python-v<MAJOR>.<MINOR>.<PATCH>
```

Example:

```bash
git tag python-v1.2.3
git push origin python-v1.2.3
```

For tag builds, CI sets the package version to the tag value without the `python-v` prefix
(for example, `python-v1.2.3` -> `1.2.3`) and uploads to pypi.org.

Publishing uses PyPI Trusted Publisher (OIDC) from GitLab CI/CD, so no long-lived
PyPI token is stored in CI variables.

Configure Trusted Publisher once in PyPI for this project:

- Go to the project on pypi.org and open `Publishing`.
- Add a `GitLab CI/CD` trusted publisher for this repository/tag workflow.
- Ensure the project is owned/managed by the `bofh69` PyPI account.

The CI pipeline runs a Trusted Publisher preflight job before the actual publish
step, so tag pipelines fail early with a clear configuration error if OIDC trust
is not set up correctly.

PyPI does not allow re-uploading the same package name/version files. If a
publish already happened for a version, create and push a new `python-v...` tag.

## Run with PyPy

```bash
pypy3 -m venv .venv-pypy
source .venv-pypy/bin/activate
python -m pip install -e .
python -c "from dmx_tester import RpcClient, DmxCommands; print('ok')"
```

## License

This package is licensed under the MIT License. See the `LICENSE` file.
