katie-snow / QtPyUltimarc

Python and QML tool for configuring Ultimarc USB devices.
GNU General Public License v3.0
12 stars 1 forks source link

[Feature Request] Package the UI Separately #38

Closed MizterB closed 9 months ago

MizterB commented 1 year ago

As a long-time user of ultimarc-linux, I'm very excited to see a Python implementation of the programming logic. My primary system running Ultimarc devices is Batocera Linux, which does not provide a full desktop environment, and is therefore not compatible with the QT UI you've created. However, I would love to be able to use the CLI tools, and even better - to integrate the 'core' device control logic into custom Python scripts that I've developed for that OS. But right now, the QT dependencies don't allow for that.

To that end, is there any interest in refactoring this code so that the core library and UI can be installed independent of each other? There are a number of ways this could be done, so I don't want to presume a particular approach. But before I consider ripping apart my own fork, I wanted to gauge any interest on your part.

Thank you very much for all your efforts in supporting Ultimarc devices via open source!

katie-snow commented 1 year ago

I think this is a great idea! I will look into making the QT an optional dependency.

MizterB commented 1 year ago

That is great to hear - thank you!

katie-snow commented 1 year ago

The software can be installed through pip now and will not download the UI libraries. Checkout the readme page for more details.

MizterB commented 1 year ago

@katie-snow Thank you for taking this up. I have tried installing on two different systems, and get an error when installing via pip:

ERROR: For req: ultimarc. Invalid script entry point: <ExportEntry ultimarc-ui = ultimarc.main:None []> - A callable suffix is required. Cf https://packaging.python.org/specifications/entry-points/#use-for-scripts for more information.

It seems to proceed with some sort of partial install, where the command line tool exists, but fails when invoked. When calling ultimarc --help, I get:

ModuleNotFoundError: No module named 'ultimarc.tools'
robabram commented 1 year ago

@MizterB I have pushed the new release to PyPi. Would you please update to the latest release using Pip and try again?

MizterB commented 11 months ago

Hi! Thanks for the fix. I am now able to install without error. However, if I try to use the cli that it installs to dump the config of my device, I get an error that it cannot find the schemas directory. It only works if my working directory is site-packages/ultimarc. Perhaps the code needs to detect where the package is installed in order to reference these supporting files?

katie-snow commented 10 months ago

I will be looking into this and get it resolved.

katie-snow commented 9 months ago

The new release is out on pypi.

MizterB commented 9 months ago

Just took it for a test drive. Seems to be working fine now. Thank you!