unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Herman Rimm via Guix-patches via <guix-patches@gnu.org>
To: 70715@debbugs.gnu.org
Cc: Christopher Baines <guix@cbaines.net>,
	Efraim Flashner <efraim@flashner.co.il>,
	Lars-Dominik Braun <lars@6xq.net>, Marius Bakke <marius@gnu.org>,
	Munyoki Kilyungi <me@bonfacemunyoki.com>,
	Sharlatan Hellseher <sharlatanus@gmail.com>,
	Tanguy Le Carrour <tanguy@bioneland.org>,
	jgart <jgart@dismail.de>
Subject: [bug#70715] [PATCH v2 3/3] guix: End package descriptions with period.
Date: Sun, 12 May 2024 21:08:32 +0200	[thread overview]
Message-ID: <b97b6cba8d848a5f27de676b5902c8b32e1771ab.1715540349.git.herman@rimm.ee> (raw)
In-Reply-To: <cover.1715540349.git.herman@rimm.ee>

* guix/import/utils.scm (beautify-description): Append period to last
words which do not end with one.
* tests/crate.scm: Append period to descriptions.
* tests/elm.scm: Append period to descriptions.
* tests/gem.scm: Append period to descriptions.
* tests/hexpm.scm: Append period to descriptions.
* tests/minetest.scm: Append period to descriptions.
* tests/pypi.scm: Append period to descriptions.

Change-Id: I0b12c4d94cb26cf62fab5b7cbf7885e66ff6c10f
---
 guix/import/utils.scm |  9 +++++++++
 tests/crate.scm       | 36 ++++++++++++++++++------------------
 tests/elm.scm         |  2 +-
 tests/gem.scm         | 12 ++++++------
 tests/hexpm.scm       |  8 ++++----
 tests/minetest.scm    |  2 +-
 tests/pypi.scm        |  8 ++++----
 7 files changed, 43 insertions(+), 34 deletions(-)

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 09a01cf315..45fed93134 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -370,6 +370,15 @@ (define* (beautify-description description #:optional (length 80))
              (cons* "This" "package"
                     (string-downcase first) rest))
             (_ words)))
+         (new-words
+           (match new-words
+             ((rest ... last)
+              (reverse (cons (if (or (string-suffix? "." last)
+                                     (string-suffix? "!" last)
+                                     (string-suffix? "?" last))
+                               last
+                               (string-append last "."))
+                             (reverse rest))))))
          (cleaned
           (string-join (map fix-word new-words))))
     ;; Use double spacing between sentences
diff --git a/tests/crate.scm b/tests/crate.scm
index 8b5bbc1b03..5b4ad08c3c 100644
--- a/tests/crate.scm
+++ b/tests/crate.scm
@@ -503,7 +503,7 @@ (define have-guile-semver?
                          (("rust-leaf-alice" ('unquote 'rust-leaf-alice-0.7))))))
                       (home-page "http://example.com")
                       (synopsis "summary")
-                      (description "This package provides summary")
+                      (description "This package provides summary.")
                       (license (list license:expat license:asl2.0))))
 
            (string=? test-source-hash hash))
