all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#56193] Add Climate Data Operators package
@ 2022-06-24 14:28 Roman Scherer
  2022-06-24 19:10 ` [bug#56193] (no subject) Antero Mejr via Guix-patches via
  2022-06-25 10:18 ` [bug#56193] [PATCH] Add Climate Data Operators package Roman Scherer
  0 siblings, 2 replies; 9+ messages in thread
From: Roman Scherer @ 2022-06-24 14:28 UTC (permalink / raw)
  To: 56193


[-- Attachment #1.1: Type: text/plain, Size: 158 bytes --]


Hello Guix,

I would like to contribute a patch to add the Climate Data Operators
package to Guix's geo module. Could you please review it?

Thanks, Roman.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Add-Climate-Data-Operators-package.patch --]
[-- Type: text/x-patch, Size: 1773 bytes --]

From 2674303750a84b99d574212fe24c47e7e789f72e Mon Sep 17 00:00:00 2001
From: r0man <roman@burningswell.com>
Date: Fri, 24 Jun 2022 16:21:21 +0200
Subject: [PATCH] Add Climate Data Operators package

This PR adds CDO, a collection of command line Operators to manipulate and
analyse Climate and NWP model Data to Guix's geo module.
---
 gnu/packages/geo.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 7b29c55088..64b5a91a23 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -119,6 +119,31 @@ (define-module (gnu packages geo)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
+(define-public cdo
+  (package
+    (name "cdo")
+    (version "2.0.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://code.mpimet.mpg.de/attachments/download/26823/cdo-"
+                     version ".tar.gz"))
+              (sha256
+               (base32
+                "1khdbd5cmnn7qm6hcqg4md5wbq14fs6brrns8b3g18diqgqvpvpd"))
+              (modules '((guix build utils)))))
+    (build-system gnu-build-system)
+    (inputs
+     (list netcdf))
+    (native-inputs
+     (list pkg-config))
+    (home-page "https://code.mpimet.mpg.de/projects/cdo")
+    (synopsis "Climate Data Operators")
+    (description "CDO is a collection of command line Operators to manipulate and analyse
+Climate and NWP model Data. Supported data formats are GRIB 1/2, netCDF 3/4,
+SERVICE, EXTRA and IEG. There are more than 600 operators available.")
+    (license (list license:bsd-3))))
+
 (define-public memphis
   (package
     (name "memphis")
-- 
2.36.1


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

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

* [bug#56193] (no subject)
  2022-06-24 14:28 [bug#56193] Add Climate Data Operators package Roman Scherer
@ 2022-06-24 19:10 ` Antero Mejr via Guix-patches via
  2022-06-25 10:18 ` [bug#56193] [PATCH] Add Climate Data Operators package Roman Scherer
  1 sibling, 0 replies; 9+ messages in thread
From: Antero Mejr via Guix-patches via @ 2022-06-24 19:10 UTC (permalink / raw)
  To: 56193

Hi Roman,

NetCDF support isn't working in your patch. The software says this:

"Unsupported file type (library support not compiled in)
To create a CDO application with NetCDF support use:
./configure --with-netcdf=<NetCDF root directory> ..."

So it looks like you will have to modify the configure phase a little.

I don't think you need the expression
`(modules '((guix build utils))`
as you are not using that module in your source expression.

`licenses` doesn't have to be a list unless cdo is dual-licensed.

Please run `guix style` and `guix lint` (using pre-inst-env), which will
help make sure the code style follows the Guix style guidelines.

Thanks,
Antero




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

* [bug#56193] [PATCH] Add Climate Data Operators package
  2022-06-24 14:28 [bug#56193] Add Climate Data Operators package Roman Scherer
  2022-06-24 19:10 ` [bug#56193] (no subject) Antero Mejr via Guix-patches via
@ 2022-06-25 10:18 ` Roman Scherer
  2022-06-25 11:09   ` Tobias Geerinckx-Rice via Guix-patches via
  2022-07-03 14:07   ` bug#56193: " Ludovic Courtès
  1 sibling, 2 replies; 9+ messages in thread
From: Roman Scherer @ 2022-06-25 10:18 UTC (permalink / raw)
  To: 56193


[-- Attachment #1.1: Type: text/plain, Size: 2369 bytes --]


Hi Antero,

thanks for your review! Here's an updated version of the patch. I added
--with-netcdf to the configure flags, removed the build utils, added
spaces between sentences and don't use a list for the licence field
anymore.

Could you have another look please?

I'm not sure if I addressed all lint issues, since this command is
failing on my machine recently. Any idea what this could be? Here's the
backtrace of the lint command:

```
[roman@thinkpad guix]$ ./pre-inst-env guix lint cdo
;;; note: source file /home/roman/workspace/guix/gnu/packages/geo.scm
;;;       newer than compiled /home/roman/workspace/guix/gnu/packages/geo.go
;;; note: source file /home/roman/workspace/guix/gnu/packages/geo.scm
;;;       newer than compiled /home/roman/.cache/guile/ccache/3.0-LE-8-4.5/home/roman/workspace/guix/gnu/packages/geo.scm.go
;;; Failed to autoload html->sxml in (htmlprag):
;;; no code for module (htmlprag)
Backtrace:
In ice-9/boot-9.scm:
  1752:10 18 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
          17 (apply-smob/0 #<thunk 7f3b46a28f60>)
In ice-9/boot-9.scm:
    724:2 16 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
In ice-9/eval.scm:
    619:8 15 (_ #(#(#<directory (guile-user) 7f3b46a22c80>)))
In guix/ui.scm:
   2238:7 14 (run-guix . _)
  2201:10 13 (run-guix-command _ . _)
In ice-9/boot-9.scm:
  1752:10 12 (with-exception-handler _ _ #:unwind? _ # _)
  1752:10 11 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
   659:37 10 (thunk)
In srfi/srfi-1.scm:
    634:9  9 (for-each #<procedure 7f3b4531efa0 at guix/scripts/lin…> …)
In guix/scripts/lint.scm:
     65:4  8 (run-checkers _ _ #:store _)
In srfi/srfi-1.scm:
    634:9  7 (for-each #<procedure 7f3b31769de0 at guix/scripts/lin…> …)
In guix/scripts/lint.scm:
    74:21  6 (_ _)
In guix/lint.scm:
   1476:5  5 (check-for-updates #<package cdo@2.0.5 /home/roman/work…>)
    811:2  4 (call-with-networking-fail-safe _ _ _)
In ice-9/boot-9.scm:
  1752:10  3 (with-exception-handler _ _ #:unwind? _ # _)
  1685:16  2 (raise-exception _ #:continuable? _)
  1683:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
error: html->sxml: unbound variable
```

Thanks, Roman.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0002-Add-Climate-Data-Operators-package.patch --]
[-- Type: text/x-patch, Size: 1855 bytes --]

From d003fb5a519341a23973e8565ac7bc3195742808 Mon Sep 17 00:00:00 2001
From: r0man <roman@burningswell.com>
Date: Sat, 25 Jun 2022 12:10:00 +0200
Subject: [PATCH] Add Climate Data Operators package

This patch adds CDO, a collection of command line Operators to manipulate and
analyse Climate and NWP model Data to Guix's geo module.
---
 gnu/packages/geo.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 7b29c55088..7ce1d2bda2 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -119,6 +119,33 @@ (define-module (gnu packages geo)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
+(define-public cdo
+  (package
+    (name "cdo")
+    (version "2.0.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://code.mpimet.mpg.de/attachments/download/26823/cdo-"
+                     version ".tar.gz"))
+              (sha256
+               (base32
+                "1khdbd5cmnn7qm6hcqg4md5wbq14fs6brrns8b3g18diqgqvpvpd"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list (string-append "--with-netcdf=" (assoc-ref %build-inputs "netcdf")))))
+    (inputs
+     (list netcdf))
+    (native-inputs
+     (list pkg-config))
+    (home-page "https://code.mpimet.mpg.de/projects/cdo")
+    (synopsis "Climate Data Operators")
+    (description "CDO is a collection of command line Operators to manipulate and analyse
+Climate and NWP model Data.  Supported data formats are GRIB 1/2, netCDF 3/4,
+SERVICE, EXTRA and IEG.  There are more than 600 operators available.")
+    (license license:bsd-3)))
+
 (define-public memphis
   (package
     (name "memphis")
-- 
2.36.1


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

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

* [bug#56193] [PATCH] Add Climate Data Operators package
  2022-06-25 10:18 ` [bug#56193] [PATCH] Add Climate Data Operators package Roman Scherer
@ 2022-06-25 11:09   ` Tobias Geerinckx-Rice via Guix-patches via
  2022-06-25 11:43     ` Roman Scherer
  2022-07-03 14:07   ` bug#56193: " Ludovic Courtès
  1 sibling, 1 reply; 9+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2022-06-25 11:09 UTC (permalink / raw)
  To: Roman Scherer; +Cc: 56193

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

Roman!

Roman Scherer 写道:
> [roman@thinkpad guix]$ ./pre-inst-env guix lint cdo

[…]

> error: html->sxml: unbound variable

This is probably solved by running the command above in a guix 
shell:

  $ guix shell guix -- ./pre-inst-env guix lint cdo

‘pre-inst-env’ sets up some environment (variables) like 
GUILE_LOAD_PATH to ensure that Guix can run from your local git 
checkout, but nothing more.

Most importantly, it does not create a full Guix profile with the 
numerous dependencies of the ‘guix’ package — including the 
‘guile-lib’ package that provides HTML->SXML.

That's what the ‘guix shell’ is for.  It's a clean alternative to 
‘guix install’ing all these guile-* packages into your user 
profile.  Both work.

Kind regards,

T G-R

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

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

* [bug#56193] [PATCH] Add Climate Data Operators package
  2022-06-25 11:09   ` Tobias Geerinckx-Rice via Guix-patches via
@ 2022-06-25 11:43     ` Roman Scherer
  2022-06-25 12:05       ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 1 reply; 9+ messages in thread
From: Roman Scherer @ 2022-06-25 11:43 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 56193

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


Hi Tobias,

thanks for the tip. Unfortunately the command you sent me is not
enough. I still get this error with `guix shell guix`:

```
[roman@thinkpad guix]$ guix shell guix -- ./pre-inst-env guix lint gdal
;;; note: source file /home/roman/workspace/guix/gnu/packages/geo.scm
;;;       newer than compiled /home/roman/workspace/guix/gnu/packages/geo.go
;;; note: source file /home/roman/workspace/guix/gnu/packages/geo.scm
;;;       newer than compiled /home/roman/.cache/guile/ccache/3.0-LE-8-4.5/home/roman/workspace/guix/gnu/packages/geo.scm.go
;;; Failed to autoload html->sxml in (htmlprag):
;;; no code for module (htmlprag)
Backtrace:
In ice-9/boot-9.scm:
  1752:10 18 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
          17 (apply-smob/0 #<thunk 7f09e3748f60>)
In ice-9/boot-9.scm:
    724:2 16 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
In ice-9/eval.scm:
    619:8 15 (_ #(#(#<directory (guile-user) 7f09e3742c80>)))
In guix/ui.scm:
   2238:7 14 (run-guix . _)
  2201:10 13 (run-guix-command _ . _)
In ice-9/boot-9.scm:
  1752:10 12 (with-exception-handler _ _ #:unwind? _ # _)
  1752:10 11 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
   659:37 10 (thunk)
In srfi/srfi-1.scm:
    634:9  9 (for-each #<procedure 7f09e21bc9e0 at guix/scripts/lin…> …)
In guix/scripts/lint.scm:
     65:4  8 (run-checkers _ _ #:store _)
In srfi/srfi-1.scm:
    634:9  7 (for-each #<procedure 7f09d2d94c60 at guix/scripts/lin…> …)
In guix/scripts/lint.scm:
    74:21  6 (_ _)
In guix/lint.scm:
   1476:5  5 (check-for-updates #<package gdal@3.5.0 /home/roman/wor…>)
    811:2  4 (call-with-networking-fail-safe _ _ _)
In ice-9/boot-9.scm:
  1752:10  3 (with-exception-handler _ _ #:unwind? _ # _)
  1685:16  2 (raise-exception _ #:continuable? _)
  1683:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
error: html->sxml: unbound variable
```

However, after adding guile-lib to my home profile, it seems to work!

Thanks, Roman.

Tobias Geerinckx-Rice <me@tobias.gr> writes:

> [[PGP Signed Part:Undecided]]
> Roman!
>
> Roman Scherer 写道:
>> [roman@thinkpad guix]$ ./pre-inst-env guix lint cdo
>
> […]
>
>> error: html->sxml: unbound variable
>
> This is probably solved by running the command above in a guix shell:
>
>  $ guix shell guix -- ./pre-inst-env guix lint cdo
>
> ‘pre-inst-env’ sets up some environment (variables) like
> GUILE_LOAD_PATH to ensure that Guix can run from your local git
> checkout, but nothing more.
>
> Most importantly, it does not create a full Guix profile with the
> numerous dependencies of the ‘guix’ package — including the
> ‘guile-lib’ package that provides HTML->SXML.
>
> That's what the ‘guix shell’ is for.  It's a clean alternative to
> ‘guix install’ing all these guile-* packages into your user profile.
> Both work.
>
> Kind regards,
>
> T G-R
>
> [[End of PGP Signed Part]]

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

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

* [bug#56193] [PATCH] Add Climate Data Operators package
  2022-06-25 11:43     ` Roman Scherer
@ 2022-06-25 12:05       ` Tobias Geerinckx-Rice via Guix-patches via
  2022-06-25 12:18         ` Roman Scherer
  0 siblings, 1 reply; 9+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2022-06-25 12:05 UTC (permalink / raw)
  To: Roman Scherer; +Cc: 56193

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

Roman,

Roman Scherer 写道:
> thanks for the tip. Unfortunately the command you sent me is not
> enough. I still get this error with `guix shell guix`:

That's because I'm an old, who's still used to the (deprecated) 
‘guix environment’, but wanted to sound hip by saying ‘guix shell’ 
instead.  A recipe for failure.

The two are semantically equivalent but not identical, so I should 
have said

  $ guix shell -D guix -- ./pre-inst-env stuff

Note the -D, for --development (‘add P's inputs rather than P 
itself’).

Nothing wrong with keeping guile-* packages in your user profile 
but the above is a bit cleaner.

Kind regards,

T G-R

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

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

* [bug#56193] [PATCH] Add Climate Data Operators package
  2022-06-25 12:05       ` Tobias Geerinckx-Rice via Guix-patches via
@ 2022-06-25 12:18         ` Roman Scherer
  0 siblings, 0 replies; 9+ messages in thread
From: Roman Scherer @ 2022-06-25 12:18 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 56193

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


Haha, ok. Thanks for the explanation Tobias. I think I leave it in my
home profile, I already have some other guile packages in it.

Tobias Geerinckx-Rice <me@tobias.gr> writes:

> [[PGP Signed Part:Undecided]]
> Roman,
>
> Roman Scherer 写道:
>> thanks for the tip. Unfortunately the command you sent me is not
>> enough. I still get this error with `guix shell guix`:
>
> That's because I'm an old, who's still used to the (deprecated) ‘guix
> environment’, but wanted to sound hip by saying ‘guix shell’ instead.
> A recipe for failure.
>
> The two are semantically equivalent but not identical, so I should
> have said
>
>  $ guix shell -D guix -- ./pre-inst-env stuff
>
> Note the -D, for --development (‘add P's inputs rather than P
> itself’).
>
> Nothing wrong with keeping guile-* packages in your user profile but
> the above is a bit cleaner.
>
> Kind regards,
>
> T G-R
>
> [[End of PGP Signed Part]]

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

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

* bug#56193: Add Climate Data Operators package
  2022-06-25 10:18 ` [bug#56193] [PATCH] Add Climate Data Operators package Roman Scherer
  2022-06-25 11:09   ` Tobias Geerinckx-Rice via Guix-patches via
@ 2022-07-03 14:07   ` Ludovic Courtès
  2022-07-03 16:47     ` [bug#56193] " Roman Scherer
  1 sibling, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2022-07-03 14:07 UTC (permalink / raw)
  To: Roman Scherer; +Cc: 56193-done

Hi,

Roman Scherer <roman.scherer@burningswell.com> skribis:

> From d003fb5a519341a23973e8565ac7bc3195742808 Mon Sep 17 00:00:00 2001
> From: r0man <roman@burningswell.com>
> Date: Sat, 25 Jun 2022 12:10:00 +0200
> Subject: [PATCH] Add Climate Data Operators package
>
> This patch adds CDO, a collection of command line Operators to manipulate and
> analyse Climate and NWP model Data to Guix's geo module.

I tweaked the description and commit log, change #:configure-flags to
use the ‘this-package-input’ idiom, and committed.

Thanks!

Ludo’.




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

* [bug#56193] Add Climate Data Operators package
  2022-07-03 14:07   ` bug#56193: " Ludovic Courtès
@ 2022-07-03 16:47     ` Roman Scherer
  0 siblings, 0 replies; 9+ messages in thread
From: Roman Scherer @ 2022-07-03 16:47 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 56193-done

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


Cool, I didn't know about this-package-input.

Thank you!

Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Roman Scherer <roman.scherer@burningswell.com> skribis:
>
>> From d003fb5a519341a23973e8565ac7bc3195742808 Mon Sep 17 00:00:00 2001
>> From: r0man <roman@burningswell.com>
>> Date: Sat, 25 Jun 2022 12:10:00 +0200
>> Subject: [PATCH] Add Climate Data Operators package
>>
>> This patch adds CDO, a collection of command line Operators to manipulate and
>> analyse Climate and NWP model Data to Guix's geo module.
>
> I tweaked the description and commit log, change #:configure-flags to
> use the ‘this-package-input’ idiom, and committed.
>
> Thanks!
>
> Ludo’.

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

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

end of thread, other threads:[~2022-07-03 16:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-24 14:28 [bug#56193] Add Climate Data Operators package Roman Scherer
2022-06-24 19:10 ` [bug#56193] (no subject) Antero Mejr via Guix-patches via
2022-06-25 10:18 ` [bug#56193] [PATCH] Add Climate Data Operators package Roman Scherer
2022-06-25 11:09   ` Tobias Geerinckx-Rice via Guix-patches via
2022-06-25 11:43     ` Roman Scherer
2022-06-25 12:05       ` Tobias Geerinckx-Rice via Guix-patches via
2022-06-25 12:18         ` Roman Scherer
2022-07-03 14:07   ` bug#56193: " Ludovic Courtès
2022-07-03 16:47     ` [bug#56193] " Roman Scherer

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.