-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
merge MetaSearch into QGIS core #1711
Conversation
@tomkralidis : any test? |
@pcav no tests. There are smoke tests in |
@tomkralidis There are a lot of python tests available here: Either you write one that does not require a running QGIS or I guess |
When you have written some tests, please also rebase to fix the currently failing composerhtml test |
current master is failing on travis anyway, better not rebase now... (might need a ticket against the "testsuite" component) |
@m-kuhn: trying with I then tried using the another approach, see https://github.com/geopython/QGIS/blob/MetaSearch-merge-core/tests/src/python/test_qgsmetasearch.py#L38-L44 Running the tests locally fail (see below). I'm unsure as to whether this is failing because how the plugin is loaded in tkralidi@tkralidi-VirtualBox:~/QGIS/QGIS/build$ xvfb-run ctest -V -R MetaSearch
UpdateCTestConfiguration from :/home/tkralidi/QGIS/QGIS/build/DartConfiguration.tcl
Parse Config file:/home/tkralidi/QGIS/QGIS/build/DartConfiguration.tcl
Add coverage exclude regular expressions.
Add coverage exclude: /CMakeFiles/CMakeTmp/
Add coverage exclude: .*/Testing/Utilities/.*
Add coverage exclude: .*/Utilities/.*
Add coverage exclude: .*/Code/Wrappers/SWIG/otbApplicationPYTHON_wrap.*
Add coverage exclude: .*/Code/Wrappers/SWIG/otbApplicationJAVA_wrap.*
UpdateCTestConfiguration from :/home/tkralidi/QGIS/QGIS/build/DartConfiguration.tcl
Parse Config file:/home/tkralidi/QGIS/QGIS/build/DartConfiguration.tcl
Test project /home/tkralidi/QGIS/QGIS/build
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 118
Start 118: PyQgsMetaSearch
118: Test command: /usr/bin/cmake "-P" "/home/tkralidi/QGIS/QGIS/build/tests/src/python/PyQgsMetaSearch.cmake"
118: Test timeout computed to be: 1500
118: -- Running /usr/bin/python /home/tkralidi/QGIS/QGIS/tests/src/python/test_qgsmetasearch.py
118: LD_LIBRARY_PATH:NOTFOUND:/home/tkralidi/QGIS/QGIS/build/output/lib:
118: PYTHONPATH:/home/tkralidi/QGIS/QGIS/build/output/python/:
118: Running from build directory!
118: - source directory: /home/tkralidi/QGIS/QGIS
118: - output directory of the build: /home/tkralidi/QGIS/QGIS/build/output
118: !!! prefix path was requested, but it is not valid - we do not run from installed path !!!
118: QGraphicsScene::addItem: item has already been added to this scene
118: E
118: ======================================================================
118: ERROR: test_plugin_metadata (__main__.TestQgsMetaSearch)
118: ----------------------------------------------------------------------
118: Traceback (most recent call last):
118: File "/home/tkralidi/QGIS/QGIS/tests/src/python/test_qgsmetasearch.py", line 43, in setUp
118: self.plugin = MetaSearch.classFactory(IFACE)
118: File "/home/tkralidi/QGIS/QGIS/build/output/python//plugins/MetaSearch/__init__.py", line 32, in classFactory
118: return MetaSearchPlugin(iface)
118: File "/home/tkralidi/QGIS/QGIS/build/output/python//plugins/MetaSearch/plugin.py", line 53, in __init__
118: locale_name = QSettings().value("locale/userLocale")[0:2]
118: TypeError: 'QVariant' object has no attribute '__getitem__'
118:
118: ----------------------------------------------------------------------
118: Ran 1 test in 0.591s
118:
118: FAILED (errors=1)
118: Application state:
118: QGIS_PREFIX_PATH env var: /home/tkralidi/QGIS/QGIS/build/output
118: Prefix:
118: Plugin Path: /home/tkralidi/QGIS/QGIS/build/output/lib/qgis/plugins
118: Package Data Path: /home/tkralidi/QGIS/QGIS
118: Active Theme Name:
118: Active Theme Path: :/images/themes//
118: Default Theme Path: :/images/themes/default/
118: SVG Search Paths: /home/tkralidi/QGIS/QGIS/images/svg/
118: /home/tkralidi/.qgis2//svg/
118: User DB Path: /home/tkralidi/QGIS/QGIS/resources/qgis.db
118:
118:
118: CMake Error at PyQgsMetaSearch.cmake:28 (MESSAGE):
118: 1
118:
118:
1/1 Test #118: PyQgsMetaSearch ..................***Failed 2.40 sec
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 2.43 sec
The following tests FAILED:
118 - PyQgsMetaSearch (Failed)
Errors while running CTest |
The test is running on sipapi version 1 instead of 2. |
No luck on the tests after this fix. As discussed on irc, I'll submit a PR leaving the tests out for future work. Closing this PR and will issue new/fresh/clean PR. |
cc @kalxas @rduivenvoorde @alexbruy @timlinux @jef-n
This PR officially moves MetaSearch into QGIS core as per geopython/MetaSearch#62. Notes:
pavement.py
is not part of the build but will be adjusted / used for out of band releases to https://plugins.qgis.org Needs further discussion...which are not part of this PR. Any ideas how to handle these? n.b. docs have been ported to https://github.com/qgis/QGIS-Documentation, their Transifex translations need to ported as well