Skip to content

Commit

Permalink
[Docs & Bugs] Minor fixes post keybase changes (#513)
Browse files Browse the repository at this point in the history
## Description

Fixing a few minor documentation related and linter related errors on main from recent changes.

## Issue

Fixes #NA

## Type of change

Please mark the relevant option(s):

- [ ] New feature, functionality or library
- [x] Bug fix
- [x] Code health or cleanup
- [ ] Major breaking change
- [x] Documentation
- [ ] Other <!-- add details here if it a different type of change -->

## List of changes

- Tended to a few simple linter checks not addressed on main: added `nolint`
- Add a BUG comment related to the keybase: doesn't work from built binary
- Ran `make generate_cli_commands_docs` (after a minor fix) to update the swagger documentation
- Fixed `make send_local_tx` to use accounts in the keybase

## Testing

- [x] `make develop_test`
- [ ] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README`

## Required Checklist

- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have tested my changes using the available tooling
- [ ] I have updated the corresponding CHANGELOG

### If Applicable Checklist

- [ ] I have updated the corresponding README(s); local and/or global
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s)
- [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s)
  • Loading branch information
Olshansk authored Feb 15, 2023
1 parent c167ad4 commit 8f8d4fb
Show file tree
Hide file tree
Showing 45 changed files with 175 additions and 111 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,10 @@ benchmark_p2p_addrbook: ## Benchmark all P2P addr book related tests
# DEPRECATE - Code that should be removed in the future
# RESEARCH - A non-trivial action item that requires deep research and investigation being next steps can be taken
# DOCUMENT - A comment that involves the creation of a README or other documentation
# BUG - There is a known existing bug in this code
# DISCUSS_IN_THIS_COMMIT - SHOULD NEVER BE COMMITTED TO MASTER. It is a way for the reviewer of a PR to start / reply to a discussion.
# TODO_IN_THIS_COMMIT - SHOULD NEVER BE COMMITTED TO MASTER. It is a way to start the review process while non-critical changes are still in progress
TODO_KEYWORDS = -e "TODO" -e "TECHDEBT" -e "IMPROVE" -e "DISCUSS" -e "INCOMPLETE" -e "INVESTIGATE" -e "CLEANUP" -e "HACK" -e "REFACTOR" -e "CONSIDERATION" -e "TODO_IN_THIS_COMMIT" -e "DISCUSS_IN_THIS_COMMIT" -e "CONSOLIDATE" -e "DEPRECATE" -e "ADDTEST" -e "RESEARCH"
TODO_KEYWORDS = -e "TODO" -e "TECHDEBT" -e "IMPROVE" -e "DISCUSS" -e "INCOMPLETE" -e "INVESTIGATE" -e "CLEANUP" -e "HACK" -e "REFACTOR" -e "CONSIDERATION" -e "TODO_IN_THIS_COMMIT" -e "DISCUSS_IN_THIS_COMMIT" -e "CONSOLIDATE" -e "DEPRECATE" -e "ADDTEST" -e "RESEARCH" -e "BUG"

# How do I use TODOs?
# 1. <KEYWORD>: <Description of follow up work>;
Expand Down Expand Up @@ -499,4 +500,4 @@ check_cross_module_imports: ## Lists cross-module imports

.PHONY: send_local_tx
send_local_tx: ## A hardcoded send tx to make LocalNet debugging easier
p1 --path_to_private_key_file=build/pkeys/val1.json Account Send 6f66574e1f50f0ef72dff748c3f11b9e0e89d32a 67eb3f0a50ae459fecf666be0e93176e92441317 1000
go run app/client/*.go Account Send 00104055c00bed7c983a48aac7dc6335d7c607a7 00204737d2a165ebe4be3a7d5b0af905b0ea91d8 1000
15 changes: 14 additions & 1 deletion app/client/cli/docgen/main.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
package main

import (
"os"
"path/filepath"

"github.com/pokt-network/pocket/app/client/cli"
"github.com/pokt-network/pocket/logger"

"github.com/spf13/cobra/doc"
)

func main() {
workingDir, err := os.Getwd()
if err != nil {
logger.Global.Fatal().Err(err).Msg("failed to get working directory")
}

docsPath, err := filepath.Abs(workingDir + "/../../doc/commands")
if err != nil {
logger.Global.Fatal().Err(err).Msg("failed to get absolute path")
}

cmd := cli.GetRootCmd()
err := doc.GenMarkdownTree(cmd, "../doc/commands")
err = doc.GenMarkdownTree(cmd, docsPath)
if err != nil {
logger.Global.Fatal().Err(err).Msg("failed to generate markdown tree")
}
Expand Down
5 changes: 5 additions & 0 deletions app/client/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.0.0.13] - 2023-02-14

- Fixed `docgen` to work from the root of the repository
- Updated all the CLI docs

## [0.0.0.12] - 2023-02-14

- Integrate keybase with CLI
Expand Down
9 changes: 5 additions & 4 deletions app/client/doc/commands/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ The CLI is meant to be an user but also a machine friendly way for interacting w
### Options

```
-h, --help help for client
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
-h, --help help for client
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO
Expand All @@ -24,5 +24,6 @@ The CLI is meant to be an user but also a machine friendly way for interacting w
* [client Node](client_Node.md) - Node actor specific commands
* [client System](client_System.md) - Commands related to health and troubleshooting of the node instance
* [client Validator](client_Validator.md) - Validator actor specific commands
* [client debug](client_debug.md) - Debug utility for rapid development

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
9 changes: 4 additions & 5 deletions app/client/doc/commands/client_Account.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@ Account specific commands
### Options

```
-h, --help help for Account
--pwd string passphrase used by the cmd, non empty usage bypass interactive prompt
-h, --help help for Account
```

### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client](client.md) - Pocket Network Command Line Interface (CLI)
* [client Account Send](client_Account_Send.md) - Send <fromAddr> <to> <amount>

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
9 changes: 5 additions & 4 deletions app/client/doc/commands/client_Account_Send.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ client Account Send <fromAddr> <to> <amount> [flags]
### Options

```
-h, --help help for Send
-h, --help help for Send
--pwd string passphrase used by the cmd, non empty usage bypass interactive prompt
```

### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client Account](client_Account.md) - Account specific commands

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Application.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Application actor specific commands
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO
Expand All @@ -23,4 +23,4 @@ Application actor specific commands
* [client Application Unpause](client_Application_Unpause.md) - Unpause <fromAddr>
* [client Application Unstake](client_Application_Unstake.md) - Unstake <fromAddr>

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Application_EditStake.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ client Application EditStake <fromAddr> <amount> <relayChainIDs> <serviceURI> [f
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client Application](client_Application.md) - Application actor specific commands

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Application_Stake.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ client Application Stake <fromAddr> <amount> <relayChainIDs> <serviceURI> [flags
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client Application](client_Application.md) - Application actor specific commands

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Application_Unpause.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ client Application Unpause <fromAddr> [flags]
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client Application](client_Application.md) - Application actor specific commands

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Application_Unstake.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ client Application Unstake <fromAddr> [flags]
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client Application](client_Application.md) - Application actor specific commands

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Consensus.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Consensus specific commands
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO
Expand All @@ -23,4 +23,4 @@ Consensus specific commands
* [client Consensus State](client_Consensus_State.md) - Returns "Height/Round/Step"
* [client Consensus Step](client_Consensus_Step.md) - Returns the Step

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Consensus_Height.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ client Consensus Height [flags]
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client Consensus](client_Consensus.md) - Consensus specific commands

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Consensus_Round.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ client Consensus Round [flags]
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client Consensus](client_Consensus.md) - Consensus specific commands

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Consensus_State.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ client Consensus State [flags]
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client Consensus](client_Consensus.md) - Consensus specific commands

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Consensus_Step.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ client Consensus Step [flags]
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client Consensus](client_Consensus.md) - Consensus specific commands

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Fisherman.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Fisherman actor specific commands
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO
Expand All @@ -23,4 +23,4 @@ Fisherman actor specific commands
* [client Fisherman Unpause](client_Fisherman_Unpause.md) - Unpause <fromAddr>
* [client Fisherman Unstake](client_Fisherman_Unstake.md) - Unstake <fromAddr>

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Fisherman_EditStake.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ client Fisherman EditStake <fromAddr> <amount> <relayChainIDs> <serviceURI> [fla
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client Fisherman](client_Fisherman.md) - Fisherman actor specific commands

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Fisherman_Stake.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ client Fisherman Stake <fromAddr> <amount> <relayChainIDs> <serviceURI> [flags]
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client Fisherman](client_Fisherman.md) - Fisherman actor specific commands

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Fisherman_Unpause.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ client Fisherman Unpause <fromAddr> [flags]
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client Fisherman](client_Fisherman.md) - Fisherman actor specific commands

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Fisherman_Unstake.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ client Fisherman Unstake <fromAddr> [flags]
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client Fisherman](client_Fisherman.md) - Fisherman actor specific commands

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
6 changes: 3 additions & 3 deletions app/client/doc/commands/client_Governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Governance specific commands
### Options inherited from parent commands

```
--path_to_private_key_file string Path to private key to use when signing (default "./pk.json")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
--data_dir string Path to store pocket related data (keybase etc.) (default "/Users/olshansky/.pocket")
--remote_cli_url string takes a remote endpoint in the form of <protocol>://<host> (uses RPC Port) (default "http://localhost:50832")
```

### SEE ALSO

* [client](client.md) - Pocket Network Command Line Interface (CLI)
* [client Governance ChangeParameter](client_Governance_ChangeParameter.md) - ChangeParameter <owner> <key> <value>

###### Auto generated by spf13/cobra on 9-Nov-2022
###### Auto generated by spf13/cobra on 14-Feb-2023
Loading

0 comments on commit 8f8d4fb

Please sign in to comment.