-
Notifications
You must be signed in to change notification settings - Fork 35
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
refactor: git-like usage commands #338
Conversation
Looks good so far! I am personally not sure if I prefer the flatter structure versus the more subcommand-based one. It seems a bit more usable/cleaner at first sight, but also it showcases the types of entities that are involved a little less. But in any case, here are some notes of what I reviewed so far if we decide to go this route:
|
Agreed - but I think we can showcase the entities via the client library interface and CLI could still be a bit more "customized" to make it more user friendly.
As I mentioned in #333 (comment), I'd probably split this into two commands |
34f554d
to
d7fbe1f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Left a few comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHANGELOG.md
Outdated
@@ -1,5 +1,6 @@ | |||
# Changelog | |||
|
|||
* Flatten the cli subcommand tree. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Flatten the cli subcommand tree. | |
* Flatten the CLI subcommand tree. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
send has two options that use -f
as the shortened version (--force
, --faucet
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* feat: Integrate next changes * fix: Back to next * Fix conflicts * Use node next * fix: Tetss * refactor: reuse function to create mocked client * fix: update swap note script root * fix: Generalize Authenticator * Merge fixes and refactors * Lints * docs: update docs from changes to CLI (#336) * feat: Utilize expected notes from `ExecutedTransaction` (#329) * feat: Use expected notes from TransactionResult * fix: Re-add output note check * Remove unused code * Lints * Fix tests * fix: Tetss * Stash * fix: Address reviews * fix: Tests * fix: Lints * fix: Lints * Try fix test * fix: Merge conflicts * Fix tests * docs: Address reviews * Lints * fix: New script root * Use 0.3 * fix: Correct genesis toml file * fix: test fix con cargo make start-node * fix: temp fix to rename config paths * fix: Correct miden-node toml * fix: Ship our own node config files * Migrate to node 0.3 * feat: Use incoming MMR proof to add block authentications for notes created in past blocks (#337) * test: Integration tests run with main node * fix: Remove std::cmp::max * refactor: git-like usage commands (#338) * Move new account creation to command * Flatten account command * Refactor `default` option * Separate new account commands * Refactor `notes` command * Refactor import comand to infer type * Remove intermediate sucommand for export * Flatten tags command * Separate tx new commands * Fix documentation * Join p2id and p2idr to send command * Remove trait * Change comment suggestions * Clarify new account help comments * Ask for storage path if not specified * Fixed problem with listing notes with no filter * Added a message for default account updates * Change suggestions * Remove prompt for store path * Added all NotesFilter * Fix merge * feat: enable swap notes (#324) * feature: add swap tx request and store swap payback note * feature: insert input note record from payback note details * feature: show message to user on how to track payback notes * fix: integration test compilation * make swap tx send the offered asset * fix: temporary fix for partial output notes * test: add skeleton for integration test * fix: lint issues * test: add test for onchain swap flow * test: add test for offchain swap flow * test: fix note minting for swap tests * test: fix compilation errors * fix: use all committed note ids to check transactions to commit * fix: fix tests checks * address review comments * docs: update CHANGELOG * docs: update CLI reference * address remaining comment * fix: clippy issues * fix: remove wrong check * refactor: store partial notes in relevant notes of transaction result * rephrase doc comment Co-authored-by: igamigo <[email protected]> * address review comments * fix: fix offchain swap test --------- Co-authored-by: igamigo <[email protected]> * docs: fix doc comments for swap clap command * feat: update cli-reference with new command structure (#342) * Update cli-reference with new command structure * Fix merge * Fix merge * Update cli-reference.md --------- Co-authored-by: igamigo <[email protected]> * Update README.md * CLI config.md --------- Co-authored-by: Martin Fraga <[email protected]> Co-authored-by: Martin Fraga <[email protected]> Co-authored-by: Tomas Rodriguez Dala <[email protected]>
* feat: Integrate next changes * fix: Back to next * Fix conflicts * Use node next * fix: Tetss * refactor: reuse function to create mocked client * fix: update swap note script root * fix: Generalize Authenticator * Merge fixes and refactors * Lints * docs: update docs from changes to CLI (#336) * feat: Utilize expected notes from `ExecutedTransaction` (#329) * feat: Use expected notes from TransactionResult * fix: Re-add output note check * Remove unused code * Lints * Fix tests * fix: Tetss * Stash * fix: Address reviews * fix: Tests * fix: Lints * fix: Lints * Try fix test * fix: Merge conflicts * Fix tests * docs: Address reviews * Lints * fix: New script root * Use 0.3 * fix: Correct genesis toml file * fix: test fix con cargo make start-node * fix: temp fix to rename config paths * fix: Correct miden-node toml * fix: Ship our own node config files * Migrate to node 0.3 * feat: Use incoming MMR proof to add block authentications for notes created in past blocks (#337) * test: Integration tests run with main node * fix: Remove std::cmp::max * refactor: git-like usage commands (#338) * Move new account creation to command * Flatten account command * Refactor `default` option * Separate new account commands * Refactor `notes` command * Refactor import comand to infer type * Remove intermediate sucommand for export * Flatten tags command * Separate tx new commands * Fix documentation * Join p2id and p2idr to send command * Remove trait * Change comment suggestions * Clarify new account help comments * Ask for storage path if not specified * Fixed problem with listing notes with no filter * Added a message for default account updates * Change suggestions * Remove prompt for store path * Added all NotesFilter * Fix merge * feat: enable swap notes (#324) * feature: add swap tx request and store swap payback note * feature: insert input note record from payback note details * feature: show message to user on how to track payback notes * fix: integration test compilation * make swap tx send the offered asset * fix: temporary fix for partial output notes * test: add skeleton for integration test * fix: lint issues * test: add test for onchain swap flow * test: add test for offchain swap flow * test: fix note minting for swap tests * test: fix compilation errors * fix: use all committed note ids to check transactions to commit * fix: fix tests checks * address review comments * docs: update CHANGELOG * docs: update CLI reference * address remaining comment * fix: clippy issues * fix: remove wrong check * refactor: store partial notes in relevant notes of transaction result * rephrase doc comment Co-authored-by: igamigo <[email protected]> * address review comments * fix: fix offchain swap test --------- Co-authored-by: igamigo <[email protected]> * docs: fix doc comments for swap clap command * feat: update cli-reference with new command structure (#342) * Update cli-reference with new command structure * Fix merge * Fix merge * Update cli-reference.md --------- Co-authored-by: igamigo <[email protected]> * Update README.md * CLI config.md --------- Co-authored-by: Martin Fraga <[email protected]> Co-authored-by: Martin Fraga <[email protected]> Co-authored-by: Tomas Rodriguez Dala <[email protected]>
closes #333
The previous command structure was tree-like with sub-commands hidden inside other sub-commands. This PR looks to change the structure to be more git-like with a lot of top level commands with flags that modify their functionality.
Some screenshots provided by @mFragaBA: