From 4432acfc6208ecf7514ac46b846044e54980e336 Mon Sep 17 00:00:00 2001 From: matsjoyce Date: Tue, 29 Oct 2024 13:54:07 +0000 Subject: [PATCH 01/10] Update to Qt 6.8 --- .github/workflows/build.yml | 2 +- QuickGraphLib/bindings/pyigen.py | 1 + README.md | 11 +++++++++++ ci/setup_qt.py | 2 +- docs/build_docs.py | 2 +- pyproject.toml | 7 +++---- requirements.txt | 10 +++++----- 7 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 441a9e9..06ee772 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: uses: jurplel/install-qt-action@v3 with: aqtversion: "==3.1.*" - version: "6.5.3" + version: "6.8.0" archives: "qttools qtdeclarative qtbase qtsvg icu" documentation: true doc-archives: "qtcore qtgui qtqml qtqmlcore qtqmlmodels qtquick qtquickcontrols qtquickdialogs qtsvg" diff --git a/QuickGraphLib/bindings/pyigen.py b/QuickGraphLib/bindings/pyigen.py index 52562c3..7871c06 100644 --- a/QuickGraphLib/bindings/pyigen.py +++ b/QuickGraphLib/bindings/pyigen.py @@ -22,6 +22,7 @@ cm = contextlib.nullcontext() with cm: pyi_generator.PySide6 = PySide6 + pyi_generator.os = os pyi_generator.main() # Fixup diff --git a/README.md b/README.md index 90512ba..e56f58c 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ A scientific graphing library for [QtQuick](https://doc.qt.io/qt-6/qtquick-index Links: - [Online documentation](https://refeyn.github.io/QuickGraphLib) - [PyPI page](https://pypi.org/project/QuickGraphLib/) + - [Pre-built artefacts](https://github.com/refeyn/QuickGraphLib/releases/latest) Key advantages: @@ -14,6 +15,16 @@ Key advantages: - Interactivity supported natively though declarative bindings and QtQuick - Support for PNG and SVG export +## Qt version compatibility + +This version of QuickGraphLib is compatible with Qt and PySide6 6.8.0. If you use this module from C++, then Qt's ABI stability guarantees means the compiled binaries will work for any Qt version >= 6.8 and < 7.0. If you use this module from Python, there are some additional features that rely on the PySide6 library version. Therefore the PySide6 version must be 6.8.0 exactly. + +The pre-build wheels aim to be compatible with the most recent recent Qt LTS version, which is currently 6.8. Pre-built wheels for higher non-LTS Qt versions will likely be available once Qt 6.9 is released. + +## Python version compatibility + +QuickGraphLib is compatible with the same Python versions and glibc versions that PySide6 is. + ## Examples The example gallery can be run using (provided the Python environment has [PySide6](https://pypi.org/project/PySide6/) and [contourpy](https://pypi.org/project/contourpy/) installed): diff --git a/ci/setup_qt.py b/ci/setup_qt.py index 284ec09..688e594 100644 --- a/ci/setup_qt.py +++ b/ci/setup_qt.py @@ -26,7 +26,7 @@ "install-qt", qt_platform, "desktop", - "6.5.3", + "6.8.0", qt_arch, "-O", "./qt", diff --git a/docs/build_docs.py b/docs/build_docs.py index 06f3021..6851bb2 100644 --- a/docs/build_docs.py +++ b/docs/build_docs.py @@ -15,7 +15,7 @@ "In file included from", ] -QT_PATH = pathlib.Path(os.environ.get("Qt6_DIR", "C:/Qt/6.5.3/msvc2019_64")) +QT_PATH = pathlib.Path(os.environ.get("Qt6_DIR", "C:/Qt/6.8.0/msvc2019_64")) QT_VERSION = QT_PATH.parts[-2] QDOC_PATH = QT_PATH / "bin/qdoc.exe" INDEX_PATH = QT_PATH.parent.parent / ("Docs/Qt-" + QT_VERSION) diff --git a/pyproject.toml b/pyproject.toml index ee28907..c9c7795 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ description = "A scientific graphing library for QtQuick" readme = "README.md" license = { file = "LICENCE" } authors = [{ name = "Matthew Joyce", email = "matthew.joyce@refeyn.com" }] -dependencies = ["PySide6", "contourpy"] +dependencies = ["PySide6==6.8.0", "contourpy"] classifiers = [ "Development Status :: 3 - Alpha", "Environment :: X11 Applications :: Qt", @@ -38,13 +38,12 @@ analyse = [ "pytest-cov", # Building "scikit-build-core", - "shiboken6_generator==6.5.3", - "PySide6==6.5.3", + "shiboken6_generator==6.8.0", "setuptools_scm", ] [build-system] -requires = ["scikit-build-core", "shiboken6_generator==6.5.3", "PySide6==6.5.3"] +requires = ["scikit-build-core", "shiboken6_generator==6.8.0", "PySide6==6.8.0"] build-backend = "scikit_build_core.build" [tool.scikit-build] diff --git a/requirements.txt b/requirements.txt index 23f7508..560093f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,16 +31,16 @@ pluggy==1.5.0 pre-commit==3.7.1 pylint==3.2.6 pyproject_hooks==1.1.0 -PySide6==6.5.3 -PySide6-Addons==6.5.3 -PySide6-Essentials==6.5.3 +PySide6==6.8.0 +PySide6-Addons==6.8.0 +PySide6-Essentials==6.8.0 pytest==8.3.1 pytest-cov==5.0.0 PyYAML==6.0.1 scikit_build_core==0.9.8 setuptools-scm==8.1.0 -shiboken6==6.5.3 -shiboken6-generator==6.5.3 +shiboken6==6.8.0 +shiboken6-generator==6.8.0 tomli==2.0.1 tomlkit==0.13.0 typing_extensions==4.12.2 From e51b6a1f45a89c9f7c0bc90c28df80953b6df021 Mon Sep 17 00:00:00 2001 From: matsjoyce Date: Tue, 29 Oct 2024 14:01:19 +0000 Subject: [PATCH 02/10] Fixes --- .github/workflows/build.yml | 3 ++- ci/setup_qt.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06ee772..8eb5c3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,10 +28,11 @@ jobs: cache-dependency-path: "./requirements.txt" - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: aqtversion: "==3.1.*" version: "6.8.0" + arch: "win64_msvc2022_64" archives: "qttools qtdeclarative qtbase qtsvg icu" documentation: true doc-archives: "qtcore qtgui qtqml qtqmlcore qtqmlmodels qtquick qtquickcontrols qtquickdialogs qtsvg" diff --git a/ci/setup_qt.py b/ci/setup_qt.py index 688e594..e928022 100644 --- a/ci/setup_qt.py +++ b/ci/setup_qt.py @@ -10,11 +10,11 @@ elif sys.platform == "win32": qt_platform = "windows" - qt_arch = "win64_msvc2019_64" + qt_arch = "win64_msvc2022_64" elif sys.platform == "darwin": - qtPlatform = "mac" - qtArch = "clang_64" + qt_platform = "mac" + qt_arch = "clang_64" else: raise RuntimeError(f"Unknown platform {sys.platform}") From bc8efe9252673135eb19eabe1e12e56e8a225f48 Mon Sep 17 00:00:00 2001 From: matsjoyce Date: Tue, 29 Oct 2024 14:41:58 +0000 Subject: [PATCH 03/10] QML reformat --- QuickGraphLib/PreFabs/ImageAxes.qml | 6 +++--- examples/BuiltinColormaps.qml | 6 +++--- examples/Conway.qml | 12 ++++++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/QuickGraphLib/PreFabs/ImageAxes.qml b/QuickGraphLib/PreFabs/ImageAxes.qml index 17cfe3d..b6c1407 100644 --- a/QuickGraphLib/PreFabs/ImageAxes.qml +++ b/QuickGraphLib/PreFabs/ImageAxes.qml @@ -151,9 +151,9 @@ QuickGraphLib.AntialiasingContainer { property var colors: QuickGraphLib.ColorMaps.colors(root.colorMesh.colormap) stops: colors.map((color, i) => gradStop.createObject(grad, { - "color": color, - "position": i / (colors.length - 1) - })) + "color": color, + "position": i / (colors.length - 1) + })) } } QuickGraphLib.Axis { diff --git a/examples/BuiltinColormaps.qml b/examples/BuiltinColormaps.qml index 3eb7a6a..1484820 100644 --- a/examples/BuiltinColormaps.qml +++ b/examples/BuiltinColormaps.qml @@ -64,9 +64,9 @@ Item { orientation: Gradient.Horizontal stops: colors.map((color, i) => gradStop.createObject(grad, { - "color": color, - "position": i / (colors.length - 1) - })) + "color": color, + "position": i / (colors.length - 1) + })) } } } diff --git a/examples/Conway.qml b/examples/Conway.qml index 59b0828..1811a54 100644 --- a/examples/Conway.qml +++ b/examples/Conway.qml @@ -72,16 +72,20 @@ QQL.ColumnLayout { QQC.ComboBox { id: displayModeCombo - model: [{ + model: [ + { "value": "historyCells", "text": "Cells with history" - }, { + }, + { "value": "cells", "text": "Cells" - }, { + }, + { "value": "neighbourCounts", "text": "Neighbour counts" - }] + } + ] textRole: "text" valueRole: "value" } From 9af442db6dfcba6c6dc812d9ac898ad1e0b69c00 Mon Sep 17 00:00:00 2001 From: matsjoyce Date: Tue, 29 Oct 2024 15:38:18 +0000 Subject: [PATCH 04/10] Typing fix --- QuickGraphLib/contours.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/QuickGraphLib/contours.py b/QuickGraphLib/contours.py index 4574130..b7098aa 100644 --- a/QuickGraphLib/contours.py +++ b/QuickGraphLib/contours.py @@ -36,8 +36,7 @@ def contour_line( ) result = [] for loop in gen.lines(height): - assert isinstance(loop, np.ndarray), "Loop is not an array" # For mypy - result.append(QGLPolygonF.fromNDArray(loop)) + result.append(QGLPolygonF.fromNDArray(loop)) # type: ignore[arg-type] return result From 58c9fa14c6a332f9663ce288f83e7340417d9fce Mon Sep 17 00:00:00 2001 From: matsjoyce Date: Tue, 29 Oct 2024 15:52:16 +0000 Subject: [PATCH 05/10] Path fix --- docs/build_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build_docs.py b/docs/build_docs.py index 6851bb2..be0f796 100644 --- a/docs/build_docs.py +++ b/docs/build_docs.py @@ -15,7 +15,7 @@ "In file included from", ] -QT_PATH = pathlib.Path(os.environ.get("Qt6_DIR", "C:/Qt/6.8.0/msvc2019_64")) +QT_PATH = pathlib.Path(os.environ.get("QT_ROOT_DIR", "C:/Qt/6.8.0/msvc2022_64")) QT_VERSION = QT_PATH.parts[-2] QDOC_PATH = QT_PATH / "bin/qdoc.exe" INDEX_PATH = QT_PATH.parent.parent / ("Docs/Qt-" + QT_VERSION) From e7e7daa0dfddc2612ff6a5d3d08155e723de69ac Mon Sep 17 00:00:00 2001 From: matsjoyce Date: Tue, 29 Oct 2024 16:50:38 +0000 Subject: [PATCH 06/10] Fix linux arch --- ci/setup_qt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/setup_qt.py b/ci/setup_qt.py index e928022..5824198 100644 --- a/ci/setup_qt.py +++ b/ci/setup_qt.py @@ -6,7 +6,7 @@ if sys.platform == "linux": qt_platform = "linux" - qt_arch = "gcc_64" + qt_arch = "linux_gcc_64" elif sys.platform == "win32": qt_platform = "windows" From 44129f1845cf7adf75ca81eb6b8a881b4385e4f1 Mon Sep 17 00:00:00 2001 From: matsjoyce Date: Tue, 29 Oct 2024 17:23:23 +0000 Subject: [PATCH 07/10] Update Python to 3.9 --- QuickGraphLib/bindings/CMakeLists.txt | 2 +- pyproject.toml | 10 +++++----- setup.cfg | 2 -- 3 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 setup.cfg diff --git a/QuickGraphLib/bindings/CMakeLists.txt b/QuickGraphLib/bindings/CMakeLists.txt index a6f060d..e804612 100644 --- a/QuickGraphLib/bindings/CMakeLists.txt +++ b/QuickGraphLib/bindings/CMakeLists.txt @@ -145,7 +145,7 @@ python_add_library( ShibokenHelpers.cpp WITH_SOABI USE_SABI - 3.7 + 3.9 ) # Apply relevant include and link flags. diff --git a/pyproject.toml b/pyproject.toml index c9c7795..2b6ee30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ build-backend = "scikit_build_core.build" metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" sdist.include = ["QuickGraphLib/_version.py"] sdist.exclude = [".github", ".vscode"] -wheel.py-api = "cp37" +wheel.py-api = "cp39" [tool.scikit-build.cmake.define] INSTALL_SUBPATH = "." @@ -60,10 +60,10 @@ write_to = "QuickGraphLib/_version.py" [tool.cibuildwheel] build = [ - "cp37-macosx_x86_64", - "cp37-win_amd64", - "cp37-manylinux_x86_64", - # "cp37-manylinux_aarch64", + "cp39-macosx_x86_64", + "cp39-win_amd64", + "cp39-manylinux_x86_64", + # "cp39-manylinux_aarch64", ] before-all = "python ci/setup_qt.py" repair-wheel-command = "" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index fe6cd1e..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -py_limited_api = cp37 \ No newline at end of file From 6fd2c53171325f267e999e1bc2fe1614a4e4e28a Mon Sep 17 00:00:00 2001 From: matsjoyce Date: Tue, 29 Oct 2024 17:34:02 +0000 Subject: [PATCH 08/10] More missed version bumps --- CMakeLists.txt | 2 +- QuickGraphLib/bindings/CMakeLists.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 431d3d3..e663a08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,6 @@ if(NOT INSTALL_SUBPATH) endif() find_package(Qt6 REQUIRED COMPONENTS Quick Svg) -qt_standard_project_setup(REQUIRES 6.5) +qt_standard_project_setup(REQUIRES 6.8) add_subdirectory(QuickGraphLib) diff --git a/QuickGraphLib/bindings/CMakeLists.txt b/QuickGraphLib/bindings/CMakeLists.txt index e804612..1249c36 100644 --- a/QuickGraphLib/bindings/CMakeLists.txt +++ b/QuickGraphLib/bindings/CMakeLists.txt @@ -31,21 +31,21 @@ find_path( ) find_library( shiboken_shared_libraries - NAMES shiboken6 shiboken6.abi3 libshiboken6.abi3.so.6.5 + NAMES shiboken6 shiboken6.abi3 libshiboken6.abi3.so.6.8 PATH_SUFFIXES shiboken6 PATHS "${Python_SITELIB}" REQUIRED ) find_library( pyside_shared_library - NAMES pyside6 pyside6.abi3 libpyside6.abi3.so.6.5 + NAMES pyside6 pyside6.abi3 libpyside6.abi3.so.6.8 PATH_SUFFIXES PySide6 PATHS "${Python_SITELIB}" REQUIRED ) find_library( pyside_qml_shared_library - NAMES pyside6qml pyside6qml.abi3 libpyside6qml.abi3.so.6.5 + NAMES pyside6qml pyside6qml.abi3 libpyside6qml.abi3.so.6.8 PATH_SUFFIXES PySide6 PATHS "${Python_SITELIB}" REQUIRED From 541ece86a71c3c5e51b5ad458f228b1c7e65fce4 Mon Sep 17 00:00:00 2001 From: matsjoyce Date: Tue, 29 Oct 2024 17:48:08 +0000 Subject: [PATCH 09/10] Prevent numpy 2 being used --- README.md | 2 +- pyproject.toml | 6 +++--- requirements.txt | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e56f58c..eb1cf09 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Key advantages: ## Qt version compatibility -This version of QuickGraphLib is compatible with Qt and PySide6 6.8.0. If you use this module from C++, then Qt's ABI stability guarantees means the compiled binaries will work for any Qt version >= 6.8 and < 7.0. If you use this module from Python, there are some additional features that rely on the PySide6 library version. Therefore the PySide6 version must be 6.8.0 exactly. +This version of QuickGraphLib is compatible with Qt and PySide6 6.8.0. If you use this module from C++, then Qt's ABI stability guarantees means the compiled binaries will work for any Qt version >= 6.8 and < 7.0. If you use this module from Python, there are some additional features that rely on the PySide6 library version. Therefore the PySide6 version must be 6.8.0.2 exactly. Other 6.8 versions of PySide6 may work, but there are no guarantees. The pre-build wheels aim to be compatible with the most recent recent Qt LTS version, which is currently 6.8. Pre-built wheels for higher non-LTS Qt versions will likely be available once Qt 6.9 is released. diff --git a/pyproject.toml b/pyproject.toml index 2b6ee30..e59748e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ description = "A scientific graphing library for QtQuick" readme = "README.md" license = { file = "LICENCE" } authors = [{ name = "Matthew Joyce", email = "matthew.joyce@refeyn.com" }] -dependencies = ["PySide6==6.8.0", "contourpy"] +dependencies = ["PySide6==6.8.0.2", "contourpy", "numpy<2"] classifiers = [ "Development Status :: 3 - Alpha", "Environment :: X11 Applications :: Qt", @@ -38,12 +38,12 @@ analyse = [ "pytest-cov", # Building "scikit-build-core", - "shiboken6_generator==6.8.0", + "shiboken6_generator==6.8.0.2", "setuptools_scm", ] [build-system] -requires = ["scikit-build-core", "shiboken6_generator==6.8.0", "PySide6==6.8.0"] +requires = ["scikit-build-core", "shiboken6_generator==6.8.0.2", "PySide6==6.8.0.2"] build-backend = "scikit_build_core.build" [tool.scikit-build] diff --git a/requirements.txt b/requirements.txt index 560093f..ac6bf02 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,16 +31,16 @@ pluggy==1.5.0 pre-commit==3.7.1 pylint==3.2.6 pyproject_hooks==1.1.0 -PySide6==6.8.0 -PySide6-Addons==6.8.0 -PySide6-Essentials==6.8.0 +PySide6==6.8.0.2 +PySide6-Addons==6.8.0.2 +PySide6-Essentials==6.8.0.2 pytest==8.3.1 pytest-cov==5.0.0 PyYAML==6.0.1 scikit_build_core==0.9.8 setuptools-scm==8.1.0 -shiboken6==6.8.0 -shiboken6-generator==6.8.0 +shiboken6==6.8.0.2 +shiboken6-generator==6.8.0.2 tomli==2.0.1 tomlkit==0.13.0 typing_extensions==4.12.2 From e1194e97b4e9a1b7b1cbdfc6e863969b222eabc1 Mon Sep 17 00:00:00 2001 From: matsjoyce Date: Wed, 30 Oct 2024 10:22:27 +0000 Subject: [PATCH 10/10] More READMEing --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index eb1cf09..880d552 100644 --- a/README.md +++ b/README.md @@ -15,22 +15,22 @@ Key advantages: - Interactivity supported natively though declarative bindings and QtQuick - Support for PNG and SVG export -## Qt version compatibility - -This version of QuickGraphLib is compatible with Qt and PySide6 6.8.0. If you use this module from C++, then Qt's ABI stability guarantees means the compiled binaries will work for any Qt version >= 6.8 and < 7.0. If you use this module from Python, there are some additional features that rely on the PySide6 library version. Therefore the PySide6 version must be 6.8.0.2 exactly. Other 6.8 versions of PySide6 may work, but there are no guarantees. - -The pre-build wheels aim to be compatible with the most recent recent Qt LTS version, which is currently 6.8. Pre-built wheels for higher non-LTS Qt versions will likely be available once Qt 6.9 is released. - -## Python version compatibility - -QuickGraphLib is compatible with the same Python versions and glibc versions that PySide6 is. - ## Examples The example gallery can be run using (provided the Python environment has [PySide6](https://pypi.org/project/PySide6/) and [contourpy](https://pypi.org/project/contourpy/) installed): ```bash -python examples\gallery.py +python examples/gallery.py ```

+ +## Qt version compatibility + +This version of QuickGraphLib is compatible with Qt and PySide6 6.8.0. If you use this module from C++, then Qt's ABI stability guarantees means the compiled binaries will work for any Qt version >= 6.8 and < 7.0. If you use this module from Python, there are some additional features that rely on the PySide6 library version. Therefore the PySide6 version must be 6.8.0.2 exactly. Other 6.8 versions of PySide6 may work, but there are no guarantees. + +The pre-built wheels aim to be compatible with the most recent recent Qt LTS version, which is currently 6.8. Pre-built wheels for higher non-LTS Qt versions will likely be available once Qt 6.9 is released. + +## Python version compatibility + +QuickGraphLib is compatible with the same Python versions and glibc versions that PySide6 is. For PySide6 6.8, the minimum Python version is 3.9.