Skip to content

Hide server-management commands from top-level help; group docs under server#819

Open
edavidaja wants to merge 1 commit into
mainfrom
hide-top-level-server-aliases
Open

Hide server-management commands from top-level help; group docs under server#819
edavidaja wants to merge 1 commit into
mainfrom
hide-top-level-server-aliases

Conversation

@edavidaja

@edavidaja edavidaja commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #818 (base is enable-setting-default-server, not main). Review/merge #818 first, or retarget to main once #818 lands.

What

Makes rsconnect server the advertised home for the grouped commands:

  • rsconnect --help no longer lists add/list/remove/details/set-default/bootstrap at the top level — only server (plus the non-server commands). They still appear under rsconnect server --help.
  • The top-level forms (rsconnect add, rsconnect bootstrap, …) still work unchanged — nothing deprecated, no warnings; shell completion still offers them.
  • Docs pages for the grouped commands are nested under a server nav node and render rsconnect server <cmd> usage (:prog_name:).

login/logout stay top-level and visible (see #818), so they are not hidden here.

How

A small ServerAliasHidingGroup(click.Group) overrides only format_commands (the help renderer) to drop the names registered under server_group. get_command/list_commands are untouched, so invocation and completion are unaffected. The hidden set is derived from server_group.commands, so it tracks the group automatically.

Tests

TestServerGroup gains: grouped commands absent from top-level help (parsing only the command-row indent) and a hidden top-level alias (rsconnect remove) still executing. Full tests/test_main.py green; ruff clean; just docs builds and the server pages render grouped usage.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://posit-dev.github.io/rsconnect-python/pr-preview/pr-819/

Built to branch gh-pages at 2026-07-14 14:21 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@edavidaja edavidaja force-pushed the hide-top-level-server-aliases branch from bb49163 to 781e39e Compare July 13, 2026 19:32
@edavidaja edavidaja force-pushed the enable-setting-default-server branch from 817b528 to b169f69 Compare July 14, 2026 13:43
@edavidaja edavidaja force-pushed the hide-top-level-server-aliases branch from 781e39e to 7d459cc Compare July 14, 2026 13:46
Base automatically changed from enable-setting-default-server to main July 14, 2026 14:03
@edavidaja edavidaja force-pushed the hide-top-level-server-aliases branch from 7d459cc to fcca923 Compare July 14, 2026 14:20
@edavidaja edavidaja requested a review from a team July 14, 2026 14:21
@github-actions

Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
7643 6358 83% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
rsconnect/main.py 81% 🟢
TOTAL 81% 🟢

updated for commit: fcca923 by action🐍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant