[PATCH 0/4] Change imported crate style.

  • Done
  • quality assurance status badge
Details
2 participants
  • Herman Rimm
  • Ludovic Courtès
Owner
unassigned
Submitted by
Herman Rimm
Severity
normal
H
H
Herman Rimm wrote on 2 May 14:57 +0200
(address . guix-patches@gnu.org)
20240502125700.15062-1-herman@rimm.ee
Hello,

Having created about 60 packages with the crate importer, I did it
slightly faster than usual with this patch series applied.

I would say 75% of the time the unindented #:cargo-development-inputs
exceeded 72 characters.

About 20% of the time a crate synopsis and description start with a
proper noun (Rust) or an acronym (FFI). Adding 'This package provides '
makes the description into more of a sentence, though sometimes an
indefinite article is missing. I could also instead add a flag to 'guix
import' for extending the description in this way.

Cheers,
Herman

Herman Rimm (4):
guix: Indent cargo-development-inputs.
guix: Beautify crate importer synopses.
guix: Include a main verb in crate importer descriptions.
guix: End package descriptions with period.

guix/import/crate.scm | 12 ++++++++----
guix/import/utils.scm | 7 +++++++
guix/read-print.scm | 1 +
3 files changed, 16 insertions(+), 4 deletions(-)

--
2.41.0
H
H
Herman Rimm wrote on 2 May 14:58 +0200
[PATCH 1/4] guix: Indent cargo-development-inputs.
(address . 70715@debbugs.gnu.org)
20240502125900.15177-1-herman@rimm.ee
* guix/import/crate.scm (make-crate-sexp): Swap cargo-development-inputs
and cargo-inputs.
* guix/read-print.scm (%newline-forms): Add #:cargo-development-inputs.

Change-Id: I54a8c1934381cdb25b6d05e503d2bd2315d010b6
---
guix/import/crate.scm | 4 ++--
guix/read-print.scm | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)

