Closed jlwalke2 closed 2 years ago
Thank you for your pull request. This looks like a great addition to python-swat.
I have a few comments and questions before I can merge the pull request:
Please clean up the linting errors in the code ( see the "checks" tab ). If you have flake8 installed, you can see the linting errors in your local repository by changing directory into the root of the project and running 'flake8 --config tox.ini'
Please add the 'Signed-off-by:' line to your commit message as detailed in the CONTRIBUTING.md and ContributorAgreement.txt files.
When running on Windows, all of the image files are added twice. I believe this is because the init method is checking for the extensions in both lower and upper case, but windows is not case sensitive so extension.upper() picks up the same files that extension has already included.
In the class comments, you indicate 'the behavior should be similar to that of the image.loadImages_ CAS action'. I notice that the table generated by the loadImages action has a size column and a type column that are not included in the CASTable generated by the new Image CASDataMsgHandler. Would it be worth including those columns here ?
When dealing with a passed in list of PIL.Image.Image, the filename and filetype of the original image file are lost and the image is loaded to the table as a png named Image_1.png. Would it make sense to retain the name and type of the original image when the user provides a PIL.Image.Image ? It looks like you could get this information from the Image filename and format attributes. Or is there a reason it needs to be Image_1.png ?
Cleanup complete:
available as a pre-release in SWAT v1.11.1-snapshot
Defines a new subclass of
swat.datamsghandlers.CASDataMsgHandler
to allow easy uploading of client-side images to a CAS table.