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

Add auto complete. #1762

Merged
merged 6 commits into from
Nov 28, 2023
Merged

Add auto complete. #1762

merged 6 commits into from
Nov 28, 2023

Conversation

Taztingo
Copy link
Contributor

@Taztingo Taztingo commented Nov 22, 2023

Description

Adds Osmosis' autocomplete generation command to the Provenance binary.

closes: #1687


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@Taztingo Taztingo self-assigned this Nov 22, 2023
Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Merging #1762 (f3f5f24) into main (31b8a87) will increase coverage by 0.01%.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1762      +/-   ##
==========================================
+ Coverage   74.00%   74.01%   +0.01%     
==========================================
  Files         295      295              
  Lines       44043    44072      +29     
==========================================
+ Hits        32593    32622      +29     
  Misses      10087    10087              
  Partials     1363     1363              
Files Coverage Δ
cmd/provenanced/cmd/root.go 71.88% <100.00%> (+2.87%) ⬆️

@Taztingo Taztingo marked this pull request as ready for review November 27, 2023 20:03
@Taztingo Taztingo requested a review from a team as a code owner November 27, 2023 20:17
iramiller
iramiller previously approved these changes Nov 27, 2023
@Taztingo Taztingo enabled auto-merge (squash) November 27, 2023 21:52
@Taztingo Taztingo merged commit 5553cbd into main Nov 28, 2023
40 checks passed
@Taztingo Taztingo deleted the taztingo/1687-auto-completion branch November 28, 2023 00:16
SpicyLemon pushed a commit that referenced this pull request Jan 10, 2024
* Add auto complete.

* Add tests for auto complete.

* Change some text.

* Update changelog.

* Update test to remove branch since it's already included.
iramiller added a commit that referenced this pull request Jan 10, 2024
* Exchange CLI commands (#1732)

* [1701]: Create root tx and query commands and stub out all the sub-commands.

* [1701]: Add some standard flags to the commands.

* [1701]: Do the create-ask and create-bid commands.

* [1701]: Create the cancel-order command.

* [1701]: Commands for fill-asks and fill-bids.

* [1701]: Create the market-settle command. Add the ability to provide a buyer, seller, or signer other than the --from to the other commands.

* [1701]: Reorder the stuff in helpers.go to be alphabetized by the flag.

* [1701]: Rename helpers.go to flags.go so I can extract the cmd flag adds/reads into helpers.go and leave flags.go as the generic more flag stuff.

* [1701]: Refactor a few flag funcs to take in the client context as the first arg since you're supposed to always have the context first (even though it's a secondary thing in these cases, but oh well).

* [1701]: Extract the flag additions and msg creation into helper functions and use those in the commands instead of having them directly in the commands. This should make testing easier since those parts can then be tested without needing to run a command (and fire up a chain).

* [1701]: Create the market-withdraw command. Rename the helpers for consitency.

* [1701]: Create the market-set-external-id command.

* [1701]: Change the comments on the flags adders and MakeMsgs to reference eachother instead of the command.

* [1701]: Create the market-details command.

* [1701]: Create the market-enabled and market-user-settle commands.

* [1701]: Create the market-permissions command.

* [1701]: Create the market-req-attrs command.

* [1701]: Make ParseCoin public.

* [1702]: Create the create-market command.

* [1701]: Get rid of all the simple AddFlagX and ReadFlagX funcs and just put that stuff in the AddFlagsMsgX and MakeMsgX funcs. Swap most of the stuff in helpers.go and flags.go.

* [1701]: Use the new MarkFlagsOneRequired func for enable/disable.

* [1701]: Add tx flags and gov flags before the msg-specific ones. Change MarkFlagRequired into MarkFlagsRequired and take in varargs names. When adding flags, mark all requireds together and add some one-of lists.

* [1701]: Change the create-market command to gov-create-market. Ignore the Long field and just put everything in the Use field because that reads much better in output. Add all the flags to the Use line in the funcs that add the flags. Also add the description sections to the Use field in there too (that stuff used to be in the Long field). Don't include [flags] at the end of the Use output. Don't include help if there's an error generating/sending the tx.

* [1701]: Create the gov-manage-fees command.

* [1701]: Create the gov-update-params command.

* [1701]: Some func reorg in helpers.go and some func renames for standardization.

* [1701]: Create the order-fee-calc query command.

* [1701]: Create the get-order and get-order-by-external-id query commands.

* [1701]: Create the  market-orders, owner-orders, and asset-orders queries. Move Args definition into the flag setters for queries.

* [1701]: Move the Args definition into the flag adders for the tx commands too.

* [1701]: Create the all-orders query command.

* [1701]: Create the market and all-markets query commands.

* [1701]: Split out the command setup funcs into query_setup.go and tx_setup.go. Reorg the stuff in flags.go and helpers.go to hopefully make more sense.

* [1701]: Rename the cmd setup funcs from AddFlags to SetupCmd to better reflect what they're doing.

* [1701]: Move the tx and query flag additions back into the command funcs.

* [1701]: Create the params query.

* [1701]: Create the validate-create-market, validate-market, and validate-manage-fees queries.

