GNU bug report logs - #59938
[PATCH] add python-ogr2osm package

Previous Next

Package: guix-patches;

Reported by: Patrick Noll <patrick <at> patricknoll.com>

Date: Sat, 10 Dec 2022 06:22:02 UTC

Severity: normal

Tags: patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59938 in the body.
You can then email your comments to 59938 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#59938; Package guix-patches. (Sat, 10 Dec 2022 06:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Patrick Noll <patrick <at> patricknoll.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 10 Dec 2022 06:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Patrick Noll <patrick <at> patricknoll.com>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: [PATCH] add python-ogr2osm package
Date: Sat, 10 Dec 2022 04:37:44 +0000
[Message part 1 (text/plain, inline)]
gnu/packages/geo.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index b3a5c0df3f..cbe88bf9bc 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -770,6 +770,29 @@ (define-public python-geopandas
require a spatial database such as PostGIS.")
(license license:bsd-3)))

+(define-public python-ogr2osm
+ (package
+ (name "python-ogr2osm")
+ (version "1.1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ogr2osm" version))
+ (sha256
+ (base32
+ "1rs0qjahssikayn91n790ms8dj3m3v327hp03c9ivlzn8vg6kalf"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ (list python-gdal python-lxml))
+ (arguments '(#:tests? #f)) ; Tests not included in release tarball
+ (home-page
+ "https://github.com/roelderickx/ogr2osm")
+ (synopsis
+ "Convert ogr-readable files like shapefiles into Openstreetmap(osm) format")
+ (description
+ "A tool for converting ogr-readable files into Openstreetmap(osm) format. Ogr2osm supports reading from ogr files like shapefiles or Postgres database. Ogr2osm converts data into osm or osm.pbf formats. A translation file can be used to manipulate the data during conversion.")
+ (license license:expat))
+
(define-public python-osmnx
(package
(name "python-osmnx")

base-commit: 3ae6f30767f962da74d18d824b521462e149b89a
-- 2.38.1
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#59938; Package guix-patches. (Sun, 23 Apr 2023 14:48:02 GMT) Full text and rfc822 format available.

Message #8 received at 59938 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Patrick Noll <patrick <at> patricknoll.com>
Cc: 59938 <at> debbugs.gnu.org
Subject: Re: [bug#59938] [PATCH] add python-ogr2osm package
Date: Sun, 23 Apr 2023 16:47:41 +0200
Hello,

Patrick Noll <patrick <at> patricknoll.com> writes:

> +(define-public python-ogr2osm

Thank you.

Please note your commit message is not properly formatted. It should
look like:

    gnu: Add python-ogr2osm.

    * gnu/packages/geo.scm (python-ogr2osm): New variable.

Also, indentation is a bit off. You may want to use "guix style" command
to format the packge.

> + (propagated-inputs
> + (list python-gdal python-lxml))

AFAIK, python-gdal is not provided in Guix, so you would need to package
it as well. Also, the package itself probably requires gdal as an input.

> + (arguments '(#:tests? #f)) ; Tests not included in release tarball

Maybe it is better to get it from upsteram them. WDYT?

> + (home-page
> + "https://github.com/roelderickx/ogr2osm")
> + (synopsis
> + "Convert ogr-readable files like shapefiles into Openstreetmap(osm) format")
> + (description
> + "A tool for converting ogr-readable files into Openstreetmap(osm)
> format. Ogr2osm supports reading from ogr files like shapefiles or
> Postgres database. Ogr2osm converts data into osm or osm.pbf formats.
> A translation file can be used to manipulate the data during
> conversion.")

The description should consist of complete sentences. Also, sentences
need to be separated with two spaces.

Would you want to send an updated patch?

Regards,
-- 
Nicolas Goaziou




Information forwarded to andreas <at> enge.fr, bavier <at> posteo.net, sharlatanus <at> gmail.com, guix-patches <at> gnu.org:
bug#59938; Package guix-patches. (Fri, 26 Jan 2024 01:27:01 GMT) Full text and rfc822 format available.

Message #11 received at 59938 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 59938 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH] add python-ogr2osm package
Date: Fri, 26 Jan 2024 01:26:04 +0000
Hi Nicolas and Patrick,

I've applied all suggestions mentioned re-style the package, enable simple
tests, update to the latest upstream version and tested if after build.

Please let me know if it's good now.

Thanks,
Oleg

Patrick Noll (1):
  gnu: Add python-ogr2osm.

 gnu/packages/geo.scm | 59 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)


base-commit: fdffaa2256775a48585dbc563d646fdccb96f284
-- 
2.41.0





Information forwarded to andreas <at> enge.fr, bavier <at> posteo.net, sharlatanus <at> gmail.com, guix-patches <at> gnu.org:
bug#59938; Package guix-patches. (Fri, 26 Jan 2024 01:27:02 GMT) Full text and rfc822 format available.

Message #14 received at 59938 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 59938 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>,
 Patrick Noll <patrick <at> patricknoll.com>
Subject: [PATCH 1/1] gnu: Add python-ogr2osm.
Date: Fri, 26 Jan 2024 01:26:30 +0000
From: Patrick Noll <patrick <at> patricknoll.com>

* gnu/packages/geo.scm (python-ogr2osm): New variable.

Co-authored-by: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Change-Id: Id083d89dd05a9e1cdeca500daff5fab872fa15b4
---
 gnu/packages/geo.scm | 59 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 119a9802d0..5ec1f6ce77 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -14,10 +14,11 @@
 ;;; Copyright © 2020, 2022 Marius Bakke <marius <at> gnu.org>
 ;;; Copyright © 2020 Christopher Baines <mail <at> cbaines.net>
 ;;; Copyright © 2020, 2021, 2022, 2023 Felix Gruber <felgru <at> posteo.net>
-;;; Copyright © 2021, 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
+;;; Copyright © 2021, 2023, 2024 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;; Copyright © 2021, 2023, 2024 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2021 Clément Lassieur <clement <at> lassieur.org>
 ;;; Copyright © 2021, 2022 Nikolay Korotkiy <sikmir <at> disroot.org>
+;;; Copyright © 2022 Patrick Noll <patrick <at> patricknoll.com>
 ;;; Copyright © 2022 Roman Scherer <roman.scherer <at> burningswell.com>
 ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
@@ -61,6 +62,7 @@ (define-module (gnu packages geo)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages backup)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
@@ -974,6 +976,61 @@ (define-public python-geopandas
 require a spatial database such as PostGIS.")
     (license license:bsd-3)))
 
+(define-public python-ogr2osm
+  (package
+    (name "python-ogr2osm")
+    (version "1.2.0")
+    (source
+     (origin
+       (method git-fetch) ; no tests data in PyPi package
+       (uri
+        (git-reference
+         (url "https://github.com/roelderickx/ogr2osm/")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0hwqnx3cdqxmniydpj1v31kglq1xjsx41d8p10c9j4hg8kb43j80"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      ;; There are tests in git checkout but non of the examples taken from
+      ;; GitHub Actions worked for me. Disabling them to be checked later
+      ;; <https://github.com/roelderickx/ogr2osm/blob/main/.github/workflows/test.yml>.
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                ;; TODO: Fix provided tests.
+                ;; (invoke "cram" "test/basic_usage.t")
+                ;; (invoke "cram" "test/osm_output.t")
+                ;; (invoke "cram" "test/pbf_output.t")
+
+                ;; Run simple tests to ensure that the command is working.
+                (invoke "ogr2osm" "--help")
+                (invoke
+                 "ogr2osm" "-f" "test/shapefiles/basic_geometries.kml")))))))
+    (inputs
+     (list gdal))
+    (native-inputs
+     (list coreutils
+           diffutils
+           libxml2
+           python-cram
+           which))
+    (propagated-inputs
+     (list python-lxml
+           python-protobuf))
+    (home-page "https://github.com/roelderickx/ogr2osm")
+    (synopsis "Convert ogr-readable files like shapefiles into OSM or PDF formats")
+    (description
+     "@code{ogr2osm} is a tool for converting ogr-readable files into
+@acronym{OSM, OpenStreetMap} format.  It supports reading from OGR files like
+shapefiles or PostgresSQL database and converts data into @code{osm} or
+@code{osm.pbf} formats.  A translation file can be used to manipulate the data
+during conversion.")
+    (license license:expat)))
+
 (define-public python-osmnx
   (package
     (name "python-osmnx")
-- 
2.41.0





Reply sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
You have taken responsibility. (Sun, 28 Jan 2024 22:34:02 GMT) Full text and rfc822 format available.

Notification sent to Patrick Noll <patrick <at> patricknoll.com>:
bug acknowledged by developer. (Sun, 28 Jan 2024 22:34:02 GMT) Full text and rfc822 format available.

Message #19 received at 59938-done <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 59938-done <at> debbugs.gnu.org
Subject: [PATCH] add python-ogr2osm package
Date: Sun, 28 Jan 2024 22:33:35 +0000
[Message part 1 (text/plain, inline)]
Pushed as 7bf6a6f9db23980d2e2508842dcb303a9910b839 to master.

Thanks,
Oleg
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 26 Feb 2024 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 59 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.