View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002251 | Slicer4 | Core: Extensions | public | 2012-06-22 07:22 | 2012-09-27 05:19 |
Reporter | fedorov | Assigned To | jcfr | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | Slicer 4.1.1 | ||||
Target Version | Slicer 4.2.0 | Fixed in Version | Slicer 4.2.0 | ||
Summary | 0002251: slicer.modules is not initialized when queried from extension | ||||
Description | my module relies on getting its logic in init as follows: logic = slicer.modules.mymodule.logic() which currently fails | ||||
Tags | No tags attached. | ||||
I found that if I added this line to the add pyton test line in the Testing directory CMakeLists.txt file: SLICER_ARGS --additional-module-paths ${CMAKE_BINARY_DIR}/lib/Slicer-4.1/qt-loadable-module the reporting module would be found and loaded and the logic found for my test. It looks like because the testing automatically ignores the slicerrc file, the extra module path that pointed to the reporting module wasn't being set (I didn't install Reporting as an extension, just built it outside of Slicer and added the additional module path). |
|
For the generic tests, the Reporting-build/AdditionalLauncherSettings.ini file does have additional paths in it, but the first ones in the library paths reference the cli specific paths that the loadable Reporting module doesn't have, and the path setting doens't include the loadable path at all: [LibraryPaths] [Paths] I tried adding the loadable modules bin dir to SlicerBlockAdditionalLauncherSettings.cmake [Paths] |
|
Should the cmake macro be modified to always include the paths that can be populated by a module? In Slicer-build/lib/Slicer-4.1 these are ITKFactories cli-modules qt-loadable-modules qt-scripted-modules Should they all be added for an extension in <my-module-build>/lib/Slicer-4.1 ? |
|
Fixed in r20697 See the following commits: |
|
The commits haven't fixed the Reporting module py_ReportingRoundTripTest so that it actually runs for me. Slicer starts up and instantiates the Reporting module, but the test print outs don't show up on the console, nor does the test CTK DICOM database get created. That last is assumed by the fact that, at exit, there's only a message about the Reporting database being still active, nothing about the ReportingTesting database that the test is supposed to create/open. Selected output from running the test after updating to 20700: 5: Loading module "Reporting" If I take out the passing of additional module paths to the python test (changing the CMakeLists.txt file slicer_add_python_unittest line), it fails to find the logic for the Reporting module: 5: **** I checked in the change in the Reporting/Testing/Python/CMakeLists.txt that will make the test fail more obviously. |
|
See the dashboard build with the test failing to find slicer.modules.reporting.logic() here: http://slicer.cdash.org/testDetails.php?test=2534885&build=30461 |
|
Fixed in topic "22-fix-ReportingRoundTripTest" |
|
I also created the corresponding issue on the ExtensionsIndex. See https://github.com/Slicer/ExtensionsIndex/issues/42 |
|
Commit r20710 will resolve the related issue described here: https://github.com/fedorov/Reporting/issues/22#issuecomment-7331259 See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=20710 |
|
It is not clear how to pass additional module paths to generic unti tests, is this possible? My python module needs to load Editor module, if I specify the module path explicitly in a test macro, it works, but I can only do this for non-generic tests. Also, the generic tests cannot load Editor module, give errors and should be failing, but instead they pass when I run ctest. |
|
Here's example output (Reporting extension from this commit https://github.com/fedorov/Reporting/commit/58aa91405883ab3820f9fcfc6f1d02a1373eff8d): 1: Test command: /Users/fedorov/github/Slicer-Superbuild-Debug-Qt-Debug/Slicer-build/Slicer "--launcher-no-splash" "--launcher-additional-settings" "/Users/fedorov/github/Reporting-build-Release-Qt-Debug/AdditionalLauncherSettings.ini" "--launch" "/Users/fedorov/github/Reporting-build-Release-Qt-Debug/Testing/Cxx/qSlicerReportingModuleCxxTests" "qSlicerReportingModuleGenericTest" This should NOT Pass! |
|
Fixed in r21046 Consider also topic associated with Reporting module. See https://github.com/jcfr/Reporting/compare/12-fix-testing-for-out-of-slicer-source-build |
|
JC, I updated the trunk and merged your fixes to Reporting, but when I run RoundTripTest, there is no evidence the test actually runs -- no print() statements show up, and the test passes: https://github.com/fedorov/Reporting/blob/master/Testing/Python/ReportingRoundTripTest.py So I do not know if the issue with uninitialized logic() is fixed, because I do not know if the test is running. |
|
Fixed in r21066 Consider also the following commit to fix the Reporting module. See https://github.com/jcfr/Reporting/commit/ae2cfdf52138a606df4045d4154931599c68e6ea |
|
Thank you |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2012-06-22 07:22 | fedorov | New Issue | |
2012-06-22 07:22 | fedorov | Status | new => assigned |
2012-06-22 07:22 | fedorov | Assigned To | => jcfr |
2012-06-27 11:09 | fedorov | Relationship added | related to 0002269 |
2012-07-12 07:57 | nicole | Note Added: 0005125 | |
2012-07-12 09:39 | nicole | Note Added: 0005127 | |
2012-07-12 09:43 | fedorov | Note Added: 0005128 | |
2012-07-12 09:52 | nicole | Note Edited: 0005127 | |
2012-07-12 09:53 | nicole | Note Edited: 0005127 | |
2012-07-26 02:21 | jcfr | Note Added: 0005246 | |
2012-07-26 02:21 | jcfr | Status | assigned => resolved |
2012-07-26 02:21 | jcfr | Fixed in Version | => Slicer 4.2.0 - October 1st 2012 |
2012-07-26 02:21 | jcfr | Resolution | open => fixed |
2012-07-26 06:06 | fedorov | Status | resolved => closed |
2012-07-26 09:43 | nicole | Note Added: 0005259 | |
2012-07-26 09:44 | nicole | Status | closed => assigned |
2012-07-26 09:44 | nicole | Resolution | fixed => reopened |
2012-07-26 11:10 | nicole | Note Edited: 0005259 | |
2012-07-27 15:33 | fedorov | Note Added: 0005301 | |
2012-07-27 19:21 | jcfr | Note Added: 0005432 | |
2012-07-27 19:21 | jcfr | Status | assigned => resolved |
2012-07-27 19:21 | jcfr | Resolution | reopened => fixed |
2012-07-27 19:21 | jcfr | Target Version | => Slicer 4.2.0 - October 1st 2012 |
2012-07-27 19:26 | jcfr | Note Added: 0005433 | |
2012-07-28 00:05 | jcfr | Note Added: 0005435 | |
2012-07-28 21:41 | fedorov | Status | resolved => closed |
2012-07-28 21:41 | fedorov | Fixed in Version | Slicer 4.2.0 - October 1st 2012 => Slicer 4.1.2 - August |
2012-08-05 18:17 | fedorov | Note Added: 0005499 | |
2012-08-05 18:17 | fedorov | Status | closed => feedback |
2012-08-05 18:17 | fedorov | Resolution | fixed => reopened |
2012-08-05 18:27 | fedorov | Note Added: 0005500 | |
2012-08-28 01:47 | jcfr | Fixed in Version | Slicer 4.1.2 - August => Slicer 4.2.0 - Feature freeze Sept 1st 2012 |
2012-09-21 10:54 | jcfr | Relationship added | parent of 0002542 |
2012-09-25 14:24 | jcfr | Note Added: 0006213 | |
2012-09-25 14:24 | jcfr | Status | feedback => resolved |
2012-09-25 14:24 | jcfr | Resolution | reopened => fixed |
2012-09-26 18:43 | fedorov | Note Added: 0006233 | |
2012-09-26 18:43 | fedorov | Status | resolved => feedback |
2012-09-26 18:43 | fedorov | Resolution | fixed => reopened |
2012-09-26 20:44 | jcfr | Note Added: 0006236 | |
2012-09-26 20:44 | jcfr | Status | feedback => resolved |
2012-09-26 20:44 | jcfr | Resolution | reopened => fixed |
2012-09-27 05:19 | fedorov | Note Added: 0006237 | |
2012-09-27 05:19 | fedorov | Status | resolved => closed |