* [1701]: Stub out a bunch of TODOs for unit tests and create the CmdTestSuite struct and setup.

* [1701]: Some tweaks to the flags stuff to clean up error messages. Write unit tests on all the flags stuff.

* [1701]: Fix AddQueryExample to not add an ending space if no args are given. Unit tests on the helpers.

* [1701]: Unit tests on all the cmd setup funcs.

* [1701]: Fix a couple of the query makers. Unit tests on all the query makers.

* [1701]: Unit tests on the tx makers.

* [1701]: Create the beginnings of the Cmd tests.

* [1701]: Create ParseCoins to replace sdk.ParseCoinsNormalized similar to ParseCoin.

* [1701]: Add some orders to the cli unit test gen state and write some followup helpers to run some checks.

* [1701]: Lint fixes.

* [1701]: Unit tests on the order-fee-calc and get-order commands.

* [1701]: Unit tests on the order getter commands.

* [1701]: Unit tests on the market and all-markets commands.

* [1701]: Unit tests on the params query.

* [1701]: Unit tests on the validation queries. Query unit tests done.

* [1701]: Unit tests on the create-ask and create-bid endpoints.

* [1701]: Unit tests on the cancel-order command.

* [1701]: Unit tests on the fill-bids, fill-asks, and market-settle endpoints.

* [1701]: Unit tests on the market-set-external-id command.

* [1701]: Unit tests on the market-withdraw, market-update-details, market-update-enabled, and market-update-user-settle commands.

* [1701]: Unit tests on the market-permissions, and market-req-attrs commands.

* [1701]: Unit tests on the gov prop commands.

* [1701]: A light reorg in cli_test.go and a couple lint/compilation fixes.

* [1701]: Wrap all the no xxx provided errors in angle-brackets.

* [1701]: Update ReqAdminDesc to have angle-brackets around stuff. Get rid of the suite's authorityAddr field and just use cli.AuthorityAddr for that. Tweak some comments in helpers.go.

* [1701]: Add the get-params alias to the params command. Tweak a few other comments.

* [1701]: for the create-market and manage-fees commands and validation queries, allow the proposal to be provided via file.

* [1701]: Change ReadFlagBoolOrDefault to pay attention to whether or not the flag was provided rather than trying to just go off the value returned by GetBool. Fix a failing unit test in TestReadFlagAuthority that broke when I changed it to return the default even when there's an error.

* [1701]: Create getSingleMsgFromPropFlag and use that in ReadMsgGovManageFeesRequestFromProposalFlag and ReadMsgGovCreateMarketRequestFromProposalFlag. Add some extra comments in flags.go about assumptions and related funcs.

* [1701]: Add changelog entry.

* [1701]: Add a little reasoning to the comment in ParseCoin.

* [1701]: Update ReqSignerDesc to wrap the field name in angle-brackets (like the other stuff does).

* [1701]: Tweak a couple helper.go descriptions and comments.

* [1701]: Make a function for adding the [--asks|--bids] flags to the queries.

* [1701]: Fix some comments in flags.go.

* [1701]: Fix the addrs used in TestParseAccessGrants.

* [1701]: A little cleanup of cli_test.go.

* [1701]: Tweak the aliases on the query commands.

* [1701]: Tweak the aliases in the tx commands that update or manage market things.

* [1701]: Use --after (instead of --order) for the after_order_id query fields.

* [1701]: Fix some typos.

* [1701]: Update ReadFlagAuthorityOrDefault to use the standard authority as the default if no default is provided.

* [1701]: A little cleanup in query_test.go.

* [1701]: Move the MarkFlagsRequired into flags.go (from helpers.go).

* Add a market to our test/dev chains. (#1759)

* [1757]: Create the add-genesis-default-market and add-genesis-custom-market commands.

* [1757]: Add a call to add-genesis-default-market to the initialize.sh script.

* [1757]: Add a market to the testnet command.

* [1757]: Add a market to the devenet setup.

* [1757]: Make the updateGenesisFileRunE stuff private.

* [1757]: Unit tests on the new cmd helpers and add a check in the testnet unit test.

* [1757]: Unit tests on the two new commands.

* [1757]: Don't tear down the network if it's nil.

* [1757]: remove a call to app.SetConfig in TestPreUpgradeCmd since I'm not sure it's needed and might be causing problems in other tests.

* [1757]: Add changelog entry.

---------

Co-authored-by: Ira Miller <[email protected]>

* Add auto complete. (#1762)

* Add auto complete.

* Add tests for auto complete.

* Change some text.

* Update changelog.

* Update test to remove branch since it's already included.

* Bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#1733)

* Bump github.com/spf13/cobra from 1.7.0 to 1.8.0

Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](spf13/cobra@v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Updated Changelog

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Wedul <[email protected]>

* Deprecate marker proposal transaction (#1798)

* Update command to do nothing, and update long help text to redirect user.

* Update changelog.

* Update tests to say that each previous command fails.

* Add linting fix.

---------

Co-authored-by: Daniel Wedul <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Ira Miller <[email protected]>
Co-authored-by: Matt Witkowski <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
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.

Provenance Auto Completion
3 participants