Commit graph

769 commits

Author SHA1 Message Date
Jim Miller
f47f859de0 Bump Test Version 4.9.3 2022-01-23 10:13:45 -06:00
Jim Miller
6194f3d9e7 Bump Test Version 4.9.2 2022-01-20 11:24:00 -06:00
Jim Miller
7b2d6a91fb Bump Test Version 4.9.1 2022-01-11 16:32:04 -06:00
Jim Miller
b2b56e6366 Bump Release Version 4.9.0 2022-01-11 15:58:22 -06:00
Jim Miller
9f77f3a60d Bump Test Version 4.8.8 2022-01-10 09:09:18 -06:00
Jim Miller
bc149a2deb Bump Test Version 4.8.7 2022-01-04 13:06:16 -06:00
Jim Miller
033c38fc91 Bump Test Version 4.8.6 2021-12-21 12:58:28 -06:00
hseg
a43949d123
Refactor main() in cli.py (#781)
* main: Replace return by explicit calls to exit()

In anticipation of breaking out these sections in their own functions

* Make doc-getting flags shortcut

This saves on pointless validation/setup work when only getting help
information. Moreover, these were the only actions that were in the
middle of the parse/validate/setup/run core logic of main(), moving them
out clears the way to cleanly breaking it up.

Removes -v alias for --version. If this is undesirable, a trick similar
to that for --sites-list can be used to shortcut it as well.

* Move up flag implication logic, var renaming

These are "virtual flags", should be set up asap after actual flags are
setup. Ideally, these would be set up in arg parsing, but this is
sometimes impossible/impractical.

Future improvement: use callbacks to say eg --updatealways sets
options.update, options.updatealways

* Move up validation

Fail fast if the arguments are invalid

* Internalize list_only into options

Helps keep related state together

* Pack up configs, printers for easier passing

* Break up main() into phases

* Remove unnecessary semicolon

* Unbundle configs, printers

This reverts commit 5dd44bbfc3.
Revertion reasons:
1) Initial commit was broken -- it reordered parameters in invocations
   to `get_config()`. This happened because python complained about
   invocations of the form `f(x,**d,z)` -- positional parameters may not
   appear after kwarg expansion. I mistakenly believed kwarg expansion
   would consume the slots of those parameters, and so this code would
   be equivalent to `f(x,z,**d)`. Instead, this passes `z` to the second
   positional parameter, which luckily enough had a key contained in `d`
   so it only caused a TypeError over the multiple values for that
   parameter.
2) To maintain the vision of the original commit would require multiple
   pessimizations *over* the previous state. Specifically:
   1) Using our running example of invocations of the form `f(x,**d,z)`,
      we'd need to turn `z` into a keyword argument. Since Python has no
      way of writing "`z` is a keyword argument whose value is taken
      from the current scope", that forces writing `f(x,**d,z=z)`.
      (Even if a proposal like <https://lwn.net/Articles/818129/> is
      accepted, we wouldn't be able to use it since we need to support
      Python 2)
   2) `dispatch()` uses `fail` internally. So we have one of two
      options:
      * Bundle `warn, fail` in `dispatch`'s arguments, and add a line
        `fail=printers['fail']` to the top of `dispatch`
      * Don't bundle `warn, fail` in `dispatch`'s arguments, and have
        `dispatch` bundle them instead
      Neither of these is palatable, especially over
      * Don't bundle `warn, fail` anywhere

* Restore -v alias for version

