GNU bug report logs - #62061
[PATCH 0/3]: gnu: Add python-poliastro.

Previous Next

Package: guix-patches;

Reported by: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Date: Wed, 8 Mar 2023 23:22:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 62061 in the body.
You can then email your comments to 62061 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#62061; Package guix-patches. (Wed, 08 Mar 2023 23:22:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 08 Mar 2023 23:22:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 0/3]: gnu: Add python-poliastro.
Date: Wed,  8 Mar 2023 23:21:38 +0000
Hi Guix!

This patch series adds 2 new packages to Astronomy with minor fixes for
python-plotly resolving sanity check failure in python-poliastro.

Thanks,
Oleg

> ./pre-inst-env guix build --rounds=2 python-czml3 python-plotly python-poliastro
> /gnu/store/b13b1qr5z96k8kx4lkakyjsgycm5rldn-python-poliastro-0.17.0
> /gnu/store/7bz72gcf5l2rc2xrh3ixvq9fh9496y3j-python-plotly-5.6.0
> /gnu/store/wa4vzpfj0b9g0r3lnvzp2619w3fq19hm-python-czml3-0.7.0

Sharlatan Hellseher (3):
  gnu: Add python-czml3.
  gnu: python-plotly: Fix version detection.
  gnu: Add python-poliastro.

 gnu/packages/astronomy.scm | 105 +++++++++++++++++++++++++++++++++++++
 gnu/packages/graph.scm     |  34 +++++++-----
 2 files changed, 125 insertions(+), 14 deletions(-)

base-commit: 5befcff66edb4d72ab8e713c81836fb8519ce3e6
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#62061; Package guix-patches. (Wed, 08 Mar 2023 23:27:03 GMT) Full text and rfc822 format available.

Message #8 received at 62061 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62061 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 1/3] gnu: Add python-czml3.
Date: Wed,  8 Mar 2023 23:26:35 +0000
* gnu/packages/astronomy.scm (python-czml3): New variable.
---
 gnu/packages/astronomy.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 1c39c2a181..6179b2dbf5 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1281,6 +1281,37 @@ (define-public python-cdflib
 @end itemize")
     (license license:expat)))
 
+(define-public python-czml3
+  (package
+    (name "python-czml3")
+    (version "0.7.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/poliastro/czml3")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0pbwcsmc9nw591rck586ca9hwwhmm54rjjmp8gflhzq8b7f48lkc"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs
+     (list python-attrs
+           python-dateutil
+           python-w3lib))
+    (native-inputs
+     (list python-astropy
+           python-pytest
+           python-pytest-cov
+           python-pytest-mypy))
+    (home-page "https://github.com/poliastro/czml3")
+    (synopsis "Python library to write CZML")
+    (description
+     "Python 3 library to write CZML, a JSON format for describing a
+time-dynamic graphical scene, primarily for display in a web browser running
+Cesium.")
+    (license license:expat)))
+
 (define-public python-drms
   (package
     (name "python-drms")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#62061; Package guix-patches. (Wed, 08 Mar 2023 23:27:04 GMT) Full text and rfc822 format available.

Message #11 received at 62061 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62061 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 2/3] gnu: python-plotly: Fix version detection.
Date: Wed,  8 Mar 2023 23:26:36 +0000
* gnu/packages/graph.scm (python-plotly): Apply new package style.
  [arguments]: Add new fix-version phase.
  [arguments]{phases}: chdir phase, remove trailing #f from lambda.
---
 gnu/packages/graph.scm | 34 ++++++++++++++++++++--------------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index 104fe07b58..603f45ef10 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -230,24 +230,30 @@ (define-public python-plotly
                 "0kc9v5ampq2paw6sls6zdchvqvis7b1z8xhdvlhz5xxdr1vj5xnn"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
           (add-before 'build 'skip-npm
             ;; npm is not packaged so build without it
             (lambda _
               (setenv "SKIP_NPM" "T")))
-         (add-after 'unpack 'chdir
-           (lambda _
-             (chdir "packages/python/plotly")
-             #t))
-         (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (when tests?
-               (invoke "pytest" "-x" "plotly/tests/test_core")
-               (invoke "pytest" "-x" "plotly/tests/test_io")
-               ;; FIXME: Add optional dependencies and enable their tests.
-               ;; (invoke "pytest" "-x" "plotly/tests/test_optional")
-               (invoke "pytest" "_plotly_utils/tests")))))))
+          (add-after 'unpack 'fix-version
+            ;; Versioneer is useless when there is no git metadata.
+            (lambda _
+              (substitute* "packages/python/plotly/setup.py"
+                (("version=versioneer.get_version\\(),")
+                 (format #f "version=~s," #$version)))))
+          (add-after 'fix-version 'chdir
+            (lambda _
+              (chdir "packages/python/plotly")))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "pytest" "-x" "plotly/tests/test_core")
+                (invoke "pytest" "-x" "plotly/tests/test_io")
+                ;; FIXME: Add optional dependencies and enable their tests.
+                ;; (invoke "pytest" "-x" "plotly/tests/test_optional")
+                (invoke "pytest" "_plotly_utils/tests")))))))
     (native-inputs
      (list python-ipywidgets python-pytest python-xarray))
     (propagated-inputs
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#62061; Package guix-patches. (Wed, 08 Mar 2023 23:27:04 GMT) Full text and rfc822 format available.

Message #14 received at 62061 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62061 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 3/3] gnu: Add python-poliastro.
Date: Wed,  8 Mar 2023 23:26:37 +0000
* gnu/packages/astronomy.scm (python-poliastro): New variable.
---
 gnu/packages/astronomy.scm | 74 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 74 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 6179b2dbf5..3301a40142 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -46,6 +46,7 @@ (define-module (gnu packages astronomy)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gps)
+  #:use-module (gnu packages graph)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
@@ -1453,6 +1454,79 @@ (define-public python-photutils
 of astronomical sources.")
     (license license:bsd-3)))
 
