Commit Graph

21 Commits

Author SHA1 Message Date
Arun Isaac 81a11883dc
weather: Print 0.0% correctly.
* guix/scripts/weather.scm (report-server-coverage): Report 0% coverage as
0.0%, not as .0%.
2020-07-05 16:13:37 +05:30
Ludovic Courtès 1ae7a9251b
weather: Delete duplicate entries coming from '--manifest'.
* guix/scripts/weather.scm (load-manifest): Call 'delete-duplicates'.
2020-04-14 16:01:05 +02:00
Ludovic Courtès 9acacb71c9
Remove workaround for 'time-monotonic' in Guile 2.2.2.
This is a followup to e688c2df39.

* build-aux/hydra/evaluate.scm <top level>: Remove 'time-monotonic'
definition.
* guix/cache.scm: Likewise.
* guix/progress.scm: Likewise.
* guix/scripts/substitute.scm: Likewise.
* guix/scripts/weather.scm: Likewise.
* tests/cache.scm: Likewise.
2020-03-22 16:49:47 +01:00
Ludovic Courtès a0feabdfdb
weather: '--coverage' filters out non-package objects.
This is a followup to d37b5a1b58.

* guix/scripts/weather.scm (guix-weather): Filter PACKAGES passed to
'report-package-coverage'.
2020-03-13 17:33:37 +01:00
Ludovic Courtès be764b47ad
weather: Exit with non-zero when coverage is below 100%.
* guix/scripts/weather.scm (report-server-coverage): Return the coverage ratio.
(guix-weather): Exit if and only if each server's coverage is 1.
2020-03-13 17:33:37 +01:00
Ludovic Courtès 2843fed0e9
weather: Allow for multiple '--manifest' options.
* guix/scripts/weather.scm (guix-weather)[package-list]: Account for all
the 'manifest entries in OPTS.
* doc/guix.texi (Invoking guix weather): Document it.
2020-03-12 18:32:16 +01:00
Ludovic Courtès 71bb485541
weather: Add '--display-missing'.
* guix/scripts/weather.scm (report-server-coverage): Add
 #:display-missing? and honor it.
(show-help, %options): Add "--display-missing".
(guix-weather): Pass #:display-missing? to 'report-server-coverage'.
* doc/guix.texi (Invoking guix weather): Document it.
2020-03-12 18:32:16 +01:00
Ludovic Courtès e7671685a8
weather: Parameterize '%graft?' upfront.
* guix/scripts/weather.scm (guix-weather): Parameterize %GRAFT? upfront.
2020-03-05 16:33:37 +01:00
Ludovic Courtès d37b5a1b58
weather: Allow non-package objects in manifest.
* guix/scripts/weather.scm (package-outputs)[lower-object/no-grafts]:
New procedure.
Use it instead of 'package->derivation'.
2020-03-05 16:33:37 +01:00
Ludovic Courtès b90ae065b5
substitute: Select the best compression methods.
When a server publishes several URLs with different compression methods,
'guix substitute' can now choose the best one among the compression
methods that it supports.

* guix/scripts/substitute.scm (<narinfo>)[uri]: Replace with...
[uris]: ... this.
[compression]: Replace with...
[compressions]: ... this.
[file-size]: Replace with...
[file-sizes]: ... this.
[file-hash]: Replace with...
[file-hashes]: ... this.
(narinfo-maker): Adjust accordingly.  Ensure 'file-sizes' and
'file-hashes' have the right length.
(assert-valid-signature, valid-narinfo?): Use the first element of
'narinfo-uris' in error messages.
(read-narinfo): Expect "URL", "Compression", "FileSize", and "FileHash"
to occur multiple times.
(display-narinfo-data): Call 'select-uri' to determine the file size.
(%compression-methods): New variable.
(supported-compression?, compresses-better?, select-uri): New
procedures.
(process-substitution): Call 'select-uri' to select the URI and
compression.
* guix/scripts/weather.scm (report-server-coverage): Account for all the
values returned by 'narinfo-file-sizes'.
* tests/substitute.scm ("substitute, narinfo with several URLs"): New
test.
2019-06-02 22:01:57 +02:00
Ludovic Courtès b1903b99e0
weather: Accept package specs on the command line.
Previously, non-option arguments would be ignored.  Now it puts them to
good use.