@@ -592,7 +592,7 @@ (define have-guile-semver?
                  ('quasiquote (#:skip-build? #t)))
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0))))
             (define-public 'rust-leaf-alice-0.7
               (package
@@ -611,7 +611,7 @@ (define have-guile-semver?
                 (arguments ('quasiquote (#:skip-build? #t)))
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0))))
             (define-public 'rust-leaf-bob-3
               (package
@@ -630,7 +630,7 @@ (define have-guile-semver?
                 (arguments ('quasiquote (#:skip-build? #t)))
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0))))
             (define-public 'rust-intermediate-b-1
               (package
@@ -653,7 +653,7 @@ (define have-guile-semver?
                                  ('unquote rust-leaf-bob-3))))))
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0))))
             (define-public 'rust-intermediate-a-1
               (package
@@ -680,7 +680,7 @@ (define have-guile-semver?
                                  ('unquote rust-leaf-bob-3))))))
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0))))
             (define-public 'rust-root-1
               (package
@@ -711,7 +711,7 @@ (define have-guile-semver?
                                  ('unquote rust-intermediate-c-1))))))
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0)))))
            #t)
           (x
@@ -740,7 +740,7 @@ (define have-guile-semver?
                                  ('unquote rust-leaf-alice-0.7))))))
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0))))
             (define-public 'rust-leaf-alice-0.7
               (package
@@ -758,7 +758,7 @@ (define have-guile-semver?
                 (build-system cargo-build-system)
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0))))
             (define-public 'rust-leaf-bob-3
               (package
@@ -776,7 +776,7 @@ (define have-guile-semver?
                 (build-system cargo-build-system)
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0))))
             (define-public 'rust-intermediate-b-1
               (package
@@ -798,7 +798,7 @@ (define have-guile-semver?
                                  ('unquote rust-leaf-bob-3))))))
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0))))
             (define-public 'rust-intermediate-a-1
               (package
@@ -824,7 +824,7 @@ (define have-guile-semver?
                                  ('unquote rust-leaf-bob-3))))))
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0))))
             (define-public 'rust-root-1
               (package
@@ -855,7 +855,7 @@ (define have-guile-semver?
                                  ('unquote rust-intermediate-c-1))))))
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0)))))
            #t)
           (x
@@ -972,7 +972,7 @@ (define rust-leaf-bob-3.0.2-yanked
                              ('unquote 'rust-leaf-bob-4.0.0-yanked))))))
             (home-page "http://example.com")
             (synopsis "summary")
-            (description "This package provides summary")
+            (description "This package provides summary.")
             (license (list license:expat license:asl2.0)))))
        #t)
       (x
@@ -1038,7 +1038,7 @@ (define rust-leaf-bob-3.0.2-yanked
                 (build-system cargo-build-system)
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0))))
             (define-public 'rust-leaf-bob-3.0.2-yanked
               (package
@@ -1058,7 +1058,7 @@ (define rust-leaf-bob-3.0.2-yanked
                 (build-system cargo-build-system)
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0))))
             (define-public 'rust-leaf-bob-3
               (package
@@ -1076,7 +1076,7 @@ (define rust-leaf-bob-3.0.2-yanked
                 (build-system cargo-build-system)
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0))))
             (define-public 'rust-bar-1
               (package
@@ -1103,7 +1103,7 @@ (define rust-leaf-bob-3.0.2-yanked
                                  ('unquote 'rust-leaf-bob-4.0.0-yanked))))))
                 (home-page "http://example.com")
                 (synopsis "summary")
