Maintain argument propagatoin to super class#2516
Conversation
All classes from `pyqtgraph.opengl.__init__` based on `GLGraphicsItem` didn't respect `parentItem` argument, which leads to `setParentItem()` call each time you want to group up graphics.
|
I can see that for 2D graphics there are tests for parent, but not for 3D, I suppose I have to add tests to this merge request. |
|
Hi @koutoftimer Could you add some pytest.importskip to skip tests if pyopengl is not installed? You can see an example of how we do that with matplotlib here: |
|
@j9ac9k I can, but I will ask you to explain to me why it is important, because I don't quite understand. From the user's perspective I can see that there are no need to install opengl without actually using it, but as developer what is the guarantee that doing your stuff you will not break anything behind |
The main reason is that pyopengl is an optional dependency as you were commenting and the test suite should not fail in the absence of an optional dependency. On my machine I have about 13 PyQtGraph virtual environments I use for development and testing; not all of them need pyopengl. |
|
@j9ac9k why do you need 13 virtual environments? I can imagine a lot of pros and cons of using |
|
I have so many environments due to testing different versions of Qt bindings and different versions of Python; and one environment for documentation builds. Basically it's often I want to try and replicate a test failure, and run The CI system has pyopengl for all pipelines so it should catch any issues that way. |
|
Oh, the other gotcha w/ pyopengl is that on Python 3.8 and recent versions of macOS pyopengl won't work... we have a note about that in the README. |
|
@j9ac9k if you still concerned about annotations, I can add |
Sorry for the long wait here, a lot happens over here through the holidays and I end up taking an extended break from OSS work during that time. I would rather avoid the test suite passed on my system without pyopengl so thanks for adding that skip check! This looks good to me, will give one last lookover before merging. |
|
@koutoftimer thanks for your patience, this LGTM, merging! Sorry for the delay! |
All classes from
pyqtgraph.opengl.__init__based onGLGraphicsItemdidn't respectparentItemargument, which leads tosetParentItem()call each time you want to group up graphics.Fixes #2514