unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#62061] [PATCH 0/3]: gnu: Add python-poliastro.
@ 2023-03-08 23:21 Sharlatan Hellseher
  2023-03-08 23:26 ` [bug#62061] [PATCH 1/3] gnu: Add python-czml3 Sharlatan Hellseher
  2023-03-15 23:19 ` bug#62061: [PATCH 0/3]: " Nicolas Goaziou
  0 siblings, 2 replies; 5+ messages in thread
From: Sharlatan Hellseher @ 2023-03-08 23:21 UTC (permalink / raw)
  To: 62061; +Cc: Sharlatan Hellseher

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#62061] [PATCH 1/3] gnu: Add python-czml3.
  2023-03-08 23:21 [bug#62061] [PATCH 0/3]: gnu: Add python-poliastro Sharlatan Hellseher
@ 2023-03-08 23:26 ` Sharlatan Hellseher
  2023-03-08 23:26   ` [bug#62061] [PATCH 2/3] gnu: python-plotly: Fix version detection Sharlatan Hellseher
  2023-03-08 23:26   ` [bug#62061] [PATCH 3/3] gnu: Add python-poliastro Sharlatan Hellseher
  2023-03-15 23:19 ` bug#62061: [PATCH 0/3]: " Nicolas Goaziou
  1 sibling, 2 replies; 5+ messages in thread
From: Sharlatan Hellseher @ 2023-03-08 23:26 UTC (permalink / raw)
  To: 62061; +Cc: Sharlatan Hellseher

* 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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#62061] [PATCH 2/3] gnu: python-plotly: Fix version detection.
  2023-03-08 23:26 ` [bug#62061] [PATCH 1/3] gnu: Add python-czml3 Sharlatan Hellseher
@ 2023-03-08 23:26   ` Sharlatan Hellseher
  2023-03-08 23:26   ` [bug#62061] [PATCH 3/3] gnu: Add python-poliastro Sharlatan Hellseher
  1 sibling, 0 replies; 5+ messages in thread
From: Sharlatan Hellseher @ 2023-03-08 23:26 UTC (permalink / raw)
  To: 62061; +Cc: Sharlatan Hellseher

* 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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#62061] [PATCH 3/3] gnu: Add python-poliastro.
  2023-03-08 23:26 ` [bug#62061] [PATCH 1/3] gnu: Add python-czml3 Sharlatan Hellseher
  2023-03-08 23:26   ` [bug#62061] [PATCH 2/3] gnu: python-plotly: Fix version detection Sharlatan Hellseher
@ 2023-03-08 23:26   ` Sharlatan Hellseher
  1 sibling, 0 replies; 5+ messages in thread
From: Sharlatan Hellseher @ 2023-03-08 23:26 UTC (permalink / raw)
  To: 62061; +Cc: Sharlatan Hellseher

* 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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#62061: [PATCH 0/3]: gnu: Add python-poliastro.
  2023-03-08 23:21 [bug#62061] [PATCH 0/3]: gnu: Add python-poliastro Sharlatan Hellseher
  2023-03-08 23:26 ` [bug#62061] [PATCH 1/3] gnu: Add python-czml3 Sharlatan Hellseher
@ 2023-03-15 23:19 ` Nicolas Goaziou
  1 sibling, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2023-03-15 23:19 UTC (permalink / raw)
  To: Sharlatan Hellseher; +Cc: 62061-done

Hello,

Sharlatan Hellseher <sharlatanus@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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-15 23:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-08 23:21 [bug#62061] [PATCH 0/3]: gnu: Add python-poliastro Sharlatan Hellseher
2023-03-08 23:26 ` [bug#62061] [PATCH 1/3] gnu: Add python-czml3 Sharlatan Hellseher
2023-03-08 23:26   ` [bug#62061] [PATCH 2/3] gnu: python-plotly: Fix version detection Sharlatan Hellseher
2023-03-08 23:26   ` [bug#62061] [PATCH 3/3] gnu: Add python-poliastro Sharlatan Hellseher
2023-03-15 23:19 ` bug#62061: [PATCH 0/3]: " Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).