-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
R4R: Reorganize CLI command structure. #2728
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2728 +/- ##
========================================
Coverage 56.63% 56.63%
========================================
Files 156 156
Lines 9783 9783
========================================
Hits 5541 5541
Misses 3864 3864
Partials 378 378 |
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 reorg!
var chainID string | ||
chainID, err = types.DefaultChainID() | ||
// var chainID string | ||
chainID, err := types.DefaultChainID() |
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.
++
@@ -66,8 +68,7 @@ func runConfigCmd(cmd *cobra.Command, args []string) error { | |||
Home: gaiaCLIHome, | |||
ChainID: chainID, | |||
TrustNode: trustNode, | |||
Encoding: encoding, | |||
Output: output, | |||
Output: "text", |
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.
let's please create and use a newCliConfig(...)
function for here (avoid missing structs in the future)
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.
This whole functionality is currently broken. I'll open an issue for that and fix it in another PR if thats OK.
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.
Agreed with @rigelrozanski's remark on newCliConfig
. Other than that, the rest looks good to me. Thanks @jackzampolin
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.
Minor nit and agree with previous comment, but otherwise LGTM.
client/config.go
Outdated
output := "text" | ||
var chainID string | ||
chainID, err = types.DefaultChainID() | ||
// var chainID string |
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.
Let's delete this comment?
cmd/gaia/cmd/gaiacli/query.go
Outdated
// Group staking queries under a subcommand | ||
stakeQueryCmd := &cobra.Command{ | ||
Use: "stake", | ||
Short: "Querying commands for staking module", |
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.
Short: "Querying commands for staking module", | |
Short: "Querying commands for the staking module", |
cmd/gaia/cmd/gaiacli/query.go
Outdated
// Group gov queries under a subcommand | ||
govQueryCmd := &cobra.Command{ | ||
Use: "gov", | ||
Short: "Querying commands for gov module", |
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.
Short: "Querying commands for gov module", | |
Short: "Querying commands for the governance module", |
cmd/gaia/cmd/gaiacli/query.go
Outdated
// Group slashing queries under a subcommand | ||
slashingQueryCmd := &cobra.Command{ | ||
Use: "slashing", | ||
Short: "Querying commands for slashing module", |
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.
Short: "Querying commands for slashing module", | |
Short: "Querying commands for the slashing module", |
cmd/gaia/cmd/gaiacli/tx.go
Outdated
|
||
stakeTxCmd := &cobra.Command{ | ||
Use: "stake", | ||
Short: "Stake Transactions subcommands", |
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.
Short: "Stake Transactions subcommands", | |
Short: "Staking transaction subcommands", |
cmd/gaia/cmd/gaiacli/tx.go
Outdated
|
||
distTxCmd := &cobra.Command{ | ||
Use: "dist", | ||
Short: "Distribution Transactions subcommands", |
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.
Short: "Distribution Transactions subcommands", | |
Short: "Distribution transaction subcommands", |
cmd/gaia/cmd/gaiacli/tx.go
Outdated
|
||
govTxCmd := &cobra.Command{ | ||
Use: "gov", | ||
Short: "Governance Transactions subcommands", |
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.
Short: "Governance Transactions subcommands", | |
Short: "Governance transaction subcommands", |
cmd/gaia/cmd/gaiacli/tx.go
Outdated
|
||
slashingTxCmd := &cobra.Command{ | ||
Use: "slashing", | ||
Short: "Slashing Transactions subcommands", |
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.
Short: "Slashing Transactions subcommands", | |
Short: "Slashing transaction subcommands", |
awesome, much cleaner :) I've opened #2732 to track the docs update from this PR |
Co-Authored-By: jackzampolin <[email protected]>
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.
utACK 🍍
Waiting on docs per @jackzampolin |
Updated new docs to reflect changes here. |
Tests keep failing |
@jackzampolin do you need help with this one? |
@alexanderbez Thanks for the offer, but I think I've got this fixed! |
Fixes #2575
Only one
cmd.AddCommand
is called for each so command registration is more declarative. There are a number of docs fixes that will be entailed here, but we are currently refactoring all of that documentation.cc @gamarin2 @zramsay @ValarDragon @alessio