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

R4R: CLI UX Updates #1 #1983

Merged
merged 5 commits into from
Aug 22, 2018
Merged

R4R: CLI UX Updates #1 #1983

merged 5 commits into from
Aug 22, 2018

Conversation

mslipper
Copy link
Contributor

@mslipper mslipper commented Aug 11, 2018

This PR closes #1970, #1971, #1967, and #1969.

@codecov
Copy link

codecov bot commented Aug 11, 2018

Codecov Report

Merging #1983 into develop will not change coverage.
The diff coverage is 0%.

@@           Coverage Diff            @@
##           develop    #1983   +/-   ##
========================================
  Coverage    63.83%   63.83%           
========================================
  Files          113      113           
  Lines         6684     6684           
========================================
  Hits          4267     4267           
  Misses        2133     2133           
  Partials       284      284

@rigelrozanski
Copy link
Contributor

Hey @mslipper ! Thanks for taking the time to make contributions :)
I've noticed you've opened a few PR's recently - as the team is growing quickly and requires fast delegation of reviewing tasks, it would be much appreciated for you to update the titles of your PRs to be more descriptive of the code changes. For instance in this PR what are the UX changes that are taking place? can we summarize those in a few words to include as the title?

thanks again! :)

@ValarDragon
Copy link
Contributor

Could you please update the changelog? PENDING.md

@ebuchman
Copy link
Member

Waiting for after v0.24

@mslipper
Copy link
Contributor Author

@rigelrozanski sure thing!

@mslipper
Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor

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"
Copy link
Contributor

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?

},
}

func init() {
showKeysCmd.Flags().Bool(client.FlagAddress, false, "output the address only (overrides --output)")
Copy link
Contributor

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.

Copy link
Contributor Author

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.


For example:

$ gaiacli advanced tendermint txs --tag test1,test2
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

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

++

"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"
)
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove space

Copy link
Contributor

@alexanderbez alexanderbez left a 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 👍


For example:

$ gaiacli advanced tendermint txs --tag test1,test2
Copy link
Contributor

Choose a reason for hiding this comment

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

++


const (
FlagAddress = "address"
FlagPublicKey = "public-key"
Copy link
Contributor

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
Copy link
Contributor

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)
}
Copy link
Contributor

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 👍

@alexanderbez alexanderbez changed the title CLI UX Updates #1 WIP: CLI UX Updates #1 Aug 20, 2018
@alexanderbez alexanderbez added C:CLI T: UX wip T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). labels Aug 20, 2018
@mslipper mslipper force-pushed the cli-updates branch 10 times, most recently from 0c410d7 to 7cb3f5b Compare August 21, 2018 19:15
@mslipper mslipper force-pushed the cli-updates branch 2 times, most recently from 77e505a to 31df0ac Compare August 21, 2018 19:24
Copy link
Contributor

@alexanderbez alexanderbez left a 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!

@jackzampolin jackzampolin changed the title WIP: CLI UX Updates #1 R4R: CLI UX Updates #1 Aug 21, 2018
"github.com/gorilla/mux"

"github.com/spf13/cobra"
"github.com/spf13/viper"
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

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.

@jaekwon
Copy link
Contributor

jaekwon commented Aug 21, 2018

Just a comment but otherwise LGTM

@jackzampolin
Copy link
Member

I think this is ready to go!

@@ -2,76 +2,57 @@

Copy link
Contributor

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

Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

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

utACK

@cwgoes cwgoes merged commit 29634bf into cosmos:develop Aug 22, 2018
chillyvee pushed a commit to chillyvee/cosmos-sdk that referenced this pull request Mar 1, 2024
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:CLI T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). T: UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add affordance to pull out comsosaccaddr from individual keys
10 participants