summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhislain Vaillant <ghislain.vaillant@inria.fr>2025-10-31 14:12:43 +0100
committerGhislain Vaillant <ghislain.vaillant@inria.fr>2025-11-05 12:33:00 +0100
commit13b141c2b2368e3df08779cf52606200b6be484f (patch)
tree23565ba5fa0595de5a9e4f77eca5c7ea783b82ee
parente3ecd73c97eccf93d2a6804bbcd4deccfaa79ccb (diff)
python-xyz: Add python-hydra-core.
* guix-science/packages/python-xyz.scm (python-hydra-core): New variable. * guix-science/packages/python-xyz.scm: Import java.
-rw-r--r--guix-science/packages/python-xyz.scm63
1 files changed, 63 insertions, 0 deletions
diff --git a/guix-science/packages/python-xyz.scm b/guix-science/packages/python-xyz.scm
index ab9d411..987b1e8 100644
--- a/guix-science/packages/python-xyz.scm
+++ b/guix-science/packages/python-xyz.scm
@@ -3,6 +3,7 @@
3(define-module (guix-science packages python-xyz) 3(define-module (guix-science packages python-xyz)
4 #:use-module (gnu packages check) 4 #:use-module (gnu packages check)
5 #:use-module (gnu packages image-processing) 5 #:use-module (gnu packages image-processing)
6 #:use-module (gnu packages java)
6 #:use-module (gnu packages machine-learning) 7 #:use-module (gnu packages machine-learning)
7 #:use-module (gnu packages maths) 8 #:use-module (gnu packages maths)
8 #:use-module (gnu packages pdf) 9 #:use-module (gnu packages pdf)
@@ -337,6 +338,68 @@ package than @code{h5py}.")
337science data standards.") 338science data standards.")
338 (license license:bsd-3))) 339 (license license:bsd-3)))
339 340
341(define-public python-hydra-core
342 (package
343 (name "python-hydra-core")
344 (version "1.3.2")
345 (source
346 (origin
347 (method git-fetch)
348 (uri (git-reference
349 (url "https://github.com/facebookresearch/hydra")
350 (commit (string-append "v" version))))
351 (file-name (git-file-name name version))
352 (sha256
353 (base32 "1wjhwxhhy6kri27z0lvaqvs0kc6c9zdca3i0qdhvxdpcv5502glh"))
354 (modules '((guix build utils)))
355 (snippet
356 ;; Remove vendored antlr4.
357 #~(delete-file-recursively "build_helpers/bin"))))
358 (build-system pyproject-build-system)
359 (arguments
360 (list
361 #:tests? #f
362 #:phases
363 #~(modify-phases %standard-phases
364 (add-after 'unpack 'post-unpack
365 (lambda _
366 ;; Use system antlr4.
367 (substitute* "build_helpers/build_helpers.py"
368 (("\"java\",")
369 "")
370 (("\"-jar\",")
371 "")
372 (("join\\(.*bin/antlr.*\\),")
373 (string-append "\""
374 (which "antlr4") "\",")))
375 ;; Relax versioned requirements.
376 (substitute* "requirements/requirements.txt"
377 (("antlr4-python3-runtime.*")
378 "antlr4-python3-runtime")
379 (("omegaconf.*")
380 "omegaconf\n")))))))
381 (propagated-inputs (list java-antlr4-runtime-python python-omegaconf
382 python-packaging))
383 (native-inputs (list antlr4 openjdk python-pytest python-setuptools))
384 (home-page "https://github.com/facebookresearch/hydra")
385 (synopsis "Framework for elegantly configuring complex applications")
386 (description
387 "Hydra is an open-source Python framework that simplifies the development
388of research and other complex applications. The key feature is the ability to
389dynamically create a hierarchical configuration by composition and override it
390through config files and the command line.
391
392Key features:
393
394@itemize
395@item Hierarchical configuration composable from multiple sources
396@item Configuration can be specified or overridden from the command line
397@item Dynamic command line tab completion
398@item Run your application locally or launch it to run remotely
399@item Run multiple jobs with different arguments with a single command
400@end itemize")
401 (license license:expat)))
402
340(define-public python-mayavi 403(define-public python-mayavi
341 (package 404 (package
342 (name "python-mayavi") 405 (name "python-mayavi")