* guix/scripts/weather.scm (guix-weather)[package-list]: New procedure.
Use it.
* doc/guix.texi (Invoking guix weather): Adjust accordingly.
2019-05-22 00:09:42 +02:00
Ludovic Courtès bd414e273c
weather: Add '--coverage'.
* guix/scripts/weather.scm (show-help, %options): Add '--coverage'.
(package-partition-boundary, package->output-mapping)
(substitute-oracle, report-package-coverage-per-system)
(report-package-coverage): New procedures.
(guix-weather): Honor '--coverage'.
* doc/guix.texi (Invoking guix weather): Document it.
2019-01-25 14:06:37 +01:00
Ludovic Courtès 731c1a20bc
weather: Ignore deprecated packages but not hidden packages.
* guix/scripts/weather.scm (all-packages): Pass #:select? to
'fold-packages'.
2019-01-25 14:06:37 +01:00
Kyle Meyer 7a369f6d2f
weather: Fix pasto in --version output.
* guix/scripts/weather.scm (%options): Correct the command name passed to
show-version-and-exit.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-07-07 18:10:31 +02:00
Ludovic Courtès 7c8b7e35d0
weather: Fix type error when reporting CI stats.
* guix/scripts/weather.scm (report-server-coverage): Remove 'missing'
binding above 'queued-subset' call.  Before that 'queued-subset' would
be called with a number instead of a list.
2018-04-30 23:41:21 +02:00
Ludovic Courtès 183445a6ed
weather: Report continuous integration stats.
* guix/scripts/weather.scm (histogram, throughput, queued-subset): New
procedures.
(report-server-coverage): Report CI information.
* doc/guix.texi (Invoking guix weather): Document it.
2018-03-28 16:17:06 +02:00
Ludovic Courtès 1fafa2f587
weather: Use (guix progress) for progress report.
* guix/progress.scm (start-progress-reporter!, stop-progress-reporter!)
(progress-reporter-report!): New procedures.
* guix/scripts/weather.scm (call-with-progress-reporter): New procedure.
(package-outputs)[update-progress!]: Remove.
Use 'call-with-progress-reporter' instead.
(guix-weather): Parameterize 'current-terminal-columns'.
2017-12-01 16:00:14 +01:00
Ludovic Courtès a1ff7e1d8d
scripts: Factorize option parsing sans 'GUIX_BUILD_OPTIONS'.
* guix/scripts.scm (parse-command-line): Add #:build-options? parameter
and honor it.
* guix/scripts/challenge.scm (guix-challenge): Use 'parse-command-line'
with #:build-options? #f instead of 'args-fold*'.
* guix/scripts/gc.scm (guix-gc): Likewise.
* guix/scripts/graph.scm (guix-graph): Likewise.
* guix/scripts/hash.scm (guix-hash): Likewise.
* guix/scripts/lint.scm (guix-lint): Likewise.
* guix/scripts/refresh.scm (guix-refresh): Likewise.
* guix/scripts/size.scm (guix-size): Likewise.
* guix/scripts/weather.scm (guix-weather): Likewise.
2017-10-28 09:45:53 +02:00
Ludovic Courtès efff3dd4c9
scripts: Use 'args-fold*' for command that do not honor build flags.
Fixes <https://bugs.gnu.org/28984>.
Reported by Eric Bavier.

* guix/scripts/challenge.scm (guix-challenge): Use 'args-fold*' instead
of 'parse-command-line'.
* guix/scripts/size.scm (guix-size): Likewise.
* guix/scripts/weather.scm (guix-weather): Likewise.
2017-10-27 13:11:26 -07:00
Ludovic Courtès 952cf67cb1
weather: Show "-m" option in help message.
Reported by Alex Kost <alezost@gmail.com>.

* guix/scripts/weather.scm (show-help): Show "-m".
2017-07-27 11:47:50 +02:00
Ludovic Courtès 585347d7aa
Add 'guix weather'.
* guix/scripts/weather.scm: New file.
* Makefile.am (MODULES): Add it.
* doc/guix.texi (Substitutes, Invoking guix publish): Mention "guix
weather".
(Invoking guix weather): New node.

Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
2017-07-25 12:15:43 +02:00