all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#53656] [PATCH 0/2] 2 Julia packages
@ 2022-01-31 10:38 Efraim Flashner
  2022-01-31 10:40 ` [bug#53656] [PATCH 1/2] gnu: Add julia-linesearches Efraim Flashner
  2022-01-31 10:40 ` [bug#53656] [PATCH 2/2] gnu: Add julia-optim Efraim Flashner
  0 siblings, 2 replies; 5+ messages in thread
From: Efraim Flashner @ 2022-01-31 10:38 UTC (permalink / raw)
  To: 53656; +Cc: Efraim Flashner

Two more julia packages, ready for upstreaming.

Efraim Flashner (2):
  gnu: Add julia-linesearches.
  gnu: Add julia-optim.

 gnu/packages/julia-xyz.scm | 93 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 92 insertions(+), 1 deletion(-)


base-commit: 43dd34c7777a212c99a97da7a2c237158faa9a1b
prerequisite-patch-id: 0db9d2565885888d76f51e5e9ab3287fdaa3877a
-- 
2.34.0





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

* [bug#53656] [PATCH 1/2] gnu: Add julia-linesearches.
  2022-01-31 10:38 [bug#53656] [PATCH 0/2] 2 Julia packages Efraim Flashner
@ 2022-01-31 10:40 ` Efraim Flashner
  2022-01-31 10:40 ` [bug#53656] [PATCH 2/2] gnu: Add julia-optim Efraim Flashner
  1 sibling, 0 replies; 5+ messages in thread
From: Efraim Flashner @ 2022-01-31 10:40 UTC (permalink / raw)
  To: 53656; +Cc: Efraim Flashner

* gnu/packages/julia-xyz.scm (julia-linesearches): New variable.
---
 gnu/packages/julia-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 44 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index e30cf39dc9..7de0c32113 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020, 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
 ;;; Copyright © 2021, 2022 Simon Tournier <zimon.toutoune@gmail.com>
-;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;;
@@ -3104,6 +3104,49 @@ (define-public julia-lazyarrays
 implementation of matrix-free methods for iterative solvers.")
     (license license:expat)))
 
+(define-public julia-linesearches
+  (package
+    (name "julia-linesearches")
+    (version "7.1.1")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/JuliaNLSolvers/LineSearches.jl")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "1qc4la07w6s1xhcyd0hvbnpr31zc1a2ssgyybc8biv5m00g0dnr0"))))
+    (build-system julia-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'link-depot 'skip-optim-tests
+           (lambda _
+             (substitute* "test/examples.jl"
+               ;; Prevent a cycle with Optim.jl.
+               (("^    SKIPFILE.*") "")
+               (("^    #SKIPFILE") "    SKIPFILE"))))
+         (add-after 'link-depot 'skip-doublefloats-tests
+           (lambda _
+             (substitute* "test/runtests.jl"
+               (("using DoubleFloats.*") "")
+               ((".*arbitrary_precision\\.jl.*") "")))))))
+    (propagated-inputs
+     (list julia-nlsolversbase
+           julia-nanmath
+           julia-parameters))
+    (native-inputs
+     ;; DoubleFloats.jl transitively depends on TimeZones.jl, which is currently
+     ;; unpackageable due to its oversized Artifacts.toml.
+     (list ;julia-doublefloats
+           julia-optimtestproblems))
+    (home-page "https://github.com/JuliaNLSolvers/LineSearches.jl")
+    (synopsis "Line search methods for optimization and root-finding")
+    (description "This package provides an interface to line search algorithms
+implemented in Julia.")
+    (license license:expat)))
+
 (define-public julia-logexpfunctions
   (package
     (name "julia-logexpfunctions")
-- 
2.34.0





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

* [bug#53656] [PATCH 2/2] gnu: Add julia-optim.
  2022-01-31 10:38 [bug#53656] [PATCH 0/2] 2 Julia packages Efraim Flashner
  2022-01-31 10:40 ` [bug#53656] [PATCH 1/2] gnu: Add julia-linesearches Efraim Flashner
@ 2022-01-31 10:40 ` Efraim Flashner
  2022-02-10 16:22   ` [bug#53656] [PATCH 0/2] 2 Julia packages zimoun
  1 sibling, 1 reply; 5+ messages in thread
From: Efraim Flashner @ 2022-01-31 10:40 UTC (permalink / raw)
  To: 53656; +Cc: Efraim Flashner

* gnu/packages/julia-xyz.scm (julia-optim): New variable.
---
 gnu/packages/julia-xyz.scm | 48 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 7de0c32113..2fcc4cf83e 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -23,6 +23,7 @@
 (define-module (gnu packages julia-xyz)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix git-download)
@@ -3650,6 +3651,53 @@ (define-public julia-nnlib
 doesn't provide any other \"high-level\" functionality like layers or AD.")
     (license license:expat)))
 
+(define-public julia-optim
+  (package
+    (name "julia-optim")
+    (version "1.6.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/JuliaNLSolvers/Optim.jl")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "0nvl3xp9c6r80y9n7fic4zyq2443apfmbcpnx0wvgkv4vsy08x5j"))))
+    (build-system julia-build-system)
+    (arguments
+     (list
+       #:phases
+       #~(modify-phases %standard-phases
+           (add-after 'unpack 'adjust-tests
+             (lambda _
+               ;; TODO: Figure out why this test fails.
+               (substitute* "test/runtests.jl"
+                 ((".*l_bfgs.*") "")))))))
+    (propagated-inputs
+     (list julia-compat
+           julia-fillarrays
+           julia-forwarddiff
+           julia-linesearches
+           julia-nanmath
+           julia-nlsolversbase
+           julia-parameters
+           julia-positivefactorizations
+           julia-statsbase))
+    (native-inputs
+     (list julia-linesearches
+           julia-measurements
+           julia-nlsolversbase
+           julia-optimtestproblems
+           julia-positivefactorizations
+           julia-recursivearraytools
+           julia-stablerngs))
+    (home-page "https://github.com/JuliaNLSolvers/Optim.jl")
+    (synopsis "Optimization functions for Julia")
+    (description "@code{Optim.jl} is a package for univariate and multivariate
+optimization of functions.")
+    (license license:expat)))
+
 (define-public julia-optimtestproblems
   (package
     (name "julia-optimtestproblems")
-- 
2.34.0





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

* [bug#53656] [PATCH 0/2] 2 Julia packages
  2022-01-31 10:40 ` [bug#53656] [PATCH 2/2] gnu: Add julia-optim Efraim Flashner
@ 2022-02-10 16:22   ` zimoun
  2022-02-13 10:23     ` bug#53656: " Efraim Flashner
  0 siblings, 1 reply; 5+ messages in thread
From: zimoun @ 2022-02-10 16:22 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 53656

Hi Efraim,

Both patches look good to me.


I notice this warning:

--8<---------------cut here---------------start------------->8---
┌ Warning: Package OptimTestProblems does not have LinearAlgebra in its dependencies:
│ - If you have OptimTestProblems checked out for development and have
│   added LinearAlgebra as a dependency but haven't updated your primary
│   environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with OptimTestProblems
└ Loading LinearAlgebra into OptimTestProblems from project dependency, future warnings for OptimTestProblems are suppressed.
--8<---------------cut here---------------end--------------->8---

and...


On Mon, 31 Jan 2022 at 12:40, Efraim Flashner <efraim@flashner.co.il> wrote:

> * gnu/packages/julia-xyz.scm (julia-optim): New variable.

[...]

> +  #:use-module (guix gexp)

[...]

> +       #:phases
> +       #~(modify-phases %standard-phases
> +           (add-after 'unpack 'adjust-tests
> +             (lambda _
> +               ;; TODO: Figure out why this test fails.
> +               (substitute* "test/runtests.jl"
> +                 ((".*l_bfgs.*") "")))))))

...I am thinking loudly if this gexp is required.  There are other many
similar patter without a gexp.  Therefore, for consistency with the
rest, I would be in favor to switch to regular modification of phases.
Or let me know if this is becoming the new patter and I would adapt for
the others.


Cheers,
simom




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

* bug#53656: [PATCH 0/2] 2 Julia packages
  2022-02-10 16:22   ` [bug#53656] [PATCH 0/2] 2 Julia packages zimoun
@ 2022-02-13 10:23     ` Efraim Flashner
  0 siblings, 0 replies; 5+ messages in thread
From: Efraim Flashner @ 2022-02-13 10:23 UTC (permalink / raw)
  To: zimoun; +Cc: 53656-done

[-- Attachment #1: Type: text/plain, Size: 2346 bytes --]

On Thu, Feb 10, 2022 at 05:22:33PM +0100, zimoun wrote:
> Hi Efraim,
> 
> Both patches look good to me.
> 
> 
> I notice this warning:
> 
> --8<---------------cut here---------------start------------->8---
> ┌ Warning: Package OptimTestProblems does not have LinearAlgebra in its dependencies:
> │ - If you have OptimTestProblems checked out for development and have
> │   added LinearAlgebra as a dependency but haven't updated your primary
> │   environment's manifest file, try `Pkg.resolve()`.
> │ - Otherwise you may need to report an issue with OptimTestProblems
> └ Loading LinearAlgebra into OptimTestProblems from project dependency, future warnings for OptimTestProblems are suppressed.
> --8<---------------cut here---------------end--------------->8---

It ends up not being a problem, but I'm left wondering if we should
extend the #:julia-package-foo arguments to add more fields or if we
should just add a custom phase to build a Package.toml that includes all
the fields needed.

> and...
> 
> 
> On Mon, 31 Jan 2022 at 12:40, Efraim Flashner <efraim@flashner.co.il> wrote:
> 
> > * gnu/packages/julia-xyz.scm (julia-optim): New variable.
> 
> [...]
> 
> > +  #:use-module (guix gexp)
> 
> [...]
> 
> > +       #:phases
> > +       #~(modify-phases %standard-phases
> > +           (add-after 'unpack 'adjust-tests
> > +             (lambda _
> > +               ;; TODO: Figure out why this test fails.
> > +               (substitute* "test/runtests.jl"
> > +                 ((".*l_bfgs.*") "")))))))
> 
> ...I am thinking loudly if this gexp is required.  There are other many
> similar patter without a gexp.  Therefore, for consistency with the
> rest, I would be in favor to switch to regular modification of phases.
> Or let me know if this is becoming the new patter and I would adapt for
> the others.

It's definitely the new pattern we're using now. I suppose it's not
really necessary here, but having more instances of it throughout the
codebase also makes it easier to search for examples when others are
looking to use or modify gexps.

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2022-02-13 10:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-31 10:38 [bug#53656] [PATCH 0/2] 2 Julia packages Efraim Flashner
2022-01-31 10:40 ` [bug#53656] [PATCH 1/2] gnu: Add julia-linesearches Efraim Flashner
2022-01-31 10:40 ` [bug#53656] [PATCH 2/2] gnu: Add julia-optim Efraim Flashner
2022-02-10 16:22   ` [bug#53656] [PATCH 0/2] 2 Julia packages zimoun
2022-02-13 10:23     ` bug#53656: " Efraim Flashner

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.