+(define-public python-poliastro
+  (package
+    (name "python-poliastro")
+    (version "0.17.0")
+    (source
+     (origin
+       ;; PyPi tarball lacks tests.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/poliastro/poliastro")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1iclyjp0cvm6hp5qf4fzklszxvhj3idkxgb6a9h7xzg9bf5j5gi2"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; NOTE: Tests take about 7-10 minutes to pass.
+          (add-before 'check 'prepare-test-environment
+            (lambda _
+              (setenv "HOME" "/tmp")
+              ;; TODO: Review failing tests later when any upstream
+              ;; suggestions are provided:
+              ;; https://github.com/poliastro/poliastro/issues/1618
+              (substitute* "tests/test_czml.py"
+              (("def test_czml_add_trajectory") "def __off_test_czml_add_trajectory")
+              (("def test_czml_custom_packet") "def __off_test_czml_custom_packet")
+              (("def test_czml_ground_station") "def __off_test_czml_ground_station")
+              (("def test_czml_groundtrack") "def __off_test_czml_groundtrack")
+              (("def test_czml_preamble") "def __off_test_czml_preamble"))))
+          (replace 'check
+            (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+              (when tests?
+                (invoke "python" "-m" "pytest"
+                        ;; Skip tests that need remote data.
+                        "-m" "not remote_data")))))))
+    (native-inputs
+     (list python-coverage
+           python-hypothesis
+           python-mypy
+           python-flit-core
+           python-pytest
+           python-pytest-cov
+           python-pytest-doctestplus
+           python-pytest-mpl
+           python-pytest-mypy))
+    (propagated-inputs
+     (list python-astropy
+           python-astroquery
+           python-czml3
+           python-jplephem
+           python-matplotlib
+           python-numba
+           python-numpy
+           python-pandas
+           python-plotly
+           python-pyerfa
+           python-scipy))
+    (home-page "https://www.poliastro.space/")
+    (synopsis "Astrodynamics in Python")
+    (description
+     "POLIASTRO is an Python library for interactive Astrodynamics and Orbital
+Mechanics, with a focus on ease of use, speed, and quick visualization.  It
+provides a simple and intuitive API, and handles physical quantities with units.
+
+Some features include orbit propagation, solution of the Lambert's problem,
+conversion between position and velocity vectors and classical orbital elements
+and orbit plotting, among others.  It focuses on interplanetary applications, but
+can also be used to analyze artificial satellites in Low-Earth Orbit (LEO).")
+  (license license:expat)))
+
 (define-public python-poppy
   (package
     (name "python-poppy")
-- 
2.39.1





Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Wed, 15 Mar 2023 23:20:02 GMT) Full text and rfc822 format available.

Notification sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
bug acknowledged by developer. (Wed, 15 Mar 2023 23:20:02 GMT) Full text and rfc822 format available.

Message #19 received at 62061-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 62061-done <at> debbugs.gnu.org
Subject: Re: [bug#62061] [PATCH 0/3]: gnu: Add python-poliastro.
Date: Thu, 16 Mar 2023 00:19:21 +0100
Hello,

Sharlatan Hellseher <sharlatanus <at> gmail.com> writes:

> This patch series adds 2 new packages to Astronomy with minor fixes for
> python-plotly resolving sanity check failure in python-poliastro.

Applied. Thank you.

Regards,
-- 
Nicolas Goaziou




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 13 Apr 2023 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.