New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Speedup (from 2x to 10x faster) and simplify python tests #1053

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@jcfr
Copy link
Member

jcfr commented Dec 7, 2018

  • Run python self tests with a messageDelay of 100ms. Message delay is used
    in function "delayDisplay" to (1) let the event loop catch up to the state
    of the test and (2) to display a meaningful message when running test
    interactively from Slicer.

    When running tests on the dashboard, there is no need to wait too long
    before each test steps. This commit sets a default of 50ms when tests
    are executed from the module panel. It also provides a Slicer to change
    the value.

  • Refactor tests to use ScriptedLoadableModule base classes

  • Remove redundant test case AbdominalAtlasTest already coverted by
    AtlasTests

  • Remove duplicated implementation of functions like takeScreenshot.

@jcfr

This comment has been minimized.

Copy link
Member Author

jcfr commented Dec 7, 2018

Here is a preview of the slider now available when developer mode is enabled:

image

@jcfr

This comment has been minimized.

Copy link
Member Author

jcfr commented Dec 7, 2018

@lassoan

This comment has been minimized.

Copy link
Contributor

lassoan commented Dec 7, 2018

This would take up very valuable space in all module GUI and would be rarely used (you would not change the value very frequently). Could we moved this to application settings / Developer section?

@jcfr

This comment has been minimized.

Copy link
Member Author

jcfr commented Dec 7, 2018

jcfr added some commits Dec 7, 2018

ENH: Speedup (from 2x to 10x faster) and simplify python tests
* Run python self tests with a messageDelay of 100ms. Message delay is used
  in function "delayDisplay" to (1) let the event loop catch up to the state
  of the test and (2) to display a meaningful message when running test
  interactively from Slicer.

  When running tests on the dashboard, there is no need to wait too long
  before each test steps. This commit sets a default of 50ms when tests
  are executed from the module panel. It also provides a Slicer to change
  the value.

* Refactor tests to use ScriptedLoadableModule base classes

* Remove redundant test case AbdominalAtlasTest already coverted by
  AtlasTests

* Remove duplicated implementation of functions like takeScreenshot.
ENH: Move UI to update self-test message delay to the developer settings
This free valuable space in all module GUIs (when developer mode is
enabled). Assuming this settings would not be changed often, open
the application settings to adjust it is reasonable.

Suggested-by: Andras Lasso <lasso@queensu.ca>

@jcfr jcfr force-pushed the jcfr:refactor-and-speedup-python-tests branch from d3630e5 to a12be9a Dec 8, 2018

@jcfr

This comment has been minimized.

Copy link
Member Author

jcfr commented Dec 8, 2018

Et voila,

Associated tool-tip is: Time to wait before resuming self-test execution and hiding messages displayed to the user

image

@jcfr

This comment has been minimized.

Copy link
Member Author

jcfr commented Dec 8, 2018

Thanks for the review. Closing, integrated in r27617 and r27618

@jcfr jcfr closed this Dec 8, 2018

@jcfr jcfr deleted the jcfr:refactor-and-speedup-python-tests branch Dec 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment