-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: CLI UX Updates #1 #1983
R4R: CLI UX Updates #1 #1983
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1983 +/- ##
========================================
Coverage 63.83% 63.83%
========================================
Files 113 113
Lines 6684 6684
========================================
Hits 4267 4267
Misses 2133 2133
Partials 284 284 |
Hey @mslipper ! Thanks for taking the time to make contributions :) thanks again! :) |
Could you please update the changelog? |
Waiting for after v0.24 |
@rigelrozanski sure thing! |
Pending log updated. |
PENDING.md
Outdated
@@ -38,6 +38,8 @@ BREAKING CHANGES | |||
* [types] sdk.NewCoin now takes sdk.Int, sdk.NewInt64Coin takes int64 | |||
* [cli] #1551: Officially removed `--name` from CLI commands | |||
* [cli] Genesis/key creation (`init`) now supports user-provided key passwords | |||
* [cli] --print-response now defaults to true in commands that create and send a transaction | |||
* [cli] you can now pass --public-key or --address to `gaiacli keys show` to return a plaintext representation of the key's address or public key for use with other commands |
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.
I think pubkey is generally accepted abbreviation, so maybe rename to --pubkey
?
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.
++
@mslipper may you also reference the PR here?
client/flags.go
Outdated
@@ -19,6 +19,8 @@ const ( | |||
FlagAsync = "async" | |||
FlagJson = "json" | |||
FlagPrintResponse = "print-response" | |||
FlagAddress = "address" |
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.
Would it make sense to move these two const into keys/show.go
file?
client/keys/show.go
Outdated
}, | ||
} | ||
|
||
func init() { | ||
showKeysCmd.Flags().Bool(client.FlagAddress, false, "output the address only (overrides --output)") |
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.
Why not have a single --text-format
flag, which is set to NAME:\tTYPE:\tADDRESS:\t\t\t\t\t\tPUBKEY
by default? Then everybody can choose whatever text format they want.
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.
The objective of this output format is to allow piping to other commands, so we'd need to add additional options to not show that header.
client/tx/search.go
Outdated
|
||
For example: | ||
|
||
$ gaiacli advanced tendermint txs --tag test1,test2 |
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.
note advanced
will soon be removed #2014
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.
++
client/keys/utils.go
Outdated
"github.com/tendermint/tendermint/libs/cli" | ||
dbm "github.com/tendermint/tendermint/libs/db" | ||
|
||
"github.com/cosmos/cosmos-sdk/client" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
) |
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.
remove space
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.
Thanks for the contrib @mslipper ! I left a bit of feedback + also need to address broken CI 👍
client/tx/search.go
Outdated
|
||
For example: | ||
|
||
$ gaiacli advanced tendermint txs --tag test1,test2 |
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.
++
client/keys/show.go
Outdated
|
||
const ( | ||
FlagAddress = "address" | ||
FlagPublicKey = "public-key" |
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.
pubkey
*
PENDING.md
Outdated
@@ -41,6 +41,8 @@ BREAKING CHANGES | |||
* [cli] Genesis/key creation (`init`) now supports user-provided key passwords | |||
* [cli] unsafe_reset_all, show_validator, and show_node_id have been renamed to unsafe-reset-all, show-validator, and show-node-id | |||
* [cli] \#1901 Flag --address-validator renamed to --validator in stake and slashing commands | |||
* [cli] --print-response now defaults to true in commands that create and send a transaction |
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.
Missing PR reference ;-)
panic(err) | ||
} | ||
fmt.Println(ko.PubKey) | ||
} |
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 add a newline for consistency 👍
0c410d7
to
7cb3f5b
Compare
77e505a
to
31df0ac
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.
tested ACK -- not too familiar with the CircleCI config/setup, so it might warrant another pair of eyes, but everything else looks fine. Thanks!
client/keys/show.go
Outdated
"github.com/gorilla/mux" | ||
|
||
"github.com/spf13/cobra" | ||
"github.com/spf13/viper" |
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.
gofmt? btw, our (a bit outdated) Go guidelines: https://github.com/tendermint/coding/blob/master/go/coding_standard.md
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.
Our editors are set up so that we always fmt before saving.
Just a comment but otherwise LGTM |
…ptext updates Closes cosmos#1970 Closes cosmos#1971 Closes cosmos#1967 Closes cosmos#1969
I think this is ready to go! |
@@ -2,76 +2,57 @@ | |||
|
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.
Upgrade your version of dep
, then this shouldn't happen
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
* Update dependencies and compile * Add ICS * Add gov prop * Fix lint * Fix commenting * Fix commenting * Add GetStakingKeeper for ICS e2e test * Gaia implements ibc TestingApp * Update correct return type for GetStakingKeeper * Fix ibc import * Fix linting * Comment back LoadStreamingServices * Change IBC back to v3.4 * Fix ics post merge * Replace ibc with informal/ibc for e2e/ibctesting compatibility * Update ibc to 3.4.0 * Fix linting * Update gaia with new ics keeper interface * Add provider module to simulationModules * Bump ics * Fix sdk import * Update sdk to tagged release * Fix simapp dependence (cosmos#1983) * Fix simapp dependence * Fix coverage and linting * Update sim ignore * Update codecov rules * Update ics dependency * Update ICS dependency * Update code cov * Update ICS to tagged version * Update codecov * Add imported ICS test * Make requested test comment changes * Remove commented code Co-authored-by: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com>
This PR closes #1970, #1971, #1967, and #1969.