-                (description "This package provides summary")
+                (description "This package provides summary.")
                 (license (list license:expat license:asl2.0)))))
             #t)
           (x
diff --git a/tests/elm.scm b/tests/elm.scm
index c30623da03..48d3eb4b01 100644
--- a/tests/elm.scm
+++ b/tests/elm.scm
@@ -257,7 +257,7 @@ (define (directory-sha256 directory)
                  "https://package.elm-lang.org/packages/elm-guix/demo/3.0.0")
                 (synopsis "A test for `(guix import elm)`")
                 (description
-                 "This package provides a test for `(guix import elm)`")
+                 "This package provides a test for `(guix import elm)`.")
                 (properties '((upstream-name . "elm-guix/demo")))
                 (license license:gpl3+)))
             (equal? (directory-sha256 elm-guix-demo-dir)
diff --git a/tests/gem.scm b/tests/gem.scm
index 7e2436e3fb..dae29437e5 100644
--- a/tests/gem.scm
+++ b/tests/gem.scm
@@ -117,7 +117,7 @@ (define test-bundler-json
           (build-system ruby-build-system)
           (propagated-inputs (list bundler ruby-bar))
           (synopsis "A cool gem")
-          (description "This package provides a cool gem")
+          (description "This package provides a cool gem.")
           (home-page "https://example.com")
           (license (list license:expat license:asl2.0)))
        #t)
@@ -146,7 +146,7 @@ (define test-bundler-json
           (build-system ruby-build-system)
           (propagated-inputs (list bundler ruby-bar))
           (synopsis "A cool gem")
-          (description "This package provides a cool gem")
+          (description "This package provides a cool gem.")
           (home-page "https://example.com")
           (license (list license:expat license:asl2.0)))
        #t)
@@ -182,7 +182,7 @@ (define test-bundler-json
                (build-system ruby-build-system)
                (propagated-inputs (list bundler))
                (synopsis "Another cool gem")
-               (description "Another cool gem")
+               (description "Another cool gem.")
                (home-page "https://example.com")
                (license #f))                      ;no licensing info
              (package
@@ -198,7 +198,7 @@ (define test-bundler-json
                (build-system ruby-build-system)
                (propagated-inputs (list bundler ruby-bar))
                (synopsis "A cool gem")
-               (description "This package provides a cool gem")
+               (description "This package provides a cool gem.")
                (home-page "https://example.com")
                (license (list license:expat license:asl2.0))))
            #t)
@@ -234,7 +234,7 @@ (define test-bundler-json
                (build-system ruby-build-system)
                (propagated-inputs (list bundler))
                (synopsis "Another cool gem")
-               (description "Another cool gem")
+               (description "Another cool gem.")
                (home-page "https://example.com")
                (license #f))                      ;no licensing info
              (package
@@ -250,7 +250,7 @@ (define test-bundler-json
                (build-system ruby-build-system)
                (propagated-inputs (list bundler ruby-bar))
                (synopsis "A cool gem")
-               (description "This package provides a cool gem")
+               (description "This package provides a cool gem.")
                (home-page "https://example.com")
                (license (list license:expat license:asl2.0))))
            #t)
diff --git a/tests/hexpm.scm b/tests/hexpm.scm
index 5df9af0ca6..1e746f9b34 100644
--- a/tests/hexpm.scm
+++ b/tests/hexpm.scm
@@ -152,7 +152,7 @@ (define test-fasel-release
           (build-system rebar-build-system)
           (inputs (list erlang-blubb erlang-fasel))
           (synopsis "A cool package")
-          (description "This package provides a cool package")
+          (description "This package provides a cool package.")
           (home-page "https://hex.pm/packages/bla")
           (license (list license:expat license:asl2.0)))
        #t)
@@ -212,7 +212,7 @@ (define test-fasel-release
                (build-system mix-build-system)
                (inputs (list erlang-fasel))
                (synopsis "Another cool package")
-               (description "Another cool package")
+               (description "Another cool package.")
                (home-page "https://hex.pm/packages/blubb")
                (license license:expat))
              (package
@@ -227,7 +227,7 @@ (define test-fasel-release
                     "1k6d70mxwqgq78jrbr7yqnw187yki74jnagybi7nacrj4a67qjha"))))
                (build-system gnu-build-system)
                (synopsis "Yet another cool package")
-               (description "Yet another cool package")
+               (description "Yet another cool package.")
                (home-page "https://hex.pm/packages/fasel")
                (license "GPL"))
              (package
@@ -243,7 +243,7 @@ (define test-fasel-release
                (build-system rebar-build-system)
                (inputs (list erlang-blubb erlang-fasel))
                (synopsis "A cool package")
-               (description "This package provides a cool package")
+               (description "This package provides a cool package.")
                (home-page "https://hex.pm/packages/bla")
                (license (list license:expat license:asl2.0))))
            #t)
diff --git a/tests/minetest.scm b/tests/minetest.scm
index 78469bf95b..bf1313ee22 100644
--- a/tests/minetest.scm
+++ b/tests/minetest.scm
@@ -48,7 +48,7 @@ (define* (make-package-sexp #:key
                             (home-page "https://example.org/foo")
                             (repo "https://example.org/foo.git")
                             (synopsis "synopsis")
-                            (guix-description "description")
+                            (guix-description "description.")
                             (guix-license
                              '(list license:cc-by-sa4.0 license:lgpl3+))
                             (inputs '())
diff --git a/tests/pypi.scm b/tests/pypi.scm
index 42b39cde73..c9aee34d8b 100644
--- a/tests/pypi.scm
+++ b/tests/pypi.scm
@@ -315,7 +315,7 @@ (define-syntax-rule (with-pypi responses body ...)
             (native-inputs (list python-pytest))
             (home-page "http://example.com")
             (synopsis "summary")
-            (description "summary")
+            (description "summary.")
             (license license:lgpl2.0))
          (and (string=? default-sha256/base32 hash)
               (equal? (pypi->guix-package "foo" #:version "1.0.0")
@@ -356,7 +356,7 @@ (define-syntax-rule (with-pypi responses body ...)
             (native-inputs (list python-pytest))
             (home-page "http://example.com")
             (synopsis "summary")
-            (description "summary")
+            (description "summary.")
             (license license:lgpl2.0))
          (string=? default-sha256/base32 hash))
         (x
@@ -384,7 +384,7 @@ (define-syntax-rule (with-pypi responses body ...)
             (build-system pyproject-build-system)
             (home-page "http://example.com")
             (synopsis "summary")
-            (description "summary")
+            (description "summary.")
             (license license:lgpl2.0))
          (string=? default-sha256/base32 hash))
         (x
@@ -414,7 +414,7 @@ (define-syntax-rule (with-pypi responses body ...)
             (native-inputs (list python-pytest))
             (home-page "http://example.com")
             (synopsis "summary")
-            (description "summary")
+            (description "summary.")
             (license license:lgpl2.0))
          (string=? default-sha256/base32 hash))
         (x
-- 
2.41.0





      parent reply	other threads:[~2024-05-12 19:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02 12:57 [bug#70715] [PATCH 0/4] Change imported crate style Herman Rimm via Guix-patches via
2024-05-02 12:58 ` [bug#70715] [PATCH 1/4] guix: Indent cargo-development-inputs Herman Rimm via Guix-patches via
2024-05-02 12:58   ` [bug#70715] [PATCH 2/4] guix: Beautify crate importer synopses Herman Rimm via Guix-patches via
2024-05-02 12:58   ` [bug#70715] [PATCH 3/4] guix: Include a main verb in crate importer descriptions Herman Rimm via Guix-patches via
2024-05-02 12:59   ` [bug#70715] [PATCH 4/4] guix: End package descriptions with period Herman Rimm via Guix-patches via
2024-05-12 19:08 ` [bug#70715] [PATCH v2 0/3] Change imported crate style Herman Rimm via Guix-patches via
2024-05-12 19:08   ` [bug#70715] [PATCH v2 1/3] guix: Beautify crate importer synopses Herman Rimm via Guix-patches via
2024-05-12 19:08   ` [bug#70715] [PATCH v2 2/3] guix: Include a main verb in crate importer descriptions Herman Rimm via Guix-patches via
2024-05-12 19:08   ` Herman Rimm via Guix-patches via [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b97b6cba8d848a5f27de676b5902c8b32e1771ab.1715540349.git.herman@rimm.ee \
    --to=guix-patches@gnu.org \
    --cc=70715@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    --cc=guix@cbaines.net \
    --cc=herman@rimm.ee \
    --cc=jgart@dismail.de \
    --cc=lars@6xq.net \
    --cc=marius@gnu.org \
    --cc=me@bonfacemunyoki.com \
    --cc=sharlatanus@gmail.com \
    --cc=tanguy@bioneland.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).