Permalink
Browse files

PyQtGraph release 0.10.0

2 parents 70cfdb4 + e21d06b commit 1426e334e1d20542400d77c72c132b04c6d17ddb @campagnola campagnola committed Nov 5, 2016
Showing with 5,990 additions and 2,017 deletions.
  1. +19 −0 .coveragerc
  2. +105 −5 .gitignore
  3. +59 −91 .travis.yml
  4. +56 −0 CHANGELOG
  5. +9 −0 CONTRIBUTING.txt
  6. +9 −2 README.md
  7. +2 −2 doc/listmissing.py
  8. +1 −0 doc/source/apireference.rst
  9. +2 −2 doc/source/conf.py
  10. +41 −0 doc/source/config_options.rst
  11. +2 −0 doc/source/functions.rst
  12. +1 −1 doc/source/graphicsItems/make
  13. +49 −14 doc/source/introduction.rst
  14. +1 −1 doc/source/widgets/make
  15. +0 −8 doc/source/widgets/rawimagewidget.rst
  16. +2 −0 examples/FillBetweenItem.py
  17. +1 −1 examples/Flowchart.py
  18. +3 −3 examples/FlowchartCustomNode.py
  19. +1 −1 examples/GradientWidget.py
  20. +16 −1 examples/ImageView.py
  21. +45 −0 examples/InfiniteLine.py
  22. +1 −1 examples/PlotWidget.py
  23. +2 −2 examples/Plotting.py
  24. +6 −0 examples/ROIExamples.py
  25. +8 −10 examples/ROItypes.py
  26. +3 −1 examples/ScatterPlotSpeedTest.py
  27. +48 −30 examples/ScatterPlotWidget.py
  28. +12 −6 examples/SpinBox.py
  29. +38 −0 examples/Symbols.py
  30. +16 −3 examples/VideoSpeedTest.py
  31. +1 −14 examples/VideoTemplate.ui
  32. +5 −14 examples/VideoTemplate_pyqt.py
  33. +199 −0 examples/VideoTemplate_pyqt5.py
  34. +6 −14 examples/VideoTemplate_pyside.py
  35. +2 −2 examples/ViewBox.py
  36. +35 −203 examples/__main__.py
  37. +59 −51 examples/exampleLoaderTemplate.ui
  38. +59 −49 examples/exampleLoaderTemplate_pyqt.py
  39. +93 −0 examples/exampleLoaderTemplate_pyqt5.py
  40. +47 −46 examples/exampleLoaderTemplate_pyside.py
  41. +3 −3 examples/hdf5.py
  42. +7 −4 examples/imageAnalysis.py
  43. +52 −0 examples/infiniteline_performance.py
  44. +8 −0 examples/initExample.py
  45. +2 −2 examples/multiplePlotSpeedTest.py
  46. +4 −4 examples/optics/pyoptic.py
  47. +3 −1 examples/parallelize.py
  48. +1 −1 examples/parametertree.py
  49. +1 −1 examples/relativity/__init__.py
  50. +10 −11 examples/relativity/relativity.py
  51. +2 −0 examples/template.py
  52. +37 −0 examples/test_examples.py
  53. +1 −2 examples/text.py
  54. +165 −0 examples/utils.py
  55. +7 −10 pyqtgraph/GraphicsScene/GraphicsScene.py
  56. +6 −3 pyqtgraph/GraphicsScene/exportDialog.py
  57. +64 −0 pyqtgraph/GraphicsScene/exportDialogTemplate_pyqt5.py
  58. +0 −2 pyqtgraph/GraphicsScene/mouseEvents.py
  59. +131 −25 pyqtgraph/Qt.py
  60. +2 −0 pyqtgraph/SRTTransform.py
  61. +10 −22 pyqtgraph/WidgetGroup.py
  62. +22 −4 pyqtgraph/__init__.py
  63. +96 −0 pyqtgraph/canvas/CanvasTemplate_pyqt5.py
  64. +56 −0 pyqtgraph/canvas/TransformGuiTemplate_pyqt5.py
  65. +5 −1 pyqtgraph/colormap.py
  66. +4 −3 pyqtgraph/configfile.py
  67. +9 −6 pyqtgraph/console/Console.py
  68. +107 −0 pyqtgraph/console/template_pyqt5.py
  69. +60 −41 pyqtgraph/debug.py
  70. +17 −1 pyqtgraph/dockarea/Dock.py
  71. +33 −19 pyqtgraph/dockarea/DockArea.py
  72. +1 −1 pyqtgraph/exporters/Exporter.py
  73. +0 −35 pyqtgraph/exporters/SVGExporter.py
  74. 0 pyqtgraph/exporters/tests/__init__.py
  75. +13 −5 pyqtgraph/exporters/tests/test_csv.py
  76. +19 −9 pyqtgraph/exporters/tests/test_svg.py
  77. +18 −14 pyqtgraph/flowchart/Flowchart.py
  78. +67 −0 pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt5.py
  79. +1 −69 pyqtgraph/flowchart/FlowchartGraphicsView.py
  80. +55 −0 pyqtgraph/flowchart/FlowchartTemplate_pyqt5.py
  81. +1 −2 pyqtgraph/flowchart/Node.py
  82. +9 −76 pyqtgraph/flowchart/Terminal.py
  83. +0 −36 pyqtgraph/flowchart/eq.py
  84. +10 −3 pyqtgraph/flowchart/library/Filters.py
  85. +2 −0 pyqtgraph/flowchart/library/functions.py
  86. +159 −87 pyqtgraph/functions.py
  87. +5 −0 pyqtgraph/graphicsItems/CurvePoint.py
  88. +22 −12 pyqtgraph/graphicsItems/FillBetweenItem.py
  89. +34 −20 pyqtgraph/graphicsItems/GradientEditorItem.py
  90. +0 −4 pyqtgraph/graphicsItems/GraphicsItem.py
  91. +12 −2 pyqtgraph/graphicsItems/HistogramLUTItem.py
  92. +144 −61 pyqtgraph/graphicsItems/ImageItem.py
  93. +276 −81 pyqtgraph/graphicsItems/InfiniteLine.py
  94. +15 −21 pyqtgraph/graphicsItems/IsocurveItem.py
  95. +8 −0 pyqtgraph/graphicsItems/PlotCurveItem.py
  96. +8 −3 pyqtgraph/graphicsItems/PlotDataItem.py
  97. +22 −57 pyqtgraph/graphicsItems/PlotItem/PlotItem.py
  98. +169 −0 pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyqt5.py
  99. +196 −111 pyqtgraph/graphicsItems/ROI.py
  100. +147 −139 pyqtgraph/graphicsItems/ScatterPlotItem.py
  101. +118 −67 pyqtgraph/graphicsItems/TextItem.py
  102. +18 −23 pyqtgraph/graphicsItems/ViewBox/ViewBox.py
  103. +7 −5 pyqtgraph/graphicsItems/ViewBox/ViewBoxMenu.py
  104. +1 −1 pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt.py
  105. +89 −0 pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt5.py
  106. +18 −10 pyqtgraph/graphicsItems/ViewBox/tests/test_ViewBox.py
  107. +147 −0 pyqtgraph/graphicsItems/tests/test_ImageItem.py
  108. +96 −0 pyqtgraph/graphicsItems/tests/test_InfiniteLine.py
  109. +34 −0 pyqtgraph/graphicsItems/tests/test_PlotCurveItem.py
  110. +226 −0 pyqtgraph/graphicsItems/tests/test_ROI.py
  111. +8 −4 pyqtgraph/graphicsItems/tests/test_ScatterPlotItem.py
  112. +76 −26 pyqtgraph/imageview/ImageView.py
  113. +1 −1 pyqtgraph/imageview/ImageViewTemplate_pyqt.py
  114. +156 −0 pyqtgraph/imageview/ImageViewTemplate_pyqt5.py
  115. +1 −0 pyqtgraph/imageview/tests/test_imageview.py
  116. +21 −10 pyqtgraph/metaarray/MetaArray.py
  117. +2 −0 pyqtgraph/multiprocess/parallelizer.py
  118. +8 −9 pyqtgraph/multiprocess/processes.py
  119. +22 −13 pyqtgraph/multiprocess/remoteproxy.py
  120. +4 −2 pyqtgraph/opengl/GLGraphicsItem.py
  121. +13 −6 pyqtgraph/opengl/GLViewWidget.py
  122. +3 −1 pyqtgraph/opengl/MeshData.py
  123. +3 −2 pyqtgraph/parametertree/Parameter.py
  124. +1 −1 pyqtgraph/parametertree/SystemSolver.py
  125. +9 −21 pyqtgraph/parametertree/parameterTypes.py
  126. +2 −2 pyqtgraph/parametertree/tests/test_parametertypes.py
  127. +1 −0 pyqtgraph/pixmaps/__init__.py
  128. +8 −10 pyqtgraph/python2_3.py
  129. +2 −0 pyqtgraph/tests/__init__.py
  130. +634 −0 pyqtgraph/tests/image_testing.py
  131. +9 −5 pyqtgraph/tests/test_exit_crash.py
  132. +225 −5 pyqtgraph/tests/test_functions.py
  133. +4 −2 pyqtgraph/tests/test_qt.py
  134. +11 −0 pyqtgraph/tests/test_ref_cycles.py
  135. +6 −6 pyqtgraph/tests/test_stability.py
  136. +55 −0 pyqtgraph/tests/ui_testing.py
  137. +1 −0 pyqtgraph/util/cprint.py
  138. +1 −1 pyqtgraph/util/garbage_collector.py
  139. +3 −2 pyqtgraph/widgets/ComboBox.py
  140. +4 −2 pyqtgraph/widgets/GraphicsView.py
  141. +13 −5 pyqtgraph/widgets/MatplotlibWidget.py
  142. +1 −1 pyqtgraph/widgets/PlotWidget.py
  143. +4 −1 pyqtgraph/widgets/RawImageWidget.py
  144. +11 −0 pyqtgraph/widgets/RemoteGraphicsView.py
  145. +5 −4 pyqtgraph/widgets/ScatterPlotWidget.py
  146. +42 −60 pyqtgraph/widgets/SpinBox.py
  147. +16 −22 pyqtgraph/widgets/TableWidget.py
  148. +5 −1 pyqtgraph/widgets/TreeWidget.py
  149. +42 −26 setup.py
  150. +252 −0 tools/pg-release.py
  151. +2 −0 tools/pyuic5
  152. +49 −19 tools/rebuildUi.py
  153. +34 −0 tools/release_instructions.md
  154. +0 −26 tools/setVersion.py
  155. +26 −23 tools/setupHelpers.py
  156. +38 −0 tools/shell.py
View
@@ -0,0 +1,19 @@
+[run]
+source = pyqtgraph
+branch = True
+[report]
+omit =
+ */python?.?/*
+ */site-packages/nose/*
+ *test*
+ */__pycache__/*
+ *.pyc
+exclude_lines =
+ pragma: no cover
+ def __repr__
+ if self\.debug
+ raise AssertionError
+ raise NotImplementedError
+ if 0:
+ if __name__ == .__main__.:
+ignore_errors = True
View
@@ -1,9 +1,109 @@
-__pycache__
-build
-*.pyc
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+bin/
+build/
+develop-eggs/
+dist/
+eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+*.egg-info/
+.installed.cfg
+*.egg
+doc/_build
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+cover/
+.coverage
+.cache
+nosetests.xml
+coverage.xml
+.coverage.*
+
+# Translations
+*.mo
+*.pot
+
+# Mr Developer
+.mr.developer.cfg
+.project
+.pydevproject
+
+# Rope
+.ropeproject
+
+# Django stuff:
+*.log
+*.pot
+
+# Sphinx documentation
+docs/_build/
+
+#mac
+.DS_Store
+*~
+
+#vim
*.swp
+
+#pycharm
+.idea/*
+
+#Dolphin browser files
+.directory/
+.directory
+
+#Binary data files
+*.volume
+*.am
+*.tiff
+*.tif
+*.dat
+*.DAT
+
+#generated documntation files
+doc/resource/api/generated/
+
+# Enaml
+__enamlcache__/
+
+
+# PyBuilder
+target/
+
+# sphinx docs
+generated/
+
MANIFEST
deb_build
-dist
-.idea
rtr.cvs
+
+# pytest parallel
+.coverage
+
+# ctags
+.tags*
+
View
@@ -1,5 +1,5 @@
language: python
-
+sudo: false
# Credit: Original .travis.yml lifted from VisPy
# Here we use anaconda for 2.6 and 3.3, since it provides the simplest
@@ -17,25 +17,21 @@ env:
# Enable python 2 and python 3 builds
# Note that the 2.6 build doesn't get flake8, and runs old versions of
# Pyglet and GLFW to make sure we deal with those correctly
- #- PYTHON=2.6 QT=pyqt TEST=standard
- - PYTHON=2.7 QT=pyqt TEST=extra
+ - PYTHON=2.6 QT=pyqt4 TEST=standard
+ - PYTHON=2.7 QT=pyqt4 TEST=extra
- PYTHON=2.7 QT=pyside TEST=standard
- - PYTHON=3.2 QT=pyqt TEST=standard
- - PYTHON=3.2 QT=pyside TEST=standard
+ - PYTHON=3.4 QT=pyqt5 TEST=standard
+ # - PYTHON=3.4 QT=pyside TEST=standard # pyside isn't available for 3.4 with conda
#- PYTHON=3.2 QT=pyqt5 TEST=standard
before_install:
- - TRAVIS_DIR=`pwd`
- - travis_retry sudo apt-get update;
-# - if [ "${PYTHON}" != "2.7" ]; then
-# wget http://repo.continuum.io/miniconda/Miniconda-2.2.2-Linux-x86_64.sh -O miniconda.sh &&
-# chmod +x miniconda.sh &&
-# ./miniconda.sh -b &&
-# export PATH=/home/$USER/anaconda/bin:$PATH &&
-# conda update --yes conda &&
-# travis_retry sudo apt-get -qq -y install libgl1-mesa-dri;
-# fi;
+ - if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-3.5.5-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-3.5.5-Linux-x86_64.sh -O miniconda.sh; fi
+ - chmod +x miniconda.sh
+ - ./miniconda.sh -b -p /home/travis/mc
+ - export PATH=/home/travis/mc/bin:$PATH
+
+ # not sure what is if block is for
- if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
GIT_TARGET_EXTRA="+refs/heads/${TRAVIS_BRANCH}";
GIT_SOURCE_EXTRA="+refs/pull/${TRAVIS_PULL_REQUEST}/merge";
@@ -51,60 +47,31 @@ before_install:
- echo ${GIT_SOURCE_EXTRA}
install:
- # Dependencies
- - if [ "${PYTHON}" == "2.7" ]; then
- travis_retry sudo apt-get -qq -y install python-numpy &&
- export PIP=pip &&
- sudo ${PIP} install pytest &&
- sudo ${PIP} install flake8 &&
- export PYTEST=py.test;
- else
- travis_retry sudo apt-get -qq -y install python3-numpy &&
- curl http://python-distribute.org/distribute_setup.py | sudo python3 &&
- curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | sudo python3 &&
- export PIP=pip3.2 &&
- sudo ${PIP} install pytest &&
- sudo ${PIP} install flake8 &&
- export PYTEST=py.test-3.2;
+ - export GIT_FULL_HASH=`git rev-parse HEAD`
+ - conda update conda --yes
+ - conda create -n test_env python=${PYTHON} --yes
+ - source activate test_env
+ - conda install numpy pyopengl pytest flake8 six coverage --yes
+ - echo ${QT}
+ - echo ${TEST}
+ - echo ${PYTHON}
+
+ - if [ "${QT}" == "pyqt5" ]; then
+ conda install pyqt --yes;
fi;
-
- # Qt
- - if [ "${PYTHON}" == "2.7" ]; then
- if [ ${QT} == 'pyqt' ]; then
- travis_retry sudo apt-get -qq -y install python-qt4 python-qt4-gl;
- else
- travis_retry sudo apt-get -qq -y install python-pyside.qtcore python-pyside.qtgui python-pyside.qtsvg python-pyside.qtopengl;
- fi;
- elif [ "${PYTHON}" == "3.2" ]; then
- if [ ${QT} == 'pyqt' ]; then
- travis_retry sudo apt-get -qq -y install python3-pyqt4;
- elif [ ${QT} == 'pyside' ]; then
- travis_retry sudo apt-get -qq -y install python3-pyside;
- else
- ${PIP} search PyQt5;
- ${PIP} install PyQt5;
- cat /home/travis/.pip/pip.log;
- fi;
- else
- conda create -n testenv --yes --quiet pip python=$PYTHON &&
- source activate testenv &&
- if [ ${QT} == 'pyqt' ]; then
- conda install --yes --quiet pyside;
- else
- conda install --yes --quiet pyside;
- fi;
+ - if [ "${QT}" == "pyqt4" ]; then
+ conda install pyqt=4 --yes;
+ fi;
+ - if [ "${QT}" == "pyside" ]; then
+ conda install pyside --yes;
fi;
+ - pip install pytest-xdist # multi-thread py.test
+ - pip install pytest-cov # add coverage stats
- # Install PyOpenGL
- - if [ "${PYTHON}" == "2.7" ]; then
- echo "Using OpenGL stable version (apt)";
- travis_retry sudo apt-get -qq -y install python-opengl;
- else
- echo "Using OpenGL stable version (pip)";
- ${PIP} install -q PyOpenGL;
- cat /home/travis/.pip/pip.log;
+ # required for example testing on python 2.6
+ - if [ "${PYTHON}" == "2.6" ]; then
+ pip install importlib;
fi;
-
# Debugging helpers
- uname -a
@@ -114,23 +81,18 @@ install:
else
python3 --version;
fi;
- - apt-cache search python3-pyqt
- - apt-cache search python3-pyside
- - apt-cache search pytest
- - apt-cache search python pip
- - apt-cache search python qt5
-
before_script:
# We need to create a (fake) display on Travis, let's use a funny resolution
- export DISPLAY=:99.0
+ - "sh -e /etc/init.d/xvfb start"
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render
-
- # Make sure everyone uses the correct python
- - mkdir ~/bin && ln -s `which python${PYTHON}` ~/bin/python
- - export PATH=/home/travis/bin:$PATH
+
+ # Make sure everyone uses the correct python (this is handled by conda)
- which python
- python --version
+ - pwd
+ - ls
# Help color output from each test
- RESET='\033[0m';
RED='\033[00;31m';
@@ -157,12 +119,12 @@ before_script:
start_test "repo size check";
mkdir ~/repo-clone && cd ~/repo-clone &&
git init && git remote add -t ${TRAVIS_BRANCH} origin git://github.com/${TRAVIS_REPO_SLUG}.git &&
- git fetch origin ${GIT_TARGET_EXTRA} &&
- git checkout -qf FETCH_HEAD &&
+ git fetch origin ${GIT_TARGET_EXTRA} &&
+ git checkout -qf FETCH_HEAD &&
git tag travis-merge-target &&
git gc --aggressive &&
TARGET_SIZE=`du -s . | sed -e "s/\t.*//"` &&
- git pull origin ${GIT_SOURCE_EXTRA} &&
+ git pull origin ${GIT_SOURCE_EXTRA} &&
git gc --aggressive &&
MERGE_SIZE=`du -s . | sed -e "s/\t.*//"` &&
if [ "${MERGE_SIZE}" != "${TARGET_SIZE}" ]; then
@@ -171,18 +133,21 @@ before_script:
SIZE_DIFF=0;
fi;
fi;
-
- - cd $TRAVIS_DIR
-
script:
+
+ - source activate test_env
+ # Check system info
+ - python -c "import pyqtgraph as pg; pg.systemInfo()"
+
# Run unit tests
- start_test "unit tests";
- PYTHONPATH=. ${PYTEST} pyqtgraph/;
+ PYTHONPATH=. py.test --cov pyqtgraph -sv;
check_output "unit tests";
-
-
+ - echo "test script finished. Current directory:"
+ - pwd
+
# check line endings
- if [ "${TEST}" == "extra" ]; then
start_test "line ending check";
@@ -208,23 +173,26 @@ script:
check_output "style check";
fi;
- - cd $TRAVIS_DIR
-
# Check install works
- start_test "install test";
- sudo python${PYTHON} setup.py --quiet install;
+ python setup.py --quiet install;
check_output "install test";
-
+
# Check double-install fails
# Note the bash -c is because travis strips off the ! otherwise.
- start_test "double install test";
- bash -c "! sudo python${PYTHON} setup.py --quiet install";
+ bash -c "! python setup.py --quiet install";
check_output "double install test";
-
+
# Check we can import pg
- start_test "import test";
echo "import sys; print(sys.path)" | python &&
cd /; echo "import pyqtgraph.examples" | python;
check_output "import test";
-
+after_success:
+ - cd /home/travis/build/pyqtgraph/pyqtgraph
+ - pip install codecov --upgrade # add coverage integration service
+ - codecov
+ - pip install coveralls --upgrade # add another coverage integration service
+ - coveralls
Oops, something went wrong.

0 comments on commit 1426e33

Please sign in to comment.