Skip to content

Extract UDP backend into the pydevialet_expert_nonpro library#7

Merged
gnulabis merged 3 commits into
gnulabis:mainfrom
brew-your-own:library-extraction
Jun 9, 2026
Merged

Extract UDP backend into the pydevialet_expert_nonpro library#7
gnulabis merged 3 commits into
gnulabis:mainfrom
brew-your-own:library-extraction

Conversation

@brew-your-own

Copy link
Copy Markdown
Contributor

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.

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]>
@gnulabis

gnulabis commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Thanks @brew-your-own , this looks great! I've tried it and it works fine.

Where is the CLI?

@brew-your-own

Copy link
Copy Markdown
Contributor Author

ah good point, I did not include the CLI, I made the minimal change to separate / make it a library
I can add the CLI in a different PR once this one is merged.

Comment thread pyproject.toml Outdated
Comment thread README.md
brew-your-own and others added 2 commits June 9, 2026 15:12
Co-authored-by: Dimitris Lampridis <[email protected]>
Co-authored-by: Dimitris Lampridis <[email protected]>
@gnulabis gnulabis merged commit 4a2eff1 into gnulabis:main Jun 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants