[PATCH 0/3]: gnu: Add python-poliastro.

  • Done
  • quality assurance status badge
Details
2 participants
  • Nicolas Goaziou
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal

Debbugs page

Sharlatan Hellseher wrote 2 years ago
(address . guix-patches@gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230308232138.6516-1-sharlatanus@gmail.com
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

Toggle quote (5 lines)
> ./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
Sharlatan Hellseher wrote 2 years ago
[PATCH 1/3] gnu: Add python-czml3.
(address . 62061@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230308232637.6788-1-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (python-czml3): New variable.
---
gnu/packages/astronomy.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (44 lines)
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
Sharlatan Hellseher wrote 2 years ago
[PATCH 2/3] gnu: python-plotly: Fix version detection.
(address . 62061@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230308232637.6788-2-sharlatanus@gmail.com
* 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(-)

Toggle diff (51 lines)
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
Sharlatan Hellseher wrote 2 years ago
[PATCH 3/3] gnu: Add python-poliastro.
(address . 62061@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230308232637.6788-3-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (python-poliastro): New variable.
---
gnu/packages/astronomy.scm | 74 ++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)

Toggle diff (94 lines)
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
Nicolas Goaziou wrote 2 years ago
Re: [bug#62061] [PATCH 0/3]: gnu: Add python-poliastro.
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 62061-done@debbugs.gnu.org)
87bkktd2me.fsf@nicolasgoaziou.fr
Hello,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (3 lines)
> 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
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 62061@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 62061
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help