Extract UDP backend into the pydevialet_expert_nonpro library#7
Merged
Conversation
Turn the reverse-engineered UDP communication code into a standalone, dependency-free, PyPI-installable Python library so it can be reused by any application instead of being embedded in the Kivy GUI. - Add the src-layout package src/pydevialet_expert_nonpro/ exposing DeviMoteBackEnd (alias DevialetExpertNonPro). Pure standard library. - Replace the hand-rolled CRC-16/CCITT-FALSE with binascii.crc_hqx, verified equivalent via the canonical 0x29B1 check value. - Add pyproject.toml (setuptools, src layout); the GUI ships via a gui extra and is intentionally excluded from the wheel. - Add unit tests for the CRC, dB volume encoding, and status-packet decoding; none require an amplifier. - Move the Kivy GUI to gui/devimote.py + gui/devimote.kv as a standalone script that imports the library instead of embedding the backend. - Update CI to install the package and run pytest + pylint; switch the REUSE workflow to the official action. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Owner
|
Thanks @brew-your-own , this looks great! I've tried it and it works fine. Where is the CLI? |
Contributor
Author
|
ah good point, I did not include the CLI, I made the minimal change to separate / make it a library |
gnulabis
reviewed
Jun 9, 2026
gnulabis
reviewed
Jun 9, 2026
Co-authored-by: Dimitris Lampridis <[email protected]>
Co-authored-by: Dimitris Lampridis <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turn the reverse-engineered UDP communication code into a standalone, dependency-free, PyPI-installable Python library so it can be reused by any application instead of being embedded in the Kivy GUI.