diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2023-03-08 23:26:37 +0000 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-03-16 00:16:07 +0100 |
commit | e36a9148782af0a9f930fa7c8a4c26f38617af0f (patch) | |
tree | 67f2ff94a765e13ba4f1d9558380dbaa7bf165ce /gnu/packages/astronomy.scm | |
parent | 1c0056876ccabf5ad30007e7163ae94b8152e20c (diff) | |
download | guix-e36a9148782af0a9f930fa7c8a4c26f38617af0f.tar guix-e36a9148782af0a9f930fa7c8a4c26f38617af0f.tar.gz |
gnu: Add python-poliastro.
* gnu/packages/astronomy.scm (python-poliastro): New variable.
Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Diffstat (limited to 'gnu/packages/astronomy.scm')
-rw-r--r-- | gnu/packages/astronomy.scm | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 88628fc122..46839c802f 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -46,6 +46,7 @@ #: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,81 @@ the easy construction of interactive matplotlib widget based animations.") 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 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 a 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") |