17
0

Accepting request 874020 from home:bnavigator:branches:devel:languages:python:numeric

- Update to 0.1.29
  * Add read-only
  * Only fix row and column count when not read-only
  * Only update visible cells in read-only mode. Dramatically
    speeds up viewing large datasets
  * Optimize copy-cut-delete (still slow)
  * Only update visible cells for writable tables
  * Fix a visualization issue when scrolling past the last row
  * Catch IndexError when copying
  * Fix RuntimeError when pasting cells
- test with rudimentary example.py
- adjust requirements

OBS-URL: https://build.opensuse.org/request/show/874020
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-python-qdatamatrix?expand=0&rev=3
This commit is contained in:
2021-02-20 18:10:23 +00:00
committed by Git OBS Bridge
parent 9f0be05321
commit 0e9afc99aa
5 changed files with 84 additions and 11 deletions

37
example.py Normal file
View File

@@ -0,0 +1,37 @@
#!/usr/bin/env python
#-*- coding:utf-8 -*-
"""
This file is part of qdatamatatrix.
qdatamatatrix is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
qdatamatatrix is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with qdatamatatrix. If not, see <http://www.gnu.org/licenses/>.
"""
from datamatrix import DataMatrix
from qdatamatrix import QDataMatrix
import sys
from qtpy import QtWidgets
import qtpy
dm = DataMatrix(length=3)
dm.col1 = 1, 2, 3
dm.col2 = 'a', 'b', 'c'
print(dm)
app = QtWidgets.QApplication(sys.argv)
qdm = QDataMatrix(dm)
qdm.resize(600,400)
# qdm.refresh()
qdm.show()
sys.exit(app.exec_())

View File

@@ -1,3 +1,19 @@
-------------------------------------------------------------------
Fri Feb 19 19:04:31 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to 0.1.29
* Add read-only
* Only fix row and column count when not read-only
* Only update visible cells in read-only mode. Dramatically
speeds up viewing large datasets
* Optimize copy-cut-delete (still slow)
* Only update visible cells for writable tables
* Fix a visualization issue when scrolling past the last row
* Catch IndexError when copying
* Fix RuntimeError when pasting cells
- test with rudimentary example.py
- adjust requirements
-------------------------------------------------------------------
Wed Mar 20 08:08:19 UTC 2019 - John Vandenberg <jayvdb@gmail.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-python-qdatamatrix
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,26 +12,36 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-python-qdatamatrix
Version: 0.1.18
Version: 0.1.29
Release: 0
License: GPL-3.0-or-later
Summary: A PyQt4/PyQt5 widget for viewing and editing a DataMatrix object
Url: https://github.com/smathot/python-qdatamatrix
License: GPL-3.0-or-later
Group: Development/Languages/Python
URL: https://github.com/open-cogsci/python-qdatamatrix
Source: https://files.pythonhosted.org/packages/source/p/python-qdatamatrix/python-qdatamatrix-%{version}.tar.gz
Source1: https://raw.githubusercontent.com/smathot/python-qdatamatrix/master/copyright
BuildRequires: python-rpm-macros
Source1: https://raw.githubusercontent.com/open-cogsci/python-qdatamatrix/master/copyright
Source2: https://raw.githubusercontent.com/open-cogsci/python-qdatamatrix/master/example.py
BuildRequires: %{python_module PrettyTable}
BuildRequires: %{python_module QtPy}
BuildRequires: %{python_module fastnumbers}
BuildRequires: %{python_module python-datamatrix}
# QtPy has a number of possible backends, none of them mandatory, use PyQt5 for the build
BuildRequires: %{python_module qt5}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: xvfb-run
Requires: python-PrettyTable
Requires: python-QtPy
Requires: python-python-datamatrix
Recommends: python-fastnumbers
BuildArch: noarch
%python_subpackages
@@ -43,6 +53,8 @@ view and edit a DataMatrix object.
%prep
%setup -q -n python-qdatamatrix-%{version}
cp %{SOURCE1} .
# don't run the event loop on the example
sed '/app.exec_/ d' %{SOURCE2} > example.py
%build
%python_build
@@ -51,8 +63,16 @@ cp %{SOURCE1} .
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
xvfb-run $python example.py
# wait before we start the next xvfb-run
sleep 5
}
%files %{python_files}
%license copyright
%{python_sitelib}/*
%{python_sitelib}/qdatamatrix
%{python_sitelib}/python_qdatamatrix-%{version}*-info
%changelog

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:baeb556db4ae2cc8ba7f3c3944d88f4ba72f0d5aae0fc41fad31b5f747dfce44
size 6539

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9724e52e75c53f65a49afa056c3a11222d8d7f42a85c20572d4df39407cf977d
size 7585