Toggle diff (30 lines)
diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index 7a25b2243c..81e442141b 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -207,9 +207,9 @@ (define (format-inputs inputs)
,@(maybe-arguments (append (if build?
'()
'(#:skip-build? #t))
- (maybe-cargo-inputs cargo-inputs)
(maybe-cargo-development-inputs
- cargo-development-inputs)))
+ cargo-development-inputs)
+ (maybe-cargo-inputs cargo-inputs)))
(home-page ,home-page)
(synopsis ,synopsis)
(description ,(beautify-description description))
diff --git a/guix/read-print.scm b/guix/read-print.scm
index 6421b79737..80662f7189 100644
--- a/guix/read-print.scm
+++ b/guix/read-print.scm
@@ -365,6 +365,7 @@ (define %newline-forms
('git-reference '(uri origin source))
('sha256 '(origin source package))
('arguments '(package))
+ ('#:cargo-development-inputs '(arguments))
('list '(arguments package))
('search-paths '(package))
('native-search-paths '(package))
--
2.41.0
H
H
Herman Rimm wrote on 2 May 14:58 +0200
[PATCH 2/4] guix: Beautify crate importer synopses.
(address . 70715@debbugs.gnu.org)
20240502125900.15177-2-herman@rimm.ee
* guix/import/crate.scm (make-crate-sexp): Use beautify-synopsis.

Change-Id: I4e30e043d34da7a3c355e098f155c0c75b619063
---
guix/import/crate.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index 81e442141b..2f74333fa9 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -211,7 +211,7 @@ (define (format-inputs inputs)
cargo-development-inputs)
(maybe-cargo-inputs cargo-inputs)))
(home-page ,home-page)
- (synopsis ,synopsis)
+ (synopsis ,(beautify-synopsis synopsis))
(description ,(beautify-description description))
(license ,(match license
(() #f)
--
2.41.0
H
H
Herman Rimm wrote on 2 May 14:58 +0200
[PATCH 3/4] guix: Include a main verb in crate importer descriptions.
(address . 70715@debbugs.gnu.org)
20240502125900.15177-3-herman@rimm.ee
* guix/import/crate.scm (make-crate-sexp): Start description with
'This package provides '.

Change-Id: Id627759fb23da14fa7cb84e5dffb3bfc41950eab
---
guix/import/crate.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Toggle diff (26 lines)
diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index 2f74333fa9..e739faa503 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -187,6 +187,7 @@ (define (format-inputs inputs)
(guix-name (crate-name->package-name name))
(cargo-inputs (format-inputs cargo-inputs))
(cargo-development-inputs (format-inputs cargo-development-inputs))
+ (description (beautify-description description))
(pkg `(package
(name ,guix-name)
(version ,version)
@@ -212,7 +213,10 @@ (define (format-inputs inputs)
(maybe-cargo-inputs cargo-inputs)))
(home-page ,home-page)
(synopsis ,(beautify-synopsis synopsis))
- (description ,(beautify-description description))
+ (description ,(if (string-prefix? "This" description)
+ description
+ (string-append "This package provides "
+ description)))
(license ,(match license
(() #f)
(#f #f)
--
2.41.0
H
H
Herman Rimm wrote on 2 May 14:59 +0200
[PATCH 4/4] guix: End package descriptions with period.
(address . 70715@debbugs.gnu.org)
20240502125900.15177-4-herman@rimm.ee
* guix/import/utils.scm (beautify-description): Append period to last
words which do not end with one.

Change-Id: Ia901dccadee6b4fef6c7f0176ce5871409ff6ce6
---
guix/import/utils.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 09a01cf315..e06f06e196 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -370,6 +370,13 @@ (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 (string-suffix? "." last)
+ last
+ (string-append last "."))
+ (reverse rest))))))
(cleaned
(string-join (map fix-word new-words))))
;; Use double spacing between sentences
--
2.41.0
H
H
Herman Rimm wrote on 12 May 21:08 +0200
[PATCH v2 0/3] Change imported crate style.
(address . 70715@debbugs.gnu.org)
cover.1715540349.git.herman@rimm.ee
Hello,

I don't think indenting the #:cargo-development-inputs necessary;
I removed the first patch and will work on [bug#49531] instead. I added
a period to the package descriptions in the tests. I don't know how to
run all the tests, I ran '$ guix repl < tests/[test].scm' for tests
containing package descriptions.

Cheers,
Herman

Herman Rimm (3):
guix: Beautify crate importer synopses.
guix: Include a main verb in crate importer descriptions.
guix: End package descriptions with period.

guix/import/crate.scm | 8 ++++++--
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 ++++----
8 files changed, 49 insertions(+), 36 deletions(-)


base-commit: 56980ea500a1db3c8586972b8abfaf5c4e24f82d
--
2.41.0
H
H
Herman Rimm wrote on 12 May 21:08 +0200
[PATCH v2 1/3] guix: Beautify crate importer synopses.
(address . 70715@debbugs.gnu.org)
080a8f9eb967f46774fc3c6caf3db2668c6d775f.1715540349.git.herman@rimm.ee
* guix/import/crate.scm (make-crate-sexp): Use beautify-synopsis.

Change-Id: I4e30e043d34da7a3c355e098f155c0c75b619063
---
guix/import/crate.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index 7a25b2243c..921e5499da 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -211,7 +211,7 @@ (define* (make-crate-sexp #:key name version cargo-inputs cargo-development-inpu
(maybe-cargo-development-inputs
cargo-development-inputs)))
(home-page ,home-page)
- (synopsis ,synopsis)
+ (synopsis ,(beautify-synopsis synopsis))
(description ,(beautify-description description))
(license ,(match license
(() #f)
--
2.41.0
H
H
Herman Rimm wrote on 12 May 21:08 +0200
[PATCH v2 2/3] guix: Include a main verb in crate importer descriptions.
(address . 70715@debbugs.gnu.org)
2fdcf91f2da5f7170dd11daae30e71b3e77c3b1b.1715540349.git.herman@rimm.ee
* guix/import/crate.scm (make-crate-sexp): Start description with
'This package provides '.
* tests/crate.scm: Set descriptions to "This package provides summary".
---
guix/import/crate.scm | 6 +++++-
tests/crate.scm | 36 ++++++++++++++++++------------------
2 files changed, 23 insertions(+), 19 deletions(-)

Toggle diff (192 lines)
diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index 921e5499da..383a419741 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -187,6 +187,7 @@ (define* (make-crate-sexp #:key name version cargo-inputs cargo-development-inpu
(guix-name (crate-name->package-name name))
(cargo-inputs (format-inputs cargo-inputs))
(cargo-development-inputs (format-inputs cargo-development-inputs))
+ (description (beautify-description description))
(pkg `(package
(name ,guix-name)
(version ,version)
@@ -212,7 +213,10 @@ (define* (make-crate-sexp #:key name version cargo-inputs cargo-development-inpu
cargo-development-inputs)))
(home-page ,home-page)
(synopsis ,(beautify-synopsis synopsis))
- (description ,(beautify-description description))
+ (description ,(if (string-prefix? "This" description)
+ description
+ (string-append "This package provides "
+ description)))
(license ,(match license
(() #f)
(#f #f)
diff --git a/tests/crate.scm b/tests/crate.scm
index ce2f08aade..8b5bbc1b03 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 "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 "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 "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 "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 "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 "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 "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 "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 "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 "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 "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 "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 "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 "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 "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 "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 "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 "summary")
+ (description "This package provides summary")
(license (list license:expat license:asl2.0)))))
#t)
(x
--
2.41.0
H
H
Herman Rimm wrote on 12 May 21:08 +0200
[PATCH v2 3/3] guix: End package descriptions with period.
(address . 70715@debbugs.gnu.org)
b97b6cba8d848a5f27de676b5902c8b32e1771ab.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(-)

Toggle diff (352 lines)
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
L
L
Ludovic Courtès wrote on 3 Jun 22:37 +0200
Re: [bug#70715] [PATCH v2 0/3] Change imported crate style.
(name . Herman Rimm)(address . herman@rimm.ee)
87tti9ahjw.fsf@gnu.org
Hi Herman,

Herman Rimm <herman@rimm.ee> skribis:

Toggle quote (3 lines)
> I don't think indenting the #:cargo-development-inputs necessary;
> I removed the first patch and will work on [bug#49531] instead.

Yes, addressing #49531 would be great.

Toggle quote (4 lines)
> guix: Beautify crate importer synopses.
> guix: Include a main verb in crate importer descriptions.
> guix: End package descriptions with period.

Neat! Applied after tweaking commit logs and making minor changes (see
following messages).

Thanks!

Ludo’.
Closed
L
L
Ludovic Courtès wrote on 3 Jun 22:38 +0200
Re: [bug#70715] [PATCH v2 2/3] guix: Include a main verb in crate importer descriptions.
(name . Herman Rimm)(address . herman@rimm.ee)
87plsxahii.fsf@gnu.org
Herman Rimm <herman@rimm.ee> skribis:

Toggle quote (19 lines)
> +++ b/guix/import/crate.scm
> @@ -187,6 +187,7 @@ (define* (make-crate-sexp #:key name version cargo-inputs cargo-development-inpu
> (guix-name (crate-name->package-name name))
> (cargo-inputs (format-inputs cargo-inputs))
> (cargo-development-inputs (format-inputs cargo-development-inputs))
> + (description (beautify-description description))
> (pkg `(package
> (name ,guix-name)
> (version ,version)
> @@ -212,7 +213,10 @@ (define* (make-crate-sexp #:key name version cargo-inputs cargo-development-inpu
> cargo-development-inputs)))
> (home-page ,home-page)
> (synopsis ,(beautify-synopsis synopsis))
> - (description ,(beautify-description description))
> + (description ,(if (string-prefix? "This" description)
> + description
> + (string-append "This package provides "
> + description)))

I took the liberty to indent the ‘if’ above in the usual way.
L
L
Ludovic Courtès wrote on 3 Jun 22:39 +0200
Re: [bug#70715] [PATCH v2 3/3] guix: End package descriptions with period.
(name . Herman Rimm)(address . herman@rimm.ee)
87le3lahho.fsf@gnu.org
Herman Rimm <herman@rimm.ee> skribis:

Toggle quote (9 lines)
> * 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.

I also changed ‘tests/import-utils.scm’ in a similar way.
?
Your comment

This issue is archived.

To comment on this conversation send an email to 70715@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70715
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch