[PATCH 0/3] Add python-scikit-rf.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Vinicius Monego
Owner
unassigned
Submitted by
Vinicius Monego
Severity
normal
V
V
Vinicius Monego wrote on 25 Dec 2022 23:53
(address . guix-patches@gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20221225225330.829571-1-monego@posteo.net
Vinicius Monego (3):
gnu: python-pyqtgraph: Update to 0.13.1.
gnu: Add python-pyvisa.
gnu: Add python-scikit-rf.

gnu/packages/engineering.scm | 71 ++++++++++++++++++++++++++++++++++++
gnu/packages/python-xyz.scm | 43 +++++++---------------
2 files changed, 84 insertions(+), 30 deletions(-)

--
2.34.1
V
V
Vinicius Monego wrote on 25 Dec 2022 23:57
[PATCH 1/3] gnu: python-pyqtgraph: Update to 0.13.1.
(address . 60324@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20221225225801.829867-1-monego@posteo.net
* gnu/packages/python-xyz.scm (python-pyqtgraph): Update to 0.13.1.
[build-system]: Use pyproject-build-system.
[arguments]: Rewrite as G-expressions; add #:test-flags to disable
broken tests and enable more tests.
[phases]: Remove trailing #t; do not replace 'check phase; rename
'set-home-and-qpa phase to 'set-qpa.
[native-inputs]: Replace python-pytest with python-pytest-7.1.
---
Curious about the commit message on this one.

gnu/packages/python-xyz.scm | 43 +++++++++++--------------------------
1 file changed, 13 insertions(+), 30 deletions(-)

Toggle diff (62 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ba87a0e4bc..7f0e08bbdf 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16078,42 +16078,25 @@ (define-public python-anyqt
(define-public python-pyqtgraph
(package
(name "python-pyqtgraph")
- (version "0.12.1")
+ (version "0.13.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pyqtgraph" version))
(sha256
- (base32 "0kc7ncv0lr3spni29i9g8nszyr4xinswqi2zzs6v8kqqi593pvyj"))))
- (build-system python-build-system)
+ (base32 "026wq2p7h1dmg2ldwhxiv28i5qld0llhnak06dxp4rdrkpsqg3v9"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'check 'set-home-and-qpa
- (lambda _
- (setenv "HOME" "/tmp")
- (setenv "QT_QPA_PLATFORM" "offscreen")
- #t))
- (replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (invoke "pytest" "-vv" "-k"
- (string-append
- ;; These tests try to download online data.
- "not test_PolyLineROI"
- " and not test_getArrayRegion_axisorder"
- " and not test_getArrayRegion"
- " and not test_PlotCurveItem"
- " and not test_NonUniformImage_colormap"
- " and not test_NonUniformImage_lut"
- " and not test_ImageItem_axisorder"
- " and not test_ImageItem"
- ;; The test_reload test fails and suggests adding
- ;; "--assert=plain" to the pytest command, but it
- ;; doesn't solve the failure.
- " and not test_reload")))))))
- (native-inputs
- (list python-pytest python-pytest-cov python-pytest-xdist))
+ ;; This test fails. It suggests to disable assert rewriting in Pytest,
+ ;; but it still doesn't pass.
+ (list #:test-flags #~'("-k" "not test_reload")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'set-qpa
+ (lambda _
+ (setenv "QT_QPA_PLATFORM" "offscreen"))))))
+ (native-inputs
+ (list python-pytest-7.1 python-pytest-cov python-pytest-xdist))
(inputs
(list qtbase-5))
(propagated-inputs
--
2.34.1
V
V
Vinicius Monego wrote on 25 Dec 2022 23:58
[PATCH 2/3] gnu: Add python-pyvisa.
(address . 60324@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20221225225801.829867-2-monego@posteo.net
* gnu/packages/engineering.scm (python-pyvisa): New variable.
---
This package claims to be a Python interface to a library called "VISA" however I couldn't find such library. All the executable code in the repo is Python.

gnu/packages/engineering.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 28a79d7c5f..26f0db03d7 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -69,6 +69,7 @@ (define-module (gnu packages engineering)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
+ #:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (guix build-system qt)
#:use-module (gnu packages)
@@ -2378,6 +2379,39 @@ (define-public lib3mf
(home-page "https://3mf.io/")
(license license:bsd-2)))
+(define-public python-pyvisa
+ (package
+ (name "python-pyvisa")
+ (version "1.13.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "PyVISA" version))
+ (sha256
+ (base32
+ "1iprr3h6d4w6v8ksgqpkgg545sai7i8hi5a5an394p26b25h1yl9"))
+ (modules '((guix build utils)))
+ (snippet '(begin
+ ;; Delete bundled python-prettytable.
+ (delete-file-recursively "pyvisa/thirdparty")))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'use-system-prettytable
+ (lambda _
+ (substitute* "pyvisa/shell.py"
+ (("from .thirdparty import prettytable")
+ "import prettytable")))))))
+ (native-inputs (list python-pytest-7.1))
+ (propagated-inputs (list python-dataclasses python-prettytable
+ python-typing-extensions))
+ (home-page "https://pyvisa.readthedocs.io/en/latest/")
+ (synopsis "Python binding for the VISA library")
+ (description
+ "PyVISA is a Python package for support of the 'Virtual Instrument
+Software Architecture' (VISA), in order to control measurement devices and
+test equipment via GPIB, RS232, Ethernet or USB.")
+ (license license:expat)))
+
(define-public openscad
(package
(name "openscad")
--
2.34.1
V
V
Vinicius Monego wrote on 25 Dec 2022 23:58
[PATCH 3/3] gnu: Add python-scikit-rf.
(address . 60324@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20221225225801.829867-3-monego@posteo.net
* gnu/packages/engineering.scm (python-scikit-rf): New variable.
---
gnu/packages/engineering.scm | 37 ++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 26f0db03d7..03b2ff2ffc 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2412,6 +2412,43 @@ (define-public python-pyvisa
test equipment via GPIB, RS232, Ethernet or USB.")
(license license:expat)))
+(define-public python-scikit-rf
+ (package
+ (name "python-scikit-rf")
+ (version "0.24.1")
+ (source (origin
+ (method git-fetch) ;PyPI misses some files required for tests
+ (uri (git-reference
+ (url "https://github.com/scikit-rf/scikit-rf")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "1shp8q8324dkwf448mv9zzi7krx882p122ma4fk015qz91sg4wff"))
+ (file-name (git-file-name name version))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-matplotlib
+ python-networkx
+ python-numpy
+ python-openpyxl
+ python-pandas
+ python-pyqt
+ python-pyqtgraph
+ python-qtpy
+ python-scipy))
+ (native-inputs (list python-coverage
+ python-flake8
+ python-nbval
+ python-networkx
+ python-pytest-7.1
+ python-pytest-cov
+ python-pyvisa))
+ (home-page "https://scikit-rf.org/")
+ (synopsis "RF and Microwave Engineering Scikit")
+ (description
+ "Scikit-rf (aka @code{skrf}) is a Python package for RF/Microwave
+engineering.")
+ (license license:bsd-3)))
+
(define-public openscad
(package
(name "openscad")
--
2.34.1
L
L
Ludovic Courtès wrote on 31 Jan 2023 23:36
Re: bug#60324: [PATCH 0/3] Add python-scikit-rf.
(name . Vinicius Monego)(address . monego@posteo.net)(address . 60324@debbugs.gnu.org)
87bkmes564.fsf@gnu.org
Hi,

Vinicius Monego <monego@posteo.net> skribis:

Toggle quote (4 lines)
> gnu: python-pyqtgraph: Update to 0.13.1.
> gnu: Add python-pyvisa.
> gnu: Add python-scikit-rf.

It LGTM. https://qa.guix.gnu.org/issue/60324 is mute, unfortunately,
but if you confirmed that dependents of python-pyqtgraph still build,
please push!

Thanks,
Ludo’.
V
V
Vinicius Monego wrote on 6 Feb 2023 23:47
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 60324-done@debbugs.gnu.org)
43a8cff0-6cd0-826c-b816-a17ae4987739@posteo.net
Em 31/01/2023 7:36 PM, Ludovic Courtès escreveu:
Toggle quote (14 lines)
> Hi,
>
> Vinicius Monego <monego@posteo.net> skribis:
>
>> gnu: python-pyqtgraph: Update to 0.13.1.
>> gnu: Add python-pyvisa.
>> gnu: Add python-scikit-rf.
> It LGTM. <https://qa.guix.gnu.org/issue/60324> is mute, unfortunately,
> but if you confirmed that dependents of python-pyqtgraph still build,
> please push!
>
> Thanks,
> Ludo’.

Hi,

Pushed as  2a6cee99b38f17850bf0e5294b70ce0ee402802d. Thanks for review.

Vinicius
Closed
?