Skip to content

Do not truncate default command help - #671

Open
yorickdowne wants to merge 1 commit into
ethstaker:mainfrom
yorickdowne:fix/show-command-help
Open

yorickdowne wants to merge 1 commit into
ethstaker:mainfrom
yorickdowne:fix/show-command-help

Conversation

@yorickdowne

Copy link
Copy Markdown

What I did

./deposit would cut off the help for commands:

 Commands:
  new-mnemonic                    Generate a new mnemonic and...
  generate-mnemonic               Generate a new random mnemonic.
  existing-mnemonic               Generate (or recover) keys...
  generate-bls-to-execution-change
                                  Generating the...
  generate-bls-to-execution-change-keystore
                                  Generating the...
  exit-transaction-keystore       Generate an exit transaction...
  exit-transaction-mnemonic       Generate an exit transaction...
  partial-deposit                 Generate a partial deposit...
  test-keystore                   Verify your keystore file...
  builder                         Generate builder keys and a...

Introduce a helper that gets the first line, code that has click display it, and unit tests for it. Result:

Commands:
  new-mnemonic                    Generate a new mnemonic and keys
  generate-mnemonic               Generate a new random mnemonic.
  existing-mnemonic               Generate (or recover) keys from an existing
                                  mnemonic
  generate-bls-to-execution-change
                                  Generating the SignedBLSToExecutionChange
                                  data to enable withdrawals on Ethereum
                                  Beacon Chain.
  generate-bls-to-execution-change-keystore
                                  Generating the SignedBLSToExecutionChange
                                  data to enable withdrawals on Ethereum
                                  Beacon Chain.
  exit-transaction-keystore       Generate an exit transaction that can be
                                  used to exit validators on Ethereum Beacon
                                  Chain.
  exit-transaction-mnemonic       Generate an exit transaction that can be
                                  used to exit validators on Ethereum Beacon
                                  Chain.
  partial-deposit                 Generate a partial deposit with any amount
                                  at least 1 ETH which will be signed by the
                                  provided validator keystore.
  test-keystore                   Verify your keystore file with a provided
                                  password
  builder                         Generate builder keys and a builder deposit,
                                  per EIP-8282.

Code by Claude Opus 5

@yorickdowne yorickdowne added the run-tests Request tests to run on the CI label Sep 17, 2026
@github-actions

Copy link
Copy Markdown

Test Coverage: Download HTML Report

Name                                                                 Stmts   Miss  Cover
----------------------------------------------------------------------------------------
ethstaker_deposit/__init__.py                                            3      0   100%
ethstaker_deposit/bls_to_execution_change_keystore.py                   32      2    94%
ethstaker_deposit/cli/__init__.py                                        0      0   100%
ethstaker_deposit/cli/builder.py                                        61      1    98%
ethstaker_deposit/cli/existing_mnemonic.py                              46      0   100%
ethstaker_deposit/cli/exit_transaction_keystore.py                      45      3    93%
ethstaker_deposit/cli/exit_transaction_mnemonic.py                      69      9    87%
ethstaker_deposit/cli/generate_bls_to_execution_change.py               64     11    83%
ethstaker_deposit/cli/generate_bls_to_execution_change_keystore.py      46      3    93%
ethstaker_deposit/cli/generate_builder_keys.py                          45      2    96%
ethstaker_deposit/cli/generate_keys.py                                  64      3    95%
ethstaker_deposit/cli/generate_mnemonic.py                              48     21    56%
ethstaker_deposit/cli/new_mnemonic.py                                   33      0   100%
ethstaker_deposit/cli/partial_deposit.py                                71      5    93%
ethstaker_deposit/cli/test_keystore.py                                  23      1    96%
ethstaker_deposit/credentials.py                                       263     15    94%
ethstaker_deposit/deposit.py                                            68      5    93%
ethstaker_deposit/exceptions.py                                          6      0   100%
ethstaker_deposit/key_handling/__init__.py                               0      0   100%
ethstaker_deposit/key_handling/key_derivation/__init__.py                0      0   100%
ethstaker_deposit/key_handling/key_derivation/mnemonic.py               95      5    95%
ethstaker_deposit/key_handling/key_derivation/path.py                   17      1    94%
ethstaker_deposit/key_handling/key_derivation/tree.py                   36      0   100%
ethstaker_deposit/key_handling/keystore.py                             114      2    98%
ethstaker_deposit/schema/keystore.py                                     1      0   100%
ethstaker_deposit/settings.py                                           32      0   100%
ethstaker_deposit/utils/__init__.py                                      0      0   100%
ethstaker_deposit/utils/ascii_art.py                                     2      0   100%
ethstaker_deposit/utils/click.py                                       118      2    98%
ethstaker_deposit/utils/config.py                                        3      0   100%
ethstaker_deposit/utils/constants.py                                    32      0   100%
ethstaker_deposit/utils/crypto.py                                       29      1    97%
ethstaker_deposit/utils/exit_transaction.py                             26      0   100%
ethstaker_deposit/utils/export_data.py                                  12      0   100%
ethstaker_deposit/utils/file_handling.py                                11      0   100%
ethstaker_deposit/utils/intl.py                                         79      4    95%
ethstaker_deposit/utils/ssz.py                                          66      3    95%
ethstaker_deposit/utils/symlink.py                                      18      0   100%
ethstaker_deposit/utils/terminal.py                                     29     21    28%
ethstaker_deposit/utils/validation.py                                  385     40    90%
scripts/check_python_version.py                                         44     12    73%
scripts/check_translations.py                                          224     40    82%
----------------------------------------------------------------------------------------
TOTAL                                                                 2360    212    91%

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

Labels

run-tests Request tests to run on the CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant