[PATCH 0/2]: gnu: Add pynbody (astronomy)

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

Debbugs page

Sharlatan Hellseher wrote 3 years ago
(address . guix-patches@gnu.org)
CAO+9K5ry01FPrmN7kWWuFXMq7X7s0BGH5ifqzbx2zT75UcqW4w@mail.gmail.com
Hi Guix team!
This patch series add astrophysical Python library - pynbody.
Toggle quote (1 lines)
> ./pre-inst-env guix build python-pynbody python-posix-ipc --rounds=2
/gnu/store/1vml0zln3v1ql300l0qqppp2a7kfd73v-python-posix-ipc-1.0.5
/gnu/store/nbnih0fs6ny6b2ldircjfmb03y5a9cjp-python-pynbody-1.2.3
Sharlatan Hellseher (2):
gnu: Add posix-ipc
gnu: Add pynbody
gnu/packages/astronomy.scm | 68 +++++++++++++++++++++++++++++++++++++
gnu/packages/python-xyz.scm | 32 +++++++++++++++++
2 files changed, 100 insertions(+)
base-commit: 69eb84094516b56d7784aa1b8809cce0936e173e
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
Sharlatan Hellseher wrote 3 years ago
[PATCH 1/2]: gnu: Add posic-ipc
(address . 56835@debbugs.gnu.org)
CAO+9K5p==Lrhhc0Nc5sWJbJ0q-iLAKa8uDsdrA4tHwbXxjgwGA@mail.gmail.com
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
From 8631e7afa40a752fe41cacc29a2a4c358a8a1746 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Fri, 29 Jul 2022 17:50:56 +0100
Subject: [PATCH 1/2] gnu: Add posix-ipc

* gnu/packages/python-xyz.scm: (python-posix-ipc): New variable.
---
gnu/packages/python-xyz.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ac7c0d6066..732cd2a376 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29590,6 +29590,38 @@ (define-public python-queuelib
fashion.")
(license license:bsd-3)))
+(define-public python-posix-ipc
+ (package
+ (name "python-posix-ipc")
+ (version "1.0.5")
+ (source
+ (origin
+ ;; The source distributed on PyPI is prebuild.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/osvenskan/posix_ipc")
+ (commit (string-append "rel" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "17y4d0pmvp199c5hbs602ailhlh9f9zv89kmpbd8jhyl6rgaxsvs"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-cc-path
+ (lambda _
+ (substitute* "prober.py"
+ (("cmd = .cc")
+ (string-append "cmd = \"" #$(cc-for-target)))))))))
+ (native-inputs
+ (list python-unittest2))
+ (home-page "http://semanchuk.com/philip/posix_ipc/")
+ (synopsis "POSIX IPC primitives for Python")
+ (description
+ "This package provides POSIX IPC primitives - semaphores, shared memory and
+message queues for Python.")
+ (license license:bsd-3))) ; BSD like Copyright (c) 2018, Philip Semanchuk
+
(define-public python-itemadapter
(package
(name "python-itemadapter")
--
2.36.1
Sharlatan Hellseher wrote 3 years ago
[PATCH 2/2]: gnu: Add pynbody
(address . 56835@debbugs.gnu.org)
CAO+9K5p3xMbpk2q0WqGR6t69sDJ=CCdwf+F7dGybq972fC3-oA@mail.gmail.com
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
From d245a43520d37e33615d825338d1f55dda36fce2 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Fri, 29 Jul 2022 21:17:50 +0100
Subject: [PATCH 2/2] gnu: Add pynbody

* gnu/packages/astronomy.scm: (python-pynbody): New variable.
---
gnu/packages/astronomy.scm | 68 ++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)

Toggle diff (81 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index e84eb188ff..3b4ded5728 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1606,6 +1606,74 @@ (define-public python-pyerfa
functions, so that they can be called with scalar or array inputs.")
(license license:bsd-3)))
+(define-public python-pynbody
+ (package
+ (name "python-pynbody")
+ (version "1.2.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pynbody" version))
+ (sha256
+ (base32 "1jxwk2s4qz1znvyak2lj7ld01kl1jh87xp81ki7a8dz1gcy93fkx"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'disable-tests-require-testdata
+ (lambda _
+ ;; Disable tests which need to download additional 1.0GiB+
+ ;; of test data archive from
+ ;; http://star.ucl.ac.uk/~app/testdata.tar.gz
+ ;; https://github.com/pynbody/pynbody/blob/ \
+ ;; f4bd482dc47532831b3ec115c7cb07149d61bfc5/ \
+ ;; .github/workflows/build-test.yaml#L41
+ (with-directory-excursion "tests"
+ (for-each delete-file
+ '("gravity_test.py"
+ "adaptahop_test.py"
+ "ahf_halos_test.py"
+ "array_test.py"
+ "bridge_test.py"
+ "family_test.py"
+ "partial_tipsy_test.py"
+ "snapshot_test.py"
+ "test_profile.py"
+ "gadget_test.py"
+ "gadgethdf_test.py"
+ "grafic_test.py"
+ "halotools_test.py"
+ "nchilada_test.py"
+ "ramses_new_ptcl_format_test.py"
+ "ramses_test.py"
+ "rockstar_test.py"
+ "sph_image_test.py"
+ "sph_smooth_test.py"
+ "subfind_test.py"
+ "subfindhdf_gadget4_test.py"
+ "tipsy_test.py")))))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (setenv "HOME" "/tmp")
+ (invoke "pytest" "-vv")))))))
+ (native-inputs
+ (list python-pandas python-pytest))
+ (propagated-inputs
+ (list python-cython
+ python-h5py
+ python-matplotlib
+ python-numpy
+ python-posix-ipc
+ python-scipy))
+ (home-page "https://pynbody.github.io/pynbody/index.html")
+ (synopsis "Light-weight astronomical N-body/SPH analysis for python")
+ (description "@code{Pynbody} is an analysis framework for N-body and hydrodynamic
+astrophysical simulations supporting PKDGRAV/Gasoline, Gadget, Gadget4/Arepo,
+N-Chilada and RAMSES AMR outputs.")
+ (license license:gpl3+)))
+
(define-public python-sep
(package
(name "python-sep")
--
2.36.1
Efraim Flashner wrote 3 years ago
Re: [bug#56835] [PATCH 0/2]: gnu: Add pynbody (astronomy)
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 56835-done@debbugs.gnu.org)
Yu1loj21yymI7dgW@pbp
On Fri, Jul 29, 2022 at 09:28:19PM +0100, Sharlatan Hellseher wrote:
Toggle quote (19 lines)
> Hi Guix team!
>
> This patch series add astrophysical Python library - pynbody.
>
> > ./pre-inst-env guix build python-pynbody python-posix-ipc --rounds=2
> /gnu/store/1vml0zln3v1ql300l0qqppp2a7kfd73v-python-posix-ipc-1.0.5
> /gnu/store/nbnih0fs6ny6b2ldircjfmb03y5a9cjp-python-pynbody-1.2.3
>
> Sharlatan Hellseher (2):
> gnu: Add posix-ipc
> gnu: Add pynbody
>
> gnu/packages/astronomy.scm | 68 +++++++++++++++++++++++++++++++++++++
> gnu/packages/python-xyz.scm | 32 +++++++++++++++++
> 2 files changed, 100 insertions(+)
>
>
> base-commit: 69eb84094516b56d7784aa1b8809cce0936e173e

I moved python-cython from propagated-inputs to native-inputs and pushed
the two patches. Thanks!

--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmLtZaIACgkQQarn3Mo9
g1GvGA//TKQdoCsAlzg8AFWfXGsMdEaz0/5MVhgl411KbYN1pHpCJmswPkWhbL8c
pe8h4LJ2HN8153t1S+iDpkMbmEWBHQ1Etbw2gGqKdjj0hQpkm7sLH0WP8uwfzspQ
fCj92ZBWFDi3CuetVlLWoQR01m1+yPkD8bInomvt/rTKDQlQWR/5Ix4gdkOljWgP
OysTPiSoQiSX2v1rx2WlEibuHu1qFsN+eNV1WCoSHK5adUk/O5HHNwznmyewKw1C
2sT5SzlJ8brOuzF5bM5o3kAxGwGiiBWTVUV+0lr45UQA1LfynHT3qgItbu6mYMzg
BtD6NsLiM/3F4x+ejixpXpbF+vfT4lNjaThM1nP+tcKfHfKvXngO7kRmXs8ofwjO
WbsXozVf4uFXyOspTXxeMjqTSOlmuNDBL+hQYRO3/fPdbwwK82G7CHDs6w52FhNG
tSYry/ErsxD3b6fBNTn2dnCXK7p7oiVDjQuto5fmOV+oB2XemPY+omSA6i90H8x1
7fTQmDb5rKWHZLlstLHmtFn3lKTGsT0kpxo59VdqVDFu7MgcvlCKPdfELHipT5t8
zmoBS8MwUL2KS1dRQip8X3Fx5rFUO82w06cCDLSS/O94M/6j6Gi3/abNt0ZNd56j
7hhKHM7gTS2baX0wJqwPy6+U2HcVTbPV4oXGk2DQoeYbEvR29vM=
=/sA2
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 56835
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