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

sim-cli: Improves CLI docs so help has a more friendly report #145

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

sr-gi
Copy link
Member

@sr-gi sr-gi commented Oct 18, 2023

sim-cli help is pretty unfriendly atm, add docs so the args/options are covered.

This makes some optional params to the simulator mandatory and moves the defaulting behavior to the CLI so clap can take care of it. The main rationale for it is so we can easily report the defaults.

Also, restricts print_batch_size to be > 0, as discussed #146 (comment)

@sr-gi sr-gi force-pushed the 20231018-improve-help branch 3 times, most recently from 7acc6b2 to e6771ac Compare October 19, 2023 18:15
Copy link
Collaborator

@okjodom okjodom left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Contributor

@carlaKC carlaKC left a comment

Choose a reason for hiding this comment

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

✨ lgtm once the clippy gods are appeased

sim-cli/src/main.rs Show resolved Hide resolved
print_batch_size: print_batch_size.unwrap_or(DEFAULT_PRINT_BATCH_SIZE),
expected_payment_msat: expected_payment_amount.unwrap_or(EXPECTED_PAYMENT_AMOUNT),
activity_multiplier: activity_multiplier.unwrap_or(ACTIVITY_MULTIPLIER),
print_batch_size: print_batch_size,
Copy link
Contributor

Choose a reason for hiding this comment

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

clippy sad

@sr-gi sr-gi force-pushed the 20231018-improve-help branch from e6771ac to 14b806e Compare October 20, 2023 15:11
@sr-gi
Copy link
Member Author

sr-gi commented Oct 20, 2023

This should be good now

… are covered.

This makes some optional params to the simulator mandatory and moves the
defaulting behavior to the CLI so clap can take care of it. The main
rationale for it is so we can easily report the defaults.

Also, restricts `print_batch_size` to be `> 0`.
@sr-gi sr-gi force-pushed the 20231018-improve-help branch from 14b806e to de1b2cb Compare October 20, 2023 17:37
@sr-gi sr-gi merged commit b09d3c0 into bitcoin-dev-project:main Oct 20, 2023
okjodom pushed a commit to okjodom/sim-ln that referenced this pull request Nov 8, 2023
… are covered. (bitcoin-dev-project#145)

This makes some optional params to the simulator mandatory and moves the
defaulting behavior to the CLI so clap can take care of it. The main
rationale for it is so we can easily report the defaults.

Also, restricts `print_batch_size` to be `> 0`.
okjodom pushed a commit that referenced this pull request Nov 8, 2023
… are covered. (#145)

This makes some optional params to the simulator mandatory and moves the
defaulting behavior to the CLI so clap can take care of it. The main
rationale for it is so we can easily report the defaults.

Also, restricts `print_batch_size` to be `> 0`.
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.

3 participants