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

Initial commit for Typer (wallet commands) #1

Merged
merged 48 commits into from
Aug 5, 2024

Conversation

thewhaleking
Copy link
Contributor

@thewhaleking thewhaleking commented Jul 25, 2024

Initial commit for review. All of the wallet commands and config are done/working. There is a delegates command (list) in there as a skeleton, but it is not implemented.

@thewhaleking thewhaleking self-assigned this Jul 25, 2024
@thewhaleking thewhaleking mentioned this pull request Jul 29, 2024
7 tasks
@thewhaleking thewhaleking linked an issue Jul 29, 2024 that may be closed by this pull request
7 tasks
@thewhaleking thewhaleking marked this pull request as ready for review August 1, 2024 21:17
@thewhaleking thewhaleking requested a review from a team August 1, 2024 21:17
@thewhaleking thewhaleking changed the title Initial commit for Typer Initial commit for Typer (wallet commands) Aug 2, 2024
@thewhaleking
Copy link
Contributor Author

thewhaleking commented Aug 2, 2024

Config doesn't work well if chain is set, but you want to use a predefined network. This is largely due to the way that the chain endpoint is set in SubtensorInterface.

This is fixed in #3

Copy link
Contributor

@gus-opentensor gus-opentensor left a comment

Choose a reason for hiding this comment

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

🔥

@thewhaleking thewhaleking merged commit a1733da into main Aug 5, 2024
@thewhaleking thewhaleking deleted the experimental/thewhaleking/typer branch August 5, 2024 19:03
Copy link
Contributor

@roman-opentensor roman-opentensor left a comment

Choose a reason for hiding this comment

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

We have developed and approved the Bittensor Coding Standards. As a programmer, I find it more comfortable to read code that adheres to all aspects of these standards.

I noticed that the docstrings for functions and classes are written in different styles. I suggest contacting Raj to clarify the style used for documentation generation. This will help significantly reduce the time spent on documentation, unify the codebase, and improve code readability.

Overall, I really liked the implementation. Great job!

@@ -0,0 +1,1263 @@
#!/usr/bin/env python3
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this file be a script in the future?

raise typer.Exit()


class CLIManager:
Copy link
Contributor

Choose a reason for hiding this comment

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

pls describe the purpose of the class

return message, bool_result
return obj, True

async def _make_rpc_request(
Copy link
Contributor

Choose a reason for hiding this comment

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

pls add docstring

from dataclasses import dataclass


class Constants:
Copy link
Contributor

Choose a reason for hiding this comment

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

pls describe the class



@dataclass
class DelegatesDetails:
Copy link
Contributor

Choose a reason for hiding this comment

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

pls describe the class

)


class Defaults:
Copy link
Contributor

Choose a reason for hiding this comment

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

pls describe the class

thewhaleking added a commit that referenced this pull request Aug 6, 2024
thewhaleking added a commit that referenced this pull request Aug 6, 2024
thewhaleking added a commit that referenced this pull request Aug 6, 2024
thewhaleking added a commit that referenced this pull request Aug 9, 2024
* `root list` working

* Fixed help output

* Fixed help output

* Fixed the way config for network/chain is handled.

* [WIP] Check-in. Pausing on setting weights until I determine whether we're doing the metagraph approach still.

* Root get-weights

* Circular import temp fix.

* Added root boost command. Not finished as I need to confirm the use of metagraph on it.

* Ruff

* Root boost and root set-weights.

* Code cleanup.

* Code cleanup.

* Feedback from PR #1

* Feedback from PR #1. Docstrings mostly.

* Final PR #1 suggestions I will be implementing.

* In the arena, trying things.

* Boost and Slash created with new logic to parse old weights. Confirming this logic is correct in Discord.

* Senate vote added

* Added `root senate` command.

* Root register command.

* Root proposals

* Root `set-take`

* Root `set-delegate`

* Root `undelegate-stake`

* Docstring.

* [WIP] Check-in

* [WIP] Check-in

* Root `my-delegates`

* Root `list-delegates`

* Root `nominate`, made extrinsics more general for signing and such.

* Ruff and Mypy

* Ruff and Mypy

* Corrected type registry change.
thewhaleking added a commit that referenced this pull request Aug 9, 2024
* `root list` working

* Fixed help output

* Fixed help output

* Fixed the way config for network/chain is handled.

* [WIP] Check-in. Pausing on setting weights until I determine whether we're doing the metagraph approach still.

* Root get-weights

* Circular import temp fix.

* Added root boost command. Not finished as I need to confirm the use of metagraph on it.

* Ruff

* Root boost and root set-weights.

* Code cleanup.

* Code cleanup.

* Feedback from PR #1

* Feedback from PR #1. Docstrings mostly.

* Final PR #1 suggestions I will be implementing.

* In the arena, trying things.

* Boost and Slash created with new logic to parse old weights. Confirming this logic is correct in Discord.

* Senate vote added

* Added `root senate` command.

* Root register command.

* Root proposals

* Root `set-take`

* Root `set-delegate`

* Root `undelegate-stake`

* Docstring.

* [WIP] Check-in

* [WIP] Check-in

* Root `my-delegates`

* Root `list-delegates`

* Root `nominate`, made extrinsics more general for signing and such.

* Ruff and Mypy

* Ruff and Mypy

* Corrected type registry change.
thewhaleking added a commit that referenced this pull request Aug 13, 2024
* `root list` working

* Fixed help output

* Fixed help output

* Fixed the way config for network/chain is handled.

* [WIP] Check-in. Pausing on setting weights until I determine whether we're doing the metagraph approach still.

* Root get-weights

* Circular import temp fix.

* Added root boost command. Not finished as I need to confirm the use of metagraph on it.

* Ruff

* Root boost and root set-weights.

* Code cleanup.

* Code cleanup.

* Feedback from PR #1

* Feedback from PR #1. Docstrings mostly.

* Final PR #1 suggestions I will be implementing.

* In the arena, trying things.

* Boost and Slash created with new logic to parse old weights. Confirming this logic is correct in Discord.

* Senate vote added

* Added `root senate` command.

* Root register command.

* Root proposals

* Root `set-take`

* Root `set-delegate`

* Root `undelegate-stake`

* Docstring.

* [WIP] Check-in

* [WIP] Check-in

* Root `my-delegates`

* Root `list-delegates`

* Root `nominate`, made extrinsics more general for signing and such.

* Ruff and Mypy

* Ruff and Mypy

* [WIP] Initial Commit for stake commands.

* `stake show` command working.

* Root commands (#3)

* `root list` working

* Fixed help output

* Fixed help output

* Fixed the way config for network/chain is handled.

* [WIP] Check-in. Pausing on setting weights until I determine whether we're doing the metagraph approach still.

* Root get-weights

* Circular import temp fix.

* Added root boost command. Not finished as I need to confirm the use of metagraph on it.

* Ruff

* Root boost and root set-weights.

* Code cleanup.

* Code cleanup.

* Feedback from PR #1

* Feedback from PR #1. Docstrings mostly.

* Final PR #1 suggestions I will be implementing.

* In the arena, trying things.

* Boost and Slash created with new logic to parse old weights. Confirming this logic is correct in Discord.

* Senate vote added

* Added `root senate` command.

* Root register command.

* Root proposals

* Root `set-take`

* Root `set-delegate`

* Root `undelegate-stake`

* Docstring.

* [WIP] Check-in

* [WIP] Check-in

* Root `my-delegates`

* Root `list-delegates`

* Root `nominate`, made extrinsics more general for signing and such.

* Ruff and Mypy

* Ruff and Mypy

* Corrected type registry change.

* `stake show` command working.

* `stake get-children` command

* `stake set-children` command

* Added commands to stake_app

* Exception handling and printing.

* Close subtensor.

* Added TODOs

* Fixed the list options in CLI. Began adding stake command.

* Update requirements.txt to use SSH instead of HTTPS for easier cloning

* Fixed interactive prompting and mypy issues.

* Fixed interactive prompting and mypy issues.

* Removed _take_extrinsic logic to the subtensor.sign_and_send_extrinsic method. Added the actual logic for doing the `root set-weights` command to its respective CLI command.

* Mypy

* `stake add` command

* Fixed vecu8

* `stake show` command

* PR Feedback — added docstrings.
thewhaleking added a commit that referenced this pull request Aug 14, 2024
* `root list` working

* Fixed help output

* Fixed help output

* Fixed the way config for network/chain is handled.

* [WIP] Check-in. Pausing on setting weights until I determine whether we're doing the metagraph approach still.

* Root get-weights

* Circular import temp fix.

* Added root boost command. Not finished as I need to confirm the use of metagraph on it.

* Ruff

* Root boost and root set-weights.

* Code cleanup.

* Code cleanup.

* Feedback from PR #1

* Feedback from PR #1. Docstrings mostly.

* Final PR #1 suggestions I will be implementing.

* In the arena, trying things.

* Boost and Slash created with new logic to parse old weights. Confirming this logic is correct in Discord.

* Senate vote added

* Added `root senate` command.

* Root register command.

* Root proposals

* Root `set-take`

* Root `set-delegate`

* Root `undelegate-stake`

* Docstring.

* [WIP] Check-in

* [WIP] Check-in

* Root `my-delegates`

* Root `list-delegates`

* Root `nominate`, made extrinsics more general for signing and such.

* Ruff and Mypy

* Ruff and Mypy

* Corrected type registry change.
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.

Port BTCLI Commands
3 participants