Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organise hash and ping commands #1048

Merged
merged 4 commits into from
Feb 5, 2025
Merged

Conversation

palas
Copy link
Contributor

@palas palas commented Feb 3, 2025

Changelog

- description: |
    Re-organised `hash` and `ping` commands in help text
  type:
  - documentation

Context

There are a lot of commands in the root level of the cardano-cli, this small tweak aims to improve the readability of the main help message, and make things easier to find.

How to trust this PR

I would check the changes to the help golden files, and ensure the code was re-organised correctly and sensibly.

This is the new output of cardano-cli --help:

$ cardano-cli --help
cardano-cli - General purpose command-line utility to interact with
cardano-node. Provides specific commands to manage keys, addresses, build &
submit transactions, certificates, etc.

Usage: cardano-cli 
                     ( address
                     | key
                     | node
                     | hash
                     | query
                     | legacy
                     | byron
                     | shelley
                     | allegra
                     | mary
                     | alonzo
                     | babbage
                     | conway
                     | latest
                     | debug commands
                     | version
                     | compatible
                     )

Available options:
  --version                Show the cardano-cli version
  -h,--help                Show this help text

Available commands:
  address                  Payment address commands.
  key                      Key utility commands.
  node                     Node operation commands.
  hash                     Compute the hash to pass to the various --*-hash
                           arguments of commands.
  query                    Node query commands. Will query the local node whose
                           Unix domain socket is obtained from the
                           CARDANO_NODE_SOCKET_PATH environment variable.
  legacy                   Legacy commands

Byron specific commands
  byron                    Byron specific commands

Available commands:
  shelley                  Shelley era commands - DEPRECATED - will be removed
                           in the future
  allegra                  Allegra era commands - DEPRECATED - will be removed
                           in the future
  mary                     Mary era commands - DEPRECATED - will be removed in
                           the future
  alonzo                   Alonzo era commands - DEPRECATED - will be removed in
                           the future
  babbage                  Babbage era commands - DEPRECATED - will be removed
                           in the future
  conway                   Conway era commands
  latest                   Latest era commands (Conway)

debug commands
  debug                    Debug commands

Miscellaneous commands
  help                     Show all help
  version                  Show the cardano-cli version
  ping                     Ping a cardano node either using node-to-node or node-to-client protocol. It negotiates a handshake and keeps sending keep alive messages.

Available commands:
  compatible               Limited backward compatible commands for testing
                           only.

$ 

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@palas palas added the documentation Improvements or additions to documentation label Feb 3, 2025
@palas palas self-assigned this Feb 3, 2025
@palas palas linked an issue Feb 3, 2025 that may be closed by this pull request
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Available options:
  --version                Show the cardano-cli version
  -h,--help                Show this help text

Available commands:
  address                  Payment address commands.
  key                      Key utility commands.
  node                     Node operation commands.
  query                    Node query commands. Will query the local node whose
                           Unix domain socket is obtained from the
                           CARDANO_NODE_SOCKET_PATH environment variable.
  legacy                   Legacy commands

Byron specific commands
  byron                    Byron specific commands

Available commands:
  shelley                  Shelley era commands - DEPRECATED - will be removed
                           in the future
  allegra                  Allegra era commands - DEPRECATED - will be removed
                           in the future
  mary                     Mary era commands - DEPRECATED - will be removed in
                           the future
  alonzo                   Alonzo era commands - DEPRECATED - will be removed in
                           the future
  babbage                  Babbage era commands - DEPRECATED - will be removed
                           in the future
  conway                   Conway era commands
  latest                   Latest era commands (Conway)
  hash                     Compute the hash to pass to the various --*-hash
                           arguments of commands.
  ping                     Ping a cardano node either using node-to-node or node-to-client protocol. It negotiates a handshake and keeps sending keep alive messages.

debug commands
  debug                    Debug commands

Miscellaneous commands
  help                     Show all help
  version                  Show the cardano-cli version

Available commands:
  compatible               Limited backward compatible commands for testing
                           only.

The point was to move hash and ping commands away from the era based commands.

I didn't see a diff for that in our golden test files. So if we don't have a test for this:

  1. We need to add
  2. We need to confirm the commands have been moved from the relevant `Available Commands" section.

@palas palas force-pushed the organise-hash-and-ping-commands branch from de0f11f to 4794bbf Compare February 4, 2025 18:19
@palas palas enabled auto-merge February 5, 2025 14:42
@palas palas added this pull request to the merge queue Feb 5, 2025
Merged via the queue into master with commit 1bc8d05 Feb 5, 2025
26 checks passed
@palas palas deleted the organise-hash-and-ping-commands branch February 5, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate hash and ping commands from era based commands in listing
2 participants