Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-vispy for openSUSE:Factory checked in at 2024-03-20 21:16:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-vispy (Old) and /work/SRC/openSUSE:Factory/.python-vispy.new.1905 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-vispy" Wed Mar 20 21:16:23 2024 rev:13 rq:1159611 version:0.14.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-vispy/python-vispy.changes 2023-12-28 23:04:24.100885670 +0100 +++ /work/SRC/openSUSE:Factory/.python-vispy.new.1905/python-vispy.changes 2024-03-20 21:20:16.303109492 +0100 @@ -1,0 +2,20 @@ +Fri Mar 15 20:59:46 UTC 2024 - Ben Greiner <c...@bnavigator.de> + +- Update to 0.14.2 + ## Enhancements: + * Radius of ellipse can now be specified as numpy.array #2561 + (ullmannJan) + * Add ivec2, ivec3, ivec4 to ATYPEINFO in glir.py #2545 + (hmaarrfk) + * Improve Markers symbols validation performance #2533 (Czaki) + ## Fixed bugs: + * Correction to Vispy.Visuals.Markers.set_data #2565 + (c40zAtGitHub) + * Fix SurfacePlotVisual not allowing 2D x and y inputs #2554 + (ullmannJan) + * Change devicePixelRatio calls to devicePixelRatioF to get a + floating point number instead of an integer #2540 (dalthviz) +- Fix test suite setup +- Clean requirements and obsolete jupyter package description + +------------------------------------------------------------------- Old: ---- vispy-0.14.1.tar.gz New: ---- vispy-0.14.2.tar.gz vispy-demo-data-5a3db84.tar.gz vispy-test-data-10.bundle ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-vispy.spec ++++++ --- /var/tmp/diff_new_pack.voIwYv/_old 2024-03-20 21:20:18.899204860 +0100 +++ /var/tmp/diff_new_pack.voIwYv/_new 2024-03-20 21:20:18.911205300 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-vispy # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,86 +16,67 @@ # -%bcond_without ext_deps +%define demodatacommit 5a3db84 +%define test_data_tag test-data-10 Name: python-vispy -Version: 0.14.1 +Version: 0.14.2 Release: 0 Summary: Interactive visualization in Python License: BSD-3-Clause URL: https://github.com/vispy/vispy -Source: https://files.pythonhosted.org/packages/source/v/vispy/vispy-%{version}.tar.gz -BuildRequires: %{python_module Cython} -BuildRequires: %{python_module devel} +Source0: https://files.pythonhosted.org/packages/source/v/vispy/vispy-%{version}.tar.gz +Source1: https://github.com/vispy/demo-data/archive/%{demodatacommit}.tar.gz#/vispy-demo-data-%{demodatacommit}.tar.gz +# `git clone https://github.com/vispy/test-data test-data; pushd test-data; git bundle create ../vispy-test-data-10.bundle test-data-10; popd` +Source2: vispy-%{test_data_tag}.bundle +BuildRequires: %{python_module Cython >= 3} +BuildRequires: %{python_module devel >= 3.8} BuildRequires: %{python_module numpy-devel} BuildRequires: %{python_module pip} -BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module setuptools >= 42} +BuildRequires: %{python_module setuptools_scm >= 7.1} BuildRequires: %{python_module wheel} BuildRequires: fdupes -BuildRequires: jupyter-notebook-filesystem BuildRequires: python-rpm-macros Requires: fontconfig +Requires: python-freetype-py +Requires: python-hsluv +Requires: python-kiwisolver Requires: python-numpy -Requires: python-qt5 +Requires: python-packaging +Recommends: python-Pillow Recommends: python-PySDL2 -Recommends: python-imageio -Recommends: python-jupyter_ipython -Recommends: python-networkx -Recommends: python-opengl -Recommends: python-opengl-accelerate +Recommends: python-ipython +Recommends: python-meshio Recommends: python-pyglet -Recommends: python-pypng -Recommends: python-scipy +Suggests: python-qt5 +Suggests: python-PyQt6 +Suggests: python-wxPython # SECTION test requirements -BuildRequires: %{python_module PySDL2} -BuildRequires: %{python_module glfw} BuildRequires: %{python_module hsluv} -BuildRequires: %{python_module imageio} -BuildRequires: %{python_module jupyter_ipython} -BuildRequires: %{python_module networkx} +BuildRequires: %{python_module Pillow} +BuildRequires: %{python_module PyQt6} +BuildRequires: %{python_module PySDL2} +BuildRequires: %{python_module freetype-py} +BuildRequires: %{python_module ipython if %python-base >= 3.10} +BuildRequires: %{python_module kiwisolver} +BuildRequires: %{python_module numpy} BuildRequires: %{python_module opengl} +BuildRequires: %{python_module packaging} BuildRequires: %{python_module pyglet} +BuildRequires: %{python_module pytest-xvfb} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module qt5} BuildRequires: %{python_module scipy} BuildRequires: fontconfig -%if %{with ext_deps} -BuildRequires: %{python_module cassowary} -BuildRequires: %{python_module decorator} -BuildRequires: %{python_module freetype-py} -BuildRequires: %{python_module husl} -BuildRequires: %{python_module pypng} -%endif +BuildRequires: git-core # /SECTION -%if %{with ext_deps} -Requires: python-cassowary -Requires: python-decorator -Requires: python-freetype-py -Requires: python-husl -Requires: python-pypng -%endif %python_subpackages %description Vispy is an interactive 2D/3D data visualization library. It leverages Graphics Processing Units through the OpenGL library to display large datasets. -%package -n jupyter-vispy -Summary: Interactive visualization in the Jupyter notebook -Requires: jupyter-notebook -Requires: python3-vispy = %{version} - -%description -n jupyter-vispy -Vispy is an interactive 2D/3D data visualization library. It leverages Graphics -Processing Units through the OpenGL library to display large datasets. - -This package provides the jupyter notebook extension. - %prep -%setup -q -n vispy-%{version} -%if %{with ext_deps} -rm -rf vispy/ext/_bundled -%endif - +%autosetup -p1 -n vispy-%{version} sed -i '1{/^#!\/usr\/bin\/env /d;}' \ vispy/glsl/build_spatial_filters.py \ vispy/util/transforms.py \ @@ -110,9 +91,24 @@ %python_expand %fdupes %{buildroot}%{$python_sitearch} %check -# cd because of gh#vispy/vispy#1506 (they are not src-based) -cd vispy/testing -%pytest_arch +export HOME=$PWD/vispytesthome +mkdir $HOME +pushd $HOME +# The demo data for tests +mkdir -p .vispy/data +tar -x --strip-components=1 -f %{SOURCE1} -C .vispy/data +git clone %{SOURCE2} .vispy/test_data +pushd .vispy/test_data +git checkout -b main %{test_data_tag} +popd +# we can't test file downloading from online resources +donttest="test_config" +# avoid vtk: not multiflavor +donttest="$donttest or (test_io and test_meshio)" +# segfault in xvfb test environment +donttest="$donttest or test_run" +%pytest_arch -rsfE --pyargs vispy -k "not ($donttest)" +popd %files %{python_files} %doc *.rst *.md ++++++ vispy-0.14.1.tar.gz -> vispy-0.14.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/.github/workflows/main.yml new/vispy-0.14.2/.github/workflows/main.yml --- old/vispy-0.14.1/.github/workflows/main.yml 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/.github/workflows/main.yml 2024-03-14 16:41:46.000000000 +0100 @@ -51,7 +51,7 @@ steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 - name: Install dependencies @@ -85,7 +85,7 @@ with: fetch-depth: 0 - name: Cache VisPy Demo and Test Data - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: cache-vispy-data-website test-version: 1 @@ -111,7 +111,7 @@ sleep 5 # export python_version echo "python_version=310" >> $GITHUB_OUTPUT - - uses: mamba-org/provision-with-micromamba@v16 + - uses: mamba-org/setup-micromamba@v1 with: environment-file: ./ci/requirements/py${{ steps.vars.outputs.python_version }}.yml - name: Install conda-dependencies @@ -137,7 +137,7 @@ export XDG_RUNTIME_DIR=/tmp/runtime-runner source ./ci/build_website.sh - name: Upload website HTML artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Sphinx Website path: | @@ -169,17 +169,17 @@ matrix: include: - test_number: 1 - python_version: "3.8" + python_version: "3.9" deps: "min" test: "standard" new_qt: false - test_number: 2 - python_version: "3.8" + python_version: "3.9" deps: "full" test: "standard" new_qt: false - test_number: 3 - python_version: "3.8" + python_version: "3.9" deps: "osmesa" test: "osmesa" new_qt: false @@ -193,7 +193,7 @@ with: fetch-depth: 0 - name: Cache VisPy Demo and Test Data - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: cache-vispy-data-${{ matrix.test }} test-version: 2 @@ -225,7 +225,7 @@ # export python_version PY_VER=${{ matrix.python_version }} echo "python_version=${PY_VER//.}" >> $GITHUB_OUTPUT - - uses: mamba-org/provision-with-micromamba@v16 + - uses: mamba-org/setup-micromamba@v1 with: environment-file: ./ci/requirements/py${{ steps.vars.outputs.python_version }}.yml - name: Install conda-dependencies @@ -254,7 +254,7 @@ export DISPLAY=:99.0 fi if [ "${{ matrix.test }}" == 'osmesa' ]; then - export OSMESA_LIBRARY=~/micromamba-root/envs/vispy-tests/lib/libOSMesa32.so; + export OSMESA_LIBRARY=~/micromamba/envs/vispy-tests/lib/libOSMesa.so; export VISPY_GL_LIB=$OSMESA_LIBRARY fi micromamba list @@ -267,7 +267,7 @@ python make test unit --tb=short fi if [ "${{ matrix.test }}" == 'osmesa' ]; then - export OSMESA_LIBRARY=~/micromamba-root/envs/vispy-tests/lib/libOSMesa32.so + export OSMESA_LIBRARY=~/micromamba/envs/vispy-tests/lib/libOSMesa.so export VISPY_GL_LIB=$OSMESA_LIBRARY make osmesa fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/.github/workflows/wheels.yml new/vispy-0.14.2/.github/workflows/wheels.yml --- old/vispy-0.14.1/.github/workflows/wheels.yml 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/.github/workflows/wheels.yml 2024-03-14 16:41:46.000000000 +0100 @@ -27,7 +27,7 @@ if: ${{ matrix.arch == 'aarch64' }} uses: docker/setup-qemu-action@v3 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.1 + uses: pypa/cibuildwheel@v2.16.5 env: CIBW_SKIP: "cp36-* pp* *-win32 *-manylinux_i686 *-musllinux*" CIBW_ARCHS_LINUX: ${{ matrix.arch }} @@ -35,8 +35,8 @@ CIBW_TEST_COMMAND: "python -c \"import vispy; vispy.test('nobackend')\"" CIBW_BUILD_VERBOSITY: "2" # Get numpy release candidate to have Python 3.12 compatibility (hopefully) - CIBW_BEFORE_BUILD: "pip install -U Cython pip setuptools; pip install -U --pre numpy" - CIBW_BEFORE_TEST: "pip install -U Cython pip setuptools; pip install -U --pre numpy" + CIBW_BEFORE_BUILD: "python -m pip install -U Cython pip setuptools" + CIBW_BEFORE_TEST: "python -m pip install -U Cython pip setuptools" #CIBW_BEFORE_BUILD_MACOS: "pip install -U pip setuptools" CIBW_BEFORE_BUILD_LINUX: "yum install -y fontconfig || apk add fontconfig-dev jpeg-dev; pip install freetype-py" # If freetype-py is installed from source (no wheel found), include bundled freetype library @@ -46,8 +46,9 @@ CIBW_MANYLINUX_I686_IMAGE: manylinux2014 CIBW_ARCHS_MACOS: 'x86_64 arm64' CIBW_TEST_SKIP: '*-macosx_arm64' - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: wheels-${{ matrix.os }}-${{ matrix.arch }} path: ./wheelhouse/*.whl build_sdist: @@ -57,7 +58,7 @@ - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 name: Install Python with: python-version: '3.7' @@ -66,21 +67,38 @@ python -m pip install --upgrade pip setuptools build wheel python -m pip install numpy Cython python -m build -s -o dist/ - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: sdist path: dist/*.tar.gz upload_test_pypi: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest - # upload to Test PyPI for every commit on main branch - if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: artifact + name: sdist + path: dist + - uses: actions/download-artifact@v4 + with: + name: wheels-ubuntu-20.04-auto + path: dist + - uses: actions/download-artifact@v4 + with: + name: wheels-windows-2019-auto + path: dist + - uses: actions/download-artifact@v4 + with: + name: wheels-macOS-latest-auto + path: dist + - uses: actions/download-artifact@v4 + with: + name: wheels-ubuntu-20.04-aarch64 path: dist - uses: pypa/gh-action-pypi-publish@master + # upload to Test PyPI for every commit on main branch + if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' with: user: __token__ password: ${{ secrets.VISPY_TEST_PYPI_TOKEN }} @@ -89,16 +107,30 @@ upload_pypi: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest - # upload to PyPI on every tag starting with 'v' - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') - # alternatively, to publish when a GitHub Release is created, use the following rule: - # if: github.event_name == 'release' && github.event.action == 'published' steps: - - uses: actions/download-artifact@v3 - with: - name: artifact - path: dist - - uses: pypa/gh-action-pypi-publish@master - with: - user: __token__ - password: ${{ secrets.VISPY_PYPI_TOKEN }} + - uses: actions/download-artifact@v4 + with: + name: sdist + path: dist + - uses: actions/download-artifact@v4 + with: + name: wheels-ubuntu-20.04-auto + path: dist + - uses: actions/download-artifact@v4 + with: + name: wheels-windows-2019-auto + path: dist + - uses: actions/download-artifact@v4 + with: + name: wheels-macOS-latest-auto + path: dist + - uses: actions/download-artifact@v4 + with: + name: wheels-ubuntu-20.04-aarch64 + path: dist + - uses: pypa/gh-action-pypi-publish@master + # upload to PyPI on every tag starting with 'v' + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') + with: + user: __token__ + password: ${{ secrets.VISPY_PYPI_TOKEN }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/.gitignore new/vispy-0.14.2/.gitignore --- old/vispy-0.14.1/.gitignore 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/.gitignore 2024-03-14 16:41:46.000000000 +0100 @@ -29,4 +29,5 @@ vispy/static/ vispy/version.py .vscode -vispy/visuals/text/_sdf_cpu*.pyd \ No newline at end of file +vispy/visuals/text/_sdf_cpu*.pyd +.spyproject \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/CHANGELOG.md new/vispy-0.14.2/CHANGELOG.md --- old/vispy-0.14.1/CHANGELOG.md 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/CHANGELOG.md 2024-03-14 16:41:46.000000000 +0100 @@ -1,5 +1,31 @@ # Release Notes +## [v0.14.2](https://github.com/vispy/vispy/tree/v0.14.2) (2024-03-14) + +**Enhancements:** + +- Radius of ellipse can now be specified as numpy.array [\#2561](https://github.com/vispy/vispy/pull/2561) ([ullmannJan](https://github.com/ullmannJan)) +- Add ivec2, ivec3, ivec4 to ATYPEINFO in glir.py [\#2545](https://github.com/vispy/vispy/pull/2545) ([hmaarrfk](https://github.com/hmaarrfk)) +- Improve Markers symbols validation performance [\#2533](https://github.com/vispy/vispy/pull/2533) ([Czaki](https://github.com/Czaki)) + +**Fixed bugs:** + +- Correction to Vispy.Visuals.Markers.set\_data [\#2565](https://github.com/vispy/vispy/pull/2565) ([c40zAtGitHub](https://github.com/c40zAtGitHub)) +- Fix SurfacePlotVisual not allowing 2D x and y inputs [\#2554](https://github.com/vispy/vispy/pull/2554) ([ullmannJan](https://github.com/ullmannJan)) +- Change `devicePixelRatio` calls to `devicePixelRatioF` to get a floating point number instead of an integer [\#2540](https://github.com/vispy/vispy/pull/2540) ([dalthviz](https://github.com/dalthviz)) + +**Merged pull requests:** + +- Fix a few typos in the docs [\#2573](https://github.com/vispy/vispy/pull/2573) ([kraasch](https://github.com/kraasch)) +- Bump pypa/cibuildwheel from 2.16.4 to 2.16.5 [\#2572](https://github.com/vispy/vispy/pull/2572) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pypa/cibuildwheel from 2.16.2 to 2.16.4 [\#2571](https://github.com/vispy/vispy/pull/2571) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump actions/cache from 3 to 4 [\#2569](https://github.com/vispy/vispy/pull/2569) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Fix typo in plot widget error message [\#2563](https://github.com/vispy/vispy/pull/2563) ([jeertmans](https://github.com/jeertmans)) +- Bump actions/upload-artifact from 3 to 4 [\#2559](https://github.com/vispy/vispy/pull/2559) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump actions/setup-python from 4 to 5 [\#2556](https://github.com/vispy/vispy/pull/2556) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pypa/cibuildwheel from 2.16.1 to 2.16.2 [\#2536](https://github.com/vispy/vispy/pull/2536) ([dependabot[bot]](https://github.com/apps/dependabot)) + + ## [v0.14.1](https://github.com/vispy/vispy/tree/v0.14.1) (2023-10-03) **Fixed bugs:** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/LICENSE.txt new/vispy-0.14.2/LICENSE.txt --- old/vispy-0.14.1/LICENSE.txt 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/LICENSE.txt 2024-03-14 16:41:46.000000000 +0100 @@ -3,7 +3,7 @@ Vispy is licensed under the terms of the (new) BSD license: -Copyright (c) 2013-2023, Vispy Development Team. All rights reserved. +Copyright (c) 2013-2024, Vispy Development Team. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/PKG-INFO new/vispy-0.14.2/PKG-INFO --- old/vispy-0.14.1/PKG-INFO 2023-10-03 23:33:29.000000000 +0200 +++ new/vispy-0.14.2/PKG-INFO 2024-03-14 16:42:02.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: vispy -Version: 0.14.1 +Version: 0.14.2 Summary: Interactive visualization in Python Home-page: http://vispy.org Download-URL: https://pypi.python.org/pypi/vispy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/ci/requirements/linux_osmesa_deps_conda.txt new/vispy-0.14.2/ci/requirements/linux_osmesa_deps_conda.txt --- old/vispy-0.14.1/ci/requirements/linux_osmesa_deps_conda.txt 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/ci/requirements/linux_osmesa_deps_conda.txt 2024-03-14 16:41:46.000000000 +0100 @@ -1,7 +1,7 @@ coveralls cython libglu -mesalib <21.0.0 +mesalib meshio numpy pillow diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/ci/requirements/py38.yml new/vispy-0.14.2/ci/requirements/py38.yml --- old/vispy-0.14.1/ci/requirements/py38.yml 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/ci/requirements/py38.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -name: vispy-tests -channels: - - conda-forge -dependencies: - - python=3.8 - - pip diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/ci/requirements/py39.yml new/vispy-0.14.2/ci/requirements/py39.yml --- old/vispy-0.14.1/ci/requirements/py39.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/vispy-0.14.2/ci/requirements/py39.yml 2024-03-14 16:41:46.000000000 +0100 @@ -0,0 +1,6 @@ +name: vispy-tests +channels: + - conda-forge +dependencies: + - python=3.9 + - pip diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/doc/getting_started/modern-gl.rst new/vispy-0.14.2/doc/getting_started/modern-gl.rst --- old/vispy-0.14.1/doc/getting_started/modern-gl.rst 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/doc/getting_started/modern-gl.rst 2024-03-14 16:41:46.000000000 +0100 @@ -252,7 +252,7 @@ convenient. So instead, we'll use a view matrix that will map the the world space to camera space. This is pretty much as if we were orienting the camera at a given position and look toward a given direction. In the meantime, we can -further refine the whole pipeline by providing a model matrix that will maps +further refine the whole pipeline by providing a model matrix that will map the object's local coordinate space into world space. For example, this will be useful for rotating an object around its center. To sum up, we need: @@ -273,19 +273,20 @@ An intro to modern OpenGL ------------------------- -OpenGL has been around a long time, and from reading all the accumulated layers +OpenGL has been around a long time and from reading all the accumulated layers of documentation out there on the Internet, it's not always clear what parts are historic and what parts are still useful and supported on modern graphics -hardware. It's about time for a new OpenGL `introduction that +hardware. It's about time for a `new OpenGL introduction <http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Table-of-Contents.html>`_ -walks through the parts that are still relevant today. +that walks through the parts that are still relevant today. Learning Modern 3D Graphics Programming --------------------------------------- -This `book <https://paroj.github.io/gltut/>`_ is intended to teach you how -to be a graphics programmer. It is not aimed at any particular graphics field; +The book `Learning Modern 3D Graphics Programming <https://paroj.github.io/gltut/>`_ +by Jason L. McKesson is intended to teach you how to be a graphics programmer. +It is not aimed at any particular graphics field; it is designed to cover most of the basics of 3D rendering. So if you want to be a game developer, a CAD program designer, do some computer visualization, or any number of things, this book can still be an asset for you. This does not @@ -301,5 +302,5 @@ the OpenGL 2.0 specification and emphasizes a programmable 3D graphics pipeline with the ability to create shader and program objects and the ability to write vertex and fragment shaders in the OpenGL ES Shading Language. VisPy is based -on OpenGL ES 2.0 because it give access to the programmable pipeline while +on OpenGL ES 2.0 because it gives access to the programmable pipeline while keeping overall complexity tractable. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/setup.py new/vispy-0.14.2/setup.py --- old/vispy-0.14.1/setup.py 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/setup.py 2024-03-14 16:41:46.000000000 +0100 @@ -23,6 +23,7 @@ """ import os +import sys from os import path as op from setuptools import setup, find_packages @@ -59,6 +60,10 @@ ), ] +install_requires = ['numpy', 'freetype-py', 'hsluv', 'kiwisolver', 'packaging'] +if sys.version_info < (3, 9): + install_requires.append("importlib-resources") + readme = open('README.rst', 'r').read() setup( name=name, @@ -92,7 +97,7 @@ platforms='any', provides=['vispy'], python_requires='>=3.8', - install_requires=['numpy', 'freetype-py', 'hsluv', 'kiwisolver', 'packaging'], + install_requires=install_requires, extras_require={ 'ipython-static': ['ipython'], 'pyglet': ['pyglet>=1.2'], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/vispy/app/backends/_qt.py new/vispy-0.14.2/vispy/app/backends/_qt.py --- old/vispy-0.14.1/vispy/app/backends/_qt.py 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/vispy/app/backends/_qt.py 2024-03-14 16:41:46.000000000 +0100 @@ -386,9 +386,9 @@ # must set physical size before setting visible or fullscreen # operations may make the size invalid - if hasattr(self, 'devicePixelRatio'): + if hasattr(self, 'devicePixelRatioF'): # handle high DPI displays in PyQt5 - ratio = self.devicePixelRatio() + ratio = self.devicePixelRatioF() else: ratio = 1 self._physical_size = (p.size[0] * ratio, p.size[1] * ratio) @@ -421,7 +421,7 @@ If display resolutions are the same this is essentially a no-op except for the redraw. If the display resolutions differ (HiDPI versus regular displays) the canvas needs to - be redrawn to reset the physical size based on the current `devicePixelRatio()` and + be redrawn to reset the physical size based on the current `devicePixelRatioF()` and redrawn with that new size. """ @@ -909,11 +909,11 @@ def resizeGL(self, w, h): if self._vispy_canvas is None: return - if hasattr(self, 'devicePixelRatio'): - # We take into account devicePixelRatio, which is non-unity on + if hasattr(self, 'devicePixelRatioF'): + # We take into account devicePixelRatioF, which is non-unity on # e.g HiDPI displays. - # self.devicePixelRatio() is a float and should have been in Qt5 according to the documentation - ratio = self.devicePixelRatio() + # self.devicePixelRatioF() is a float and should have been in Qt5 according to the documentation + ratio = self.devicePixelRatioF() w = int(w * ratio) h = int(h * ratio) self._vispy_set_physical_size(w, h) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/vispy/gloo/glir.py new/vispy-0.14.2/vispy/gloo/glir.py --- old/vispy-0.14.1/vispy/gloo/glir.py 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/vispy/gloo/glir.py 2024-03-14 16:41:46.000000000 +0100 @@ -1045,6 +1045,9 @@ 'vec2': (2, gl.GL_FLOAT, np.float32), 'vec3': (3, gl.GL_FLOAT, np.float32), 'vec4': (4, gl.GL_FLOAT, np.float32), + 'ivec2': (2, gl.GL_INT, np.int32), + 'ivec3': (3, gl.GL_INT, np.int32), + 'ivec4': (4, gl.GL_INT, np.int32), 'int': (1, gl.GL_INT, np.int32), 'bool': (1, gl.GL_BOOL, np.int32) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/vispy/plot/plotwidget.py new/vispy-0.14.2/vispy/plot/plotwidget.py --- old/vispy-0.14.1/vispy/plot/plotwidget.py 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/vispy/plot/plotwidget.py 2024-03-14 16:41:46.000000000 +0100 @@ -267,7 +267,7 @@ if meshdata is not None: if not all(x is None for x in (vertices, faces, fname)): raise ValueError('vertices, faces, and fname must be None if ' - 'fname is not None') + 'meshdata is not None') else: meshdata = MeshData(vertices, faces, vertex_colors=vertex_colors, face_colors=face_colors) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/vispy/testing/image_tester.py new/vispy-0.14.2/vispy/testing/image_tester.py --- old/vispy-0.14.1/vispy/testing/image_tester.py 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/vispy/testing/image_tester.py 2024-03-14 16:41:46.000000000 +0100 @@ -157,6 +157,27 @@ _save_failed_test(image, std_image, standard_file) raise +# TODO: check for more properties of image +def assert_image_reasonable(image): + """Check that an image is reasonable. + + The given image is checked to not be completely black or white. + + Parameters: + ----------- + image : (h, w, 4) ndarray or 'screenshot' + The test result to check + """ + if isinstance(image, str) and image == "screenshot": + image = _screenshot(alpha=True) + + # check dimensions + assert image.ndim == 3 + assert image.shape[2] == 4 + + # check white or black + assert image[...,:3].max() > 0 + assert image[...,:3].min() < 255 def assert_image_match(im1, im2, min_corr=0.9, px_threshold=50., px_count=None, max_px_diff=None, avg_px_diff=None, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/vispy/version.py new/vispy-0.14.2/vispy/version.py --- old/vispy-0.14.1/vispy/version.py 2023-10-03 23:33:28.000000000 +0200 +++ new/vispy-0.14.2/vispy/version.py 2024-03-14 16:42:02.000000000 +0100 @@ -1,4 +1,4 @@ # file generated by setuptools_scm # don't change, don't track in version control -__version__ = version = '0.14.1' -__version_tuple__ = version_tuple = (0, 14, 1) +__version__ = version = '0.14.2' +__version_tuple__ = version_tuple = (0, 14, 2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/vispy/visuals/ellipse.py new/vispy-0.14.2/vispy/visuals/ellipse.py --- old/vispy-0.14.1/vispy/visuals/ellipse.py 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/vispy/visuals/ellipse.py 2024-03-14 16:41:46.000000000 +0100 @@ -27,7 +27,7 @@ The width of the border in pixels Line widths > 1px are only guaranteed to work when using `border_method='agg'` method. - radius : float | tuple + radius : float | tuple | list | numpy.ndarray Radius or radii of the ellipse Defaults to (0.1, 0.1) start_angle : float @@ -65,13 +65,12 @@ @staticmethod def _generate_vertices(center, radius, start_angle, span_angle, num_segments): - if isinstance(radius, (list, tuple)): + if isinstance(radius, (list, tuple, np.ndarray)): if len(radius) == 2: xr, yr = radius else: - raise ValueError("radius must be float or 2 value tuple/list" - " (got %s of length %d)" % (type(radius), - len(radius))) + raise ValueError("radius must be float or 2 value tuple/list/numpy.ndarray " + f"(got {type(radius)} of length {len(radius)})") else: xr = yr = radius diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/vispy/visuals/markers.py new/vispy-0.14.2/vispy/visuals/markers.py --- old/vispy-0.14.1/vispy/visuals/markers.py 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/vispy/visuals/markers.py 2024-03-14 16:41:46.000000000 +0100 @@ -4,7 +4,6 @@ # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- """Marker Visual and shader definitions.""" - import numpy as np from ..color import ColorArray @@ -497,9 +496,11 @@ The symbol size in screen (or data, if scaling is on) px. edge_width : float or array or None The width of the symbol outline in screen (or data, if scaling is on) px. + Defaults to 1.0 if None or not provided and ``edge_width_rel`` is not + provided. edge_width_rel : float or array or None - The width as a fraction of marker size. Exactly one of - `edge_width` and `edge_width_rel` must be supplied. + The width as a fraction of marker size. Can not be specified along with + edge_width. A ValueError will be raised if both are provided. edge_color : Color | ColorArray The color used to draw each symbol outline. face_color : Color | ColorArray @@ -580,7 +581,7 @@ self.freeze() - def set_data(self, pos=None, size=10., edge_width=1., edge_width_rel=None, + def set_data(self, pos=None, size=10., edge_width=None, edge_width_rel=None, edge_color='black', face_color='white', symbol='o'): """Set the data used to display this visual. @@ -593,9 +594,11 @@ The symbol size in screen (or data, if scaling is on) px. edge_width : float or array or None The width of the symbol outline in screen (or data, if scaling is on) px. + Defaults to 1.0 if None or not provided and ``edge_width_rel`` is not + provided. edge_width_rel : float or array or None - The width as a fraction of marker size. Exactly one of - `edge_width` and `edge_width_rel` must be supplied. + The width as a fraction of marker size. Can not be specified along with + edge_width. A ValueError will be raised if both are provided. edge_color : Color | ColorArray The color used to draw each symbol outline. face_color : Color | ColorArray @@ -603,9 +606,11 @@ symbol : str or array The style of symbol used to draw each marker (see Notes). """ - if (edge_width is not None) + (edge_width_rel is not None) != 1: - raise ValueError('exactly one of edge_width and edge_width_rel ' - 'must be non-None') + if edge_width is not None and edge_width_rel is not None: + raise ValueError("either edge_width or edge_width_rel " + "should be provided, not both") + elif edge_width is None and edge_width_rel is None: + edge_width = 1.0 if edge_width is not None: edge_width = np.asarray(edge_width) @@ -616,10 +621,6 @@ if np.any(edge_width_rel < 0): raise ValueError('edge_width_rel cannot be negative') - if symbol is not None: - if not np.all(np.isin(np.asarray(symbol), self.symbols)): - raise ValueError(f'symbols must one of {self.symbols}') - edge_color = ColorArray(edge_color).rgba if len(edge_color) == 1: edge_color = edge_color[0] @@ -648,7 +649,15 @@ data['a_position'][:, :pos.shape[1]] = pos data['a_size'] = size - data['a_symbol'] = np.vectorize(self._symbol_shader_values.get)(symbol) + if symbol is None: + data["a_symbol"] = np.array(None) + else: + if isinstance(symbol, str): + symbol = [symbol] + try: + data['a_symbol'] = np.array([self._symbol_shader_values[x] for x in symbol]) + except KeyError: + raise ValueError(f'symbols must one of {self.symbols}') self._data = data self._vbo.set_data(data) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/vispy/visuals/surface_plot.py new/vispy-0.14.2/vispy/visuals/surface_plot.py --- old/vispy-0.14.1/vispy/visuals/surface_plot.py 2023-10-03 23:33:02.000000000 +0200 +++ new/vispy-0.14.2/vispy/visuals/surface_plot.py 2024-03-14 16:41:46.000000000 +0100 @@ -70,8 +70,8 @@ if z is not None: if self._x is not None and z.shape[0] != len(self._x): raise TypeError('Z values must have shape (len(x), len(y))') - if self._y is not None and z.shape[1] != len(self._y): - raise TypeError('Z values must have shape (len(x), len(y))') + if self._y is not None and z.shape[1] != self._y.shape[-1]: + raise TypeError('Z values must have shape (len(x), len(y)) or (x.shape[0], y.shape[1])') self._z = z if (self.__vertices is not None and self._z.shape != self.__vertices.shape[:2]): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/vispy/visuals/tests/test_surface_plot.py new/vispy-0.14.2/vispy/visuals/tests/test_surface_plot.py --- old/vispy-0.14.1/vispy/visuals/tests/test_surface_plot.py 1970-01-01 01:00:00.000000000 +0100 +++ new/vispy-0.14.2/vispy/visuals/tests/test_surface_plot.py 2024-03-14 16:41:46.000000000 +0100 @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +from vispy.scene.visuals import SurfacePlot +from vispy.scene import TurntableCamera +from vispy.color import get_colormap +from vispy.testing import requires_application, TestingCanvas, run_tests_if_main +from vispy.testing.image_tester import assert_image_reasonable + +import numpy as np +import pytest + + +@requires_application() +@pytest.mark.parametrize('x1dim', [True, False]) +@pytest.mark.parametrize('y1dim', [True, False]) +def test_surface_plot(x1dim:bool, y1dim:bool): + """Test SurfacePlot visual""" + with TestingCanvas(bgcolor='w') as c: + + # create data + nx, ny = (100, 150) + x = np.linspace(-2, 2, nx) + y = np.linspace(-3, 3, ny) + xv, yv = np.meshgrid(x, y, indexing="ij") + z = np.sin(xv**2 + yv**2) + + view = c.central_widget.add_view() + view.camera = TurntableCamera(up='z', fov=60) + + # color vertices + cnorm = z / abs(np.amax(z)) + colormap = get_colormap("viridis").map(cnorm) + colormap.reshape(z.shape + (-1,)) + + # 1 or 2 dimensional x and y data + x_input = x if x1dim else xv + y_input = y if y1dim else yv + + # create figure + surface = SurfacePlot(z=z, + x=x_input, + y=y_input, + shading=None) + + surface.mesh_data.set_vertex_colors(colormap) + + # c.draw_visual(surface) + view.add(surface) + + assert_image_reasonable(c.render()) + + +run_tests_if_main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/vispy.egg-info/PKG-INFO new/vispy-0.14.2/vispy.egg-info/PKG-INFO --- old/vispy-0.14.1/vispy.egg-info/PKG-INFO 2023-10-03 23:33:28.000000000 +0200 +++ new/vispy-0.14.2/vispy.egg-info/PKG-INFO 2024-03-14 16:42:02.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: vispy -Version: 0.14.1 +Version: 0.14.2 Summary: Interactive visualization in Python Home-page: http://vispy.org Download-URL: https://pypi.python.org/pypi/vispy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/vispy.egg-info/SOURCES.txt new/vispy-0.14.2/vispy.egg-info/SOURCES.txt --- old/vispy-0.14.1/vispy.egg-info/SOURCES.txt 2023-10-03 23:33:28.000000000 +0200 +++ new/vispy-0.14.2/vispy.egg-info/SOURCES.txt 2024-03-14 16:42:02.000000000 +0100 @@ -28,7 +28,7 @@ ci/requirements/linux_osmesa_deps_conda.txt ci/requirements/linux_website_deps_pip.txt ci/requirements/py310.yml -ci/requirements/py38.yml +ci/requirements/py39.yml doc/.gitignore doc/.nojekyll doc/CNAME @@ -804,6 +804,7 @@ vispy/visuals/tests/test_scalable_textures.py vispy/visuals/tests/test_sdf.py vispy/visuals/tests/test_spectrogram.py +vispy/visuals/tests/test_surface_plot.py vispy/visuals/tests/test_text.py vispy/visuals/tests/test_volume.py vispy/visuals/tests/test_windbarb.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.1/vispy.egg-info/requires.txt new/vispy-0.14.2/vispy.egg-info/requires.txt --- old/vispy-0.14.1/vispy.egg-info/requires.txt 2023-10-03 23:33:28.000000000 +0200 +++ new/vispy-0.14.2/vispy.egg-info/requires.txt 2024-03-14 16:42:02.000000000 +0100 @@ -3,6 +3,7 @@ hsluv kiwisolver packaging +importlib-resources [doc] pydata-sphinx-theme