Hide server-management commands from top-level help; group docs under server#819
Open
edavidaja wants to merge 1 commit into
Open
Hide server-management commands from top-level help; group docs under server#819edavidaja wants to merge 1 commit into
server#819edavidaja wants to merge 1 commit into
Conversation
|
bb49163 to
781e39e
Compare
817b528 to
b169f69
Compare
781e39e to
7d459cc
Compare
7d459cc to
fcca923
Compare
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #818 (base is
enable-setting-default-server, notmain). Review/merge #818 first, or retarget tomainonce #818 lands.What
Makes
rsconnect serverthe advertised home for the grouped commands:rsconnect --helpno longer listsadd/list/remove/details/set-default/bootstrapat the top level — onlyserver(plus the non-server commands). They still appear underrsconnect server --help.rsconnect add,rsconnect bootstrap, …) still work unchanged — nothing deprecated, no warnings; shell completion still offers them.servernav node and renderrsconnect server <cmd>usage (:prog_name:).login/logoutstay top-level and visible (see #818), so they are not hidden here.How
A small
ServerAliasHidingGroup(click.Group)overrides onlyformat_commands(the help renderer) to drop the names registered underserver_group.get_command/list_commandsare untouched, so invocation and completion are unaffected. The hidden set is derived fromserver_group.commands, so it tracks the group automatically.Tests
TestServerGroupgains: grouped commands absent from top-level help (parsing only the command-row indent) and a hidden top-level alias (rsconnect remove) still executing. Fulltests/test_main.pygreen; ruff clean;just docsbuilds and theserverpages render grouped usage.