As 0847fc9 suggested might be desired
2021-12-21 12:21:02 -06:00
Jim Miller
61bc732810 Bump Test Version 4.8.5 2021-12-19 12:10:54 -06:00
gesh
c0d776f64c cli.py: move out parseArgs
Resolves: #779
2021-12-19 03:48:35 +02:00
Jim Miller
a2dd11326f Bump Test Version 4.8.4 2021-12-14 19:36:34 -06:00
Jim Miller
6fc9aa6dfc Bump Test Version 4.8.3 2021-12-11 19:32:16 -06:00
Jim Miller
80fb72928e Bump Test Version 4.8.2 2021-12-10 10:12:27 -06:00
Jim Miller
89e731031c Bump Test Version 4.8.1 2021-12-03 10:56:46 -06:00
Jim Miller
a2523f1a1e Bump Release Version 4.8.0 2021-12-02 09:33:07 -06:00
Jim Miller
4460ee00cf Bump Test Version 4.7.9 2021-11-28 12:32:17 -06:00
Jim Miller
744400b161 Bump Test Version 4.7.8 2021-11-20 15:24:58 -06:00
Jim Miller
adfaf141d3 Bump Test Version 4.7.7 2021-11-19 20:21:50 -06:00
Jim Miller
b142654dfc Bump Test Version 4.7.6 2021-11-19 10:38:35 -06:00
Jim Miller
cf5c0fd68c Bump Test Version 4.7.5 2021-11-17 12:54:50 -06:00
Jim Miller
2ddce1acd5 Bump Test Version 4.7.4 2021-11-14 11:57:29 -06:00
Jim Miller
df61e88714 Bump Test Version 4.7.3 2021-11-12 19:21:31 -06:00
Jim Miller
a829d01e7c Bump Test Version 4.7.2 2021-11-09 16:47:03 -06:00
Jim Miller
1459ad8611 Add --json-meta-file CLI option. #761 2021-11-09 16:46:56 -06:00
Jim Miller
2e78b153d5 Bump Test Version 4.7.1 2021-11-09 08:54:49 -06:00
Jim Miller
9080349615 Bump Release Version 4.7.0 2021-11-04 12:36:56 -05:00
Jim Miller
2085dda0a3 Bump Test Version 4.6.11 2021-11-03 15:00:56 -05:00
Jim Miller
d7940213ab Bump Test Version 4.6.10 2021-11-01 20:10:02 -05:00
Jim Miller
605fc0dbcf Bump Test Version 4.6.9 2021-10-27 13:35:04 -05:00
Jim Miller
913f8dc256 Bump Test Version 4.6.8 2021-10-25 13:07:59 -05:00
Jim Miller
7ec234a052 Bump Test Version 4.6.7 2021-10-24 09:44:55 -05:00
Jim Miller
120a82c82b Bump Test Version 4.6.6 2021-10-20 13:20:45 -05:00
Jim Miller
9e54b8d82b Bump Test Version 4.6.5 2021-10-16 15:30:53 -05:00
Jim Miller
f4de32550c Bump Test Version 4.6.4 2021-10-10 20:35:14 -05:00
Jim Miller
9dc4de0f07 Bump Test Version 4.6.3 2021-10-10 19:41:16 -05:00
Jim Miller
5e02fdc2ae Bump Test Version 4.6.2 2021-10-07 11:18:57 -05:00
Jim Miller
0a114cd313 Bump Test Version 4.6.1 2021-10-02 17:13:32 -05:00
Jim Miller
76565e959a Bump Release Version 4.6.0 2021-09-30 11:53:56 -05:00
Jim Miller
70e67f7960 Bump Test Version 4.5.15 2021-09-28 12:57:31 -05:00
Jim Miller
0eb3abd44a Bump Test Version 4.5.14 2021-09-27 11:25:46 -05:00
Jim Miller
c92acf2b3b Bump Test Version 4.5.13 2021-09-24 11:23:06 -05:00
Jim Miller
7ac8d1f1aa Bump Test Version 4.5.12 2021-09-24 10:49:35 -05:00
Jim Miller
4dcc9ec510 Bump Test Version 4.5.11 2021-09-23 10:16:01 -05:00
Jim Miller
16f19e6b4a Bump Test Version 4.5.10 2021-09-16 19:09:23 -05:00
Jim Miller
982fd32a06 Bump Test Version 4.5.9 2021-09-16 12:45:30 -05:00
Jim Miller
443a543bb5 Bump Test Version 4.5.8 2021-09-16 12:24:28 -05:00
Jim Miller
52e740cf58 Bump Test Version 4.5.7 2021-09-16 12:24:28 -05:00
Jim Miller
73305fe0df Bump Test Version 4.5.6 2021-09-16 12:24:28 -05:00
Jim Miller
464a7a3ee3 Bump Test Version 4.5.5 2021-09-08 16:40:01 -05:00
Jim Miller
1082dc5417 Bump Test Version 4.5.4 2021-09-07 18:22:37 -05:00