Commit graph

202 commits

Author SHA1 Message Date
Terts Diepraam
9c8e865b55 all: enable infer long arguments in clap 2022-01-29 02:06:29 +01:00
Greg Guthe
e6fdf0761f factor: ignore quickcheck tests using unhandled large vals
refs: #1559
2022-01-24 20:51:10 -05:00
Greg Guthe
e24ecea1da factor: tests: update Arbitrary impl for Factors
Upstream removed the Gen trait and made the gen method private in
d286e4db20
2022-01-24 20:41:22 -05:00
Greg Guthe
c037382df7 factor: update quickcheck dev dep to 1.0.3
quickcheck <1 uses rand 0.6.x which results in E0599 errors.  Upgrading resolves that error and lets
us remove the older rand version from our deps.

refs: https://stackoverflow.com/questions/56901973/errore0599-no-method-named-gen-found-for-type-mut-g-in-the-current-scope/56902740#56902740
2022-01-24 20:41:20 -05:00
Greg Guthe
a342df03f0 tests: update factor Distribution<Factors> sample to take range 2022-01-24 20:40:31 -05:00
Greg Guthe
cae6bc5e82 deps: update rand to 0.8
fix: #2888
2022-01-24 20:40:29 -05:00
Terts Diepraam
55a47f6fc0
Merge pull request #2863 from tertsdiepraam/clap-3
Clap 3
2022-01-20 23:14:52 +01:00
Roy Ivy III
2e251f91f1 0.0.12 2022-01-19 05:35:00 -06:00
Terts Diepraam
8872485922 Merge branch 'main' into clap-3 2022-01-17 13:25:51 +01:00
Sylvestre Ledru
1fbda8003c coreutils 0.0.8 => 0.0.9, uucore_procs 0.0.7 => 0.0.8, uucore 0.0.10 => 0.0.11 2022-01-16 17:05:48 +01:00
Terts Diepraam
b5ba2fc5ca factor: clap 3 2022-01-11 19:16:47 +01:00
Jeffrey Finkelstein
e9fc964a3e factor: return UResult from uumain() function 2021-12-26 16:06:33 -05:00
Roy Ivy III
f20aa49821 maint/CICD ~ (GHA) fix cargo-udeps false positives (add 'ignore' exceptions to sub-crates) 2021-11-19 17:55:02 -06:00
Roy Ivy III
363453f5e4 tests ~ (factor) refactor divisor() to return quickcheck::TestResult
- return standard quickcheck results
- drop `a == 0 && b == 0` from test domain via TestResult::discard()
- avoid divide by zero panics
- ref: #1589
2021-11-13 14:18:23 -06:00
Roy Ivy III
740d8e9bc5 docs/factor ~ (BENCHMARKING.md) fix formatting, returning missing newlines 2021-11-13 11:07:02 -06:00
nicoo
bed45602a7 factor/Cargo.toml: Document feature pending a MinRustV bump 2021-11-10 15:26:36 +01:00
nicoo
32b0178a72 factor: Update to current versions of smallvec
smallvec 1.0 and later wasn't compatible with Rust 1.33 but the
minimum supported Rust version for coreutils moved on.
2021-11-10 15:12:37 +01:00
Sylvestre Ledru
59e9870c56 Prepare version 0.0.8 2021-10-23 19:21:50 +02:00
Sylvestre Ledru
7eaae75bfc add a github action job to identify unused deps 2021-09-15 12:06:50 +02:00
Jan Verbeek
259f18fcab Update message quoting and filename printing 2021-09-07 19:49:01 +02:00
Jan Verbeek
d06c074829 Run clippy on the full workspace
These lints were cluttering up the "problems" tab in my VS
Code. `--workspace` fixes the disparity.
2021-08-24 17:10:16 +02:00
Michael Debertol
252220e9eb refactor/uucore ~ make util_name and execution_phrase functions
Since util_name and execution_phrase no longer rely on features that are
only available to macros, they may as well be plain functions.
2021-08-14 17:55:18 +02:00
Roy Ivy III
c5792c2a0f refactor ~ use util_name!() as clap::app::App name argument for all utils 2021-08-14 13:53:13 +02:00
Michael Debertol
0edc9b01b9 factor: prevent writing incomplete lines
This makes it possible to execute multiple `factor` instances that write
to the same output in parallel, without having them interfere.
2021-08-10 00:14:51 +02:00
Sylvestre Ledru
26a882551b update the dep to uucore_procs 0.0.6 2021-07-11 21:04:11 +02:00
Sylvestre Ledru
1d8a66b7d3 Update to version 0.0.7 2021-07-11 18:04:56 +02:00
Michael Debertol
2ebca384c6 all utils: enable wrap_help
This makes clap wrap the help text according to the terminal width,
which improves readability for terminal widths < 120 chars,
because clap defaults to a width of 120 chars without this feature.
2021-06-27 16:17:10 +02:00
Michael Debertol
0531153fa6 uutils: move clap::App creation to separate functions 2021-06-25 21:23:45 +02:00
Sylvestre Ledru
d8c06dd6bb use clap::crate_version macro instead of the env variable 2021-06-02 19:00:19 +02:00
Roy Ivy III
1ca44fbbc3 docs/factor ~ fix markdownlint complaints 2021-05-31 08:23:58 -05:00
Roy Ivy III
1a37d502d1 refactor/factor ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:32 -05:00
Roy Ivy III
9c0c8eb59f change ~ remove 'main.rs' spell-checker exceptions 2021-05-31 08:11:31 -05:00
Gilad Naaman
17b0939dee Moved factor to use clap
Issue: https://github.com/uutils/coreutils/issues/2121
2021-05-29 15:11:27 +02:00
Jan Scheer
3aeccfd802 fix a lot of clippy warnings 2021-05-29 15:11:22 +02:00
nicoo
a0a103b15e factor::table::chunked: Add test (equivalent to the single-number version) 2021-05-20 17:01:33 +02:00
nicoo
998b3c11d3 factor: Make random Factors instance generatable for tests 2021-05-20 17:00:49 +02:00
nicoo
00322b986b factor: Move benchmarks out-of-crate 2021-05-17 19:43:38 +02:00
nicoo
1cd001f529 factor::benches::table: Match BenchmarkId w/ criterion's conventions
See https://bheisler.github.io/criterion.rs/book/user_guide/comparing_functions.html
2021-05-17 19:43:38 +02:00
nicoo
7c649bc74e factor::benches: Add check against ASLR 2021-05-17 19:43:38 +02:00
nicoo
ddfcd2eb14 factor::benchmarking: Add wishlist / planned work 2021-05-17 19:43:38 +02:00
nicoo
1d75f09743 factor::benchmarking(doc): Add guidance on writing µbenches 2021-05-17 19:43:38 +02:00
nicoo
e9f8194266 factor::benchmarking(doc): Add guidance on running µbenches 2021-05-17 19:43:38 +02:00
nicoo
ae15bf16a8 factor::benches::table: Report throughput (in numbers/s) 2021-05-17 19:43:38 +02:00
nicoo
12efaa6add factor: Add BENCHMARKING.md 2021-05-17 19:43:38 +02:00
nicoo
7c287542c7 factor::table: Fixup microbenchmark
Previous version would perform an amount of work proportional to `CHUNK_SIZE`,
so this wasn't a valid way to benchmark at multiple values of that constant.

The `TryInto` implementation for `&mut [T]` to `&mut [T; N]` relies on `const`
generics, and is available in (stable) Rust v1.51 and later.
2021-05-17 19:43:38 +02:00
nicoo
1fd5f9da25 factor::table::factor_chunk: Turn loop inside-out
This keeps the traversal of `P_INVS_U64` (a large table) to a single pass
in-order, rather than `CHUNK_SIZE` passes.
2021-05-17 19:43:38 +02:00
nicoo
cd047425aa factor::table: Add chunked implementation and microbenchmarks
The factor_chunk implementation is a strawman, but getting it in place allows us
to set up the microbenchmarking etc.
2021-05-17 19:43:38 +02:00
nicoo
c68c83c6dd factor::table: Take mutable refs
This will be easier to adapt to working with multiple numbers to process at once.
2021-05-17 19:43:38 +02:00
Jan Scheer
4ac75898c3 fix clippy warnings 2021-05-10 15:48:32 +02:00
Sylvestre Ledru
e723b8db43 factor: unneeded statement 2021-05-02 09:35:59 +02:00