* exposed number of subsamples in auto-level determination
* Removing print statement at @NilsNemitz's request
* make levelSamples count pixels, not pixels * channels
* minimum number of samples can be 2 if we look at pixels anyway
* adjusted minimum levelSamples to 4: Otherwise a 2x2 image downsamples to a single pixel
* extended docstring for level to make the user aware of auto-level subsampling
* subsample towards square array for auto-leveling
* eliminated duplicated code between level downsampling and samples and QuickMinMax method
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
* add axis convenient methods and matrix display example
* wrestled wayward space back into docstring
* color map names are case sensitive on Linux
* docstring fix for PlotItem
* protect AxisItem.linkToView from being obscured by DateAxisItem override
* replaced setOrigin method by promoted setPos and setScale
* made tri-state axes switching explicit
* reverted setRect behavior, documentation pass for ImageItem
* minor text adjustment
* implmented some suggested revisions
* fix input parsing for setRect and add tests so that I don't break it again
* don't try to re-add transform after clearing it
* changed example and doc image generators to pg.exec()
* removed commented-out code
* cleaned up transform eqaulity assertion
* restored devoured comment
* restored devoured comment
With some experimentation, it was determined that when the QPainterPath
is drawn with a QPen that has a thickness greater than 1, the end result
is quite broken. Due to us trying to exploit non-advertised behavior
we are removing this optimization step.
* Update GLViewWidget.py
Fix the wrong conversion of QVector3D to numpy array.
* new way to fix the conversion error
* Recover prev. version of pixelSize
Co-authored-by: Jaeyoon Jeong <diem389@gmail.com>
Several bugs have snuck through due to being wrapped with printExc,
which would prevent the exception from raising, but printing the trace
to the console. In pytest, this output is not captured at all, and is
invisible unless the -s parameter is added.
This PR changes the print statement to a runtime warning, which pytest
will capture.
The way we called subprocess.Popen, it looks like we didn't close all
the pipes; this PR addresses the warning that pytest generates when
running the examples.
In addition, we toggle the pytest setting to error on any warning
On Windows, pyreadline is emitting a deprecation warning we can ignore.
Furthermore, test_svg was using NamedTemporaryFile in a manner that was
causing permission denied errors, so this commit switches to the use of
pytest friendly temporary files
This file contains two tests, one of which has been skipped forever,
and the second (test_pg_exit) has been a flakey test that does not test
in general, testing a use-case we likely do not see any more. So
therefore I am removing this test from the library.
While this fix prevents an assertion error, the assertion error was
being suppressed; and was only noticeable via pytest -s where the error
was printed to console. Future work should be done to minimize the use
of bare exceptions so these tests do not fail silently
Remove if __name__ == "__main__" bits, replace some == None to is None
checks
Cleanup variety of static code checker issue
Removed missing imports, restructured some logic to make a little
cleaner, fixed a function in test_dockarea, unfortunately broke the test
so now I tell pytest to expect the Exception.
the test_signalproxy.py had a fixture for the QApplication instance,
only problem is at the end of each use of the fixture, it would mark
the application instance for deletion, which is most definitely not what
we want
To reduce complexity, and make it easier to add more images and tests,
the images in the `test-data` repository should be merged with the main
repository. Furthermore, we can remove a lot of the subprocess work in
the image_testing.py file, as we no longer need to have it interact with
git.
The images are not the same. Images were regenerated with Qt6, and now
have proper big and little endian handling thanks to @pijyoi
Second commit is a slightly modified variant of
2e135ab282d6007b34a3854921be54d0e9efb241 authored by @pijyoi
it is to convert qimages to RGBA8888 for testing. Image
files were regenerated images for the big/little handling
Fixed issue with bogus test from test_NonUniformImage and generated a
new image
Since the QPainterPath.addPolygon(QPolygonF) does not filter out the NaN
values, we can insert NaN values to create discontinuities in the Lines,
and thus supporting connect='pairs' functionality