Skip to content

Commit

Permalink
PlotPy is the new guiqwt
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Oct 30, 2023
1 parent b4792b8 commit adbad47
Show file tree
Hide file tree
Showing 15 changed files with 534 additions and 25 deletions.
180 changes: 180 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "gettext - Scan",
"type": "shell",
"command": "cmd",
"args": [
"/c",
"gettext.bat",
"rescan",
],
"options": {
"cwd": "scripts",
"env": {
"UNATTENDED": "1",
"PYTHONUTF8": "1",
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
}
},
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
},
{
"label": "gettext - Compile",
"type": "shell",
"command": "cmd",
"args": [
"/c",
"gettext.bat",
"compile",
],
"options": {
"cwd": "scripts",
"env": {
"UNATTENDED": "1",
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
}
},
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
},
{
"label": "Run Pylint",
"type": "shell",
"command": "cmd",
"args": [
"/c",
"run_pylint.bat",
// "--disable=R0801,C0103,C0114,C0115,C0116,W0612,W0613",
"--disable=fixme,C,R,W",
],
"options": {
"cwd": "scripts",
"env": {
"UNATTENDED": "1",
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
}
},
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "dedicated",
"showReuseMessage": true,
"clear": true
}
},
{
"label": "Clean Up",
"type": "shell",
"command": "cmd",
"args": [
"/c",
"clean_up.bat"
],
"options": {
"cwd": "scripts",
},
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
},
{
"label": "Build documentation",
"type": "shell",
"command": "cmd",
"options": {
"cwd": "scripts",
"env": {
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
"UNATTENDED": "1",
}
},
"args": [
"/c",
"build_doc.bat"
],
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": true
}
},
{
"label": "Build all wheels",
"type": "shell",
"command": "cmd",
"options": {
"cwd": "scripts",
"env": {
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
"UNATTENDED": "1",
}
},
"args": [
"/c",
"build_wheels.bat"
],
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": true
},
"dependsOrder": "sequence",
"dependsOn": [
"Clean Up",
]
}
]
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# guiqwt Releases #

## Version 4.4.5 ##

Added warning regarding package obsolescence.
[PlotPy](https://github.com/PlotPyStack/plotpy) is the new version of guiqwt.

## Version 4.4.4 ##

Added compatibility with Python 3.12.
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

<img src="https://raw.githubusercontent.com/PlotPyStack/plotpy/master/doc/images/plotpy-banner.png">

guiqwt will soon be replaced by [plotpy](https://github.com/PlotPyStack/plotpy) which is a complete rewrite of the library, under more permissive license terms (BSD) with a lot of improvements (automatic test suite with ~70% test coverage, unified curve/image ready-to-use widgets, new documentation, ...).
guiqwt has been replaced by [PlotPy](https://github.com/PlotPyStack/plotpy) which is a complete rewrite of the library, under more permissive license terms (BSD) with a lot of improvements (automatic test suite with ~70% test coverage, unified curve/image ready-to-use widgets, new documentation, ...).
We strongly recommend to use PlotPy instead of guiqwt. First, because guiqwt is not maintained anymore and second, because PlotPy is far more robust and tested.
Moreover, you can easily migrate your existing guiqwt-based code to PlotPy thanks to the [migration guide](https://plotpy.readthedocs.io/en/latest/dev/guiqwt_to_plotpy.html).

------

Expand Down
Binary file added doc/images/plotpy-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 2 additions & 17 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
.. automodule:: guiqwt

.. only:: html and not htmlhelp

.. note::

Windows users may download the :download:`CHM Manual <../guiqwt.chm.zip>`.

After downloading this file, you may see blank pages in the documentation.
That's because Windows is blocking CHM files for security reasons.
Fixing this problem is easy:

* Right-click the CHM file, select properties, then click “Unblock”.
* Or compress the CHM file into a zip archive and decompress it in
another directory.
* Do not open the CHM file on a network drive.

Contents:

.. toctree::
:maxdepth: 2

overview
installation
migrating_from_v2_to_v3
Expand All @@ -28,7 +13,7 @@ Contents:
disthelpers
reference/index
development


Indices and tables:

Expand Down
39 changes: 36 additions & 3 deletions guiqwt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# -*- coding: utf-8 -*-
"""
.. warning::
*guiqwt* has been replaced by a new package called `PlotPy`_, which is a complete
rewrite of the library, under more permissive license terms (BSD) with a lot of
improvements (automatic test suite with ~70% test coverage, unified curve/image
ready-to-use widgets, new documentation, ...).
.. figure:: images/plotpy-banner.png
:align: center
We strongly recommend to use `PlotPy`_ instead of guiqwt. First, because guiqwt is
not maintained anymore and second, because `PlotPy`_ is far more robust and tested.
Moreover, you can easily migrate your existing guiqwt-based code to `PlotPy`_
thanks to the `migration guide <https://plotpy.readthedocs.io/en/latest/dev/guiqwt_to_plotpy.html>`_.
.. _PlotPy: https://github.com/PlotPyStack/plotpy
guiqwt
======
Expand All @@ -23,16 +40,24 @@
"""


__version__ = "4.4.4" # Update here *AND* in setup.py!
__version__ = "4.4.5" # Update here *AND* in setup.py!
# (Until setup.py has been fully retrofitted, this manual sync is mandatory)


def about(html=True, copyright_only=False):
"""Return text about this package"""
import sys, os, os.path as osp, platform, guidata, guiqwt, qwt
from guiqwt.config import _
import os
import os.path as osp
import platform
import sys

import guidata
import qwt
from qtpy import QtCore as QC

import guiqwt
from guiqwt.config import _

name = __file__.split(osp.sep)[-2]
tf1 = (
name,
Expand Down Expand Up @@ -599,3 +624,11 @@ def about(html=True, copyright_only=False):
#
#
# Version 2.0 dated 2006-09-05.
#
# 13.2 Failing an amicable solution within two (2) months as from their
# occurrence, and unless emergency proceedings are necessary, the
# disagreements or disputes shall be referred to the Paris Courts having
# jurisdiction, by the more diligent Party.
#
#
# Version 2.0 dated 2006-09-05.
18 changes: 18 additions & 0 deletions scripts/build_dist.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@echo off
REM This script was copied from PythonQwt project
REM ======================================================
REM Package build script
REM ======================================================
REM Licensed under the terms of the MIT License
REM Copyright (c) 2020 Pierre Raybaut
REM (see PythonQwt LICENSE file for more details)
REM ======================================================
call %~dp0utils GetScriptPath SCRIPTPATH
call %FUNC% GetLibName LIBNAME
call %FUNC% GetModName MODNAME
call %FUNC% SetPythonPath
call %FUNC% UsePython
if exist MANIFEST ( del /q MANIFEST )
%PYTHON% -m build
rmdir /s /q %LIBNAME%.egg-info
call %FUNC% EndOfScript
20 changes: 20 additions & 0 deletions scripts/build_doc.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@echo off
REM This script was copied from PythonQwt project
REM ======================================================
REM Documentation build script
REM ======================================================
REM Licensed under the terms of the MIT License
REM Copyright (c) 2020 Pierre Raybaut
REM (see PythonQwt LICENSE file for more details)
REM ======================================================
setlocal
call %~dp0utils GetScriptPath SCRIPTPATH
call %FUNC% GetLibName LIBNAME
call %FUNC% GetModName MODNAME
call %FUNC% SetPythonPath
call %FUNC% UsePython
cd %SCRIPTPATH%\..
%PYTHON% doc\update_requirements.py
sphinx-build -b html doc build\doc
start build\doc\index.html
call %FUNC% EndOfScript
36 changes: 36 additions & 0 deletions scripts/build_inplace.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@echo off
REM This script was copied from PythonQwt project
REM ======================================================
REM Package build script
REM ======================================================
REM Licensed under the terms of the MIT License
REM Copyright (c) 2020 Pierre Raybaut
REM (see PythonQwt LICENSE file for more details)
REM ======================================================
setlocal enabledelayedexpansion
call %~dp0utils GetScriptPath SCRIPTPATH
call %FUNC% GetModName MODNAME
call %FUNC% SetPythonPath

if exist MANIFEST ( del /q MANIFEST )
:: Iterate over all directories in the grandparent directory
:: (WinPython base directories)
call %FUNC% GetPythonExeGrandParentDir DIR0
for /D %%d in ("%DIR0%*") do (
:: Get the directory name without the path
for %%n in (%%d) do set "DIRNAME=%%~nxn"

:: Check if the directory ends with "-PyQt6" or "-PySide6"
if not "!DIRNAME:~-6!"=="-PyQt6" (
if not "!DIRNAME:~-8!"=="-PySide6" (
set WINPYDIRBASE=%%d
call !WINPYDIRBASE!\scripts\env.bat
echo ******************************************************************************
echo Building %MODNAME% from "%%d"
echo ******************************************************************************
python setup.py build_ext --inplace
echo ----
)
)
)
call %FUNC% EndOfScript
Loading

0 comments on commit adbad47

Please sign in to comment.