labelle-org / labelle

Label printing software
Apache License 2.0
27 stars 4 forks source link

A few more device selector fixes #20

Closed maresb closed 4 months ago

maresb commented 4 months ago

We aren't testing the GUI in the automated tests, and I discovered it was failing to load on Python 3.8 due to missing future annotations. Ideally this stuff is caught by tests, but I've never done a GUI before, so I don't know offhand how to test a GUI from GitHub CI.

Next, having a greedy --device argument was conflicting with the greedy text argument. I changed it so that you add multiple filters via multiple --device arguments.

Does it make sense to be matching on the manufacturer? I'm inclined to just check product description and serial number.

Finally, I'm not sure offhand how to solve this, but let's say I have multiple devices and I want to determine a filter string. Currently the only way I can see to do this is to print a label and include --verbose, which I find pretty unintuitive. Perhaps we need something like --list-devices, but I feel like our arguments are getting fairly bloated.

tomers commented 4 months ago

I already made some improvements to the CLI, so I had to manually repeat your changes. I already removed the eagerness of the text label, so I hope there should not be any issue with how it is currently. I plan to implement --list-devices soon.

tomers commented 4 months ago

Please add task to add automated tests for GUI :pray:

maresb commented 4 months ago

Please add task to add automated tests for GUI 🙏

@tomers, I wish I knew how, I'll have to look into it.

I guess one really quick test that would have caught these things would be to import all modules.