TissueEngineeringLab / MyoFInDer

Python interface for automatic calculation of the fusion index in muscle cell cultures
https://tissueengineeringlab.github.io/MyoFInDer/
GNU General Public License v3.0
3 stars 1 forks source link

Add a `--test` command line option #29

Closed WeisLeDocto closed 8 months ago

WeisLeDocto commented 8 months ago

So far, the Python installation tests added in #24 only import MyoFInDer, but do not actually test it. Also, the Windows installer build test added in #27 does not execute the final installed start_myofinder.bat file. This is because currently, running the module starts the mainloop of the graphical interface, that loops forever.

This PR introduces the --test (or -t) command line option for MyoFInDer. When provided, the graphical interface initializes as usual, but then closes right at the moment when it would normally start it mainloop. This way, tests do not get stuck in an endless loop and can assert the good initialization of the graphical window. Unlike the bare import, actually starting the module also allows to ensure that the weights of the AI model are downloaded as expected. This PR also updates the documentation for this new feature.

In a later PR, a proper test suite will be added that will replace or complement the --test run in automated workflows. This --test run is only a step towards a more robust and complete solution.