Dummy driver for cam and serial connection.
Development would be easier if we have a dummy driver for the camera device and the serial connection. Such drivers would allow to run the FabScanPi-Server without the hardware.
What i have in my mind is:
Dummy cam driver:
A camera class which is implemented such as the one for the picamera, but it should grab the images from a folder instead of a camera. This folder should keep different plain pictures which i will make with the fabscan hardware. One set during a scan and one set during the settings window is opened.
Serial dummy driver:
The serial driver is quite easy, it should be a the serial driver as it is now but only as a stub/mock which will do nothing expect to confirm that the message was send.
Both dummy drivers should be encapsulated in a way that you can set the driver in the config. There is already something like that for the camera driver, because in an early stage of implementing that i experimented to write a driver for usb cams (parts of this code are still there).
I think that might be an excellent entry point for you and it will help us all and especially the guy who is developing the current frontend version because he does not own a working hardware setup at the moment. I would appreciate that.
By the way we are the only core developers by now :)
I'm used to doing this in C# moving entry points to services implementing interfaces so they can be implemented by mocks or by real backends. Not sure what the typical approach is in python. Are we moved to python3? Do I just clone the project and go to town?
Yah, it seems like a stub would be more useful than a mock inside of a formal testing framework. I went ahead and got PyCharm Pro -- the monthly fee is reasonable and using the same tools as yours will likely save more than the $8 / month in frustration.
How do you go about launching the dev code headless? What's your typical work flow when running the code?
I will add a dev setup guide with screenshots to the documentation this evening. (8:00 pm CET).
I'm happy to help with the doc FYI, if the steps aren't to complex to figure out, I'd be happy to document them as I go.