datalad / datalad-gooey

A graphical user interface for DataLad (datalad.org)
https://docs.datalad.org/projects/gooey
Other
4 stars 6 forks source link

Stop subclassing QMainWindow #322

Closed mih closed 1 year ago

mih commented 1 year ago

Original aim

The new implementation installs an event filter to catch the main window close event.

Closes #312

Test failure points out that we can run into the case where a command execution is still in startup while a CloseEvent` had already come. Need to catch this gracefully.

New aim

The original aim worked for all normal use cases. It did not work, however, for tests that are actually not using the app at all, but nevertheless gets loaded in the global pytest fixture. I was not able to sort out which artificial state such a "background instance" would be in. I need to stop here after having sunk too much time into this already.

There where two choices: (1) somehow change the test setup, and (2) turn of the close event handling. I went for (2).

I left all the pieces in (commented out), for another attempt in the future, when there is more time for this.

For posterity: The failure only occurred on the mac CI runners.

mih commented 1 year ago

A cheap implementation would be to

mih commented 1 year ago

I am giving up here. I will leave it open for another poor soul. I will continue development without PRs.