-
Notifications
You must be signed in to change notification settings - Fork 12
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
Conversation
… us to actually decode the SCALE objects. Refactored the logic of wallet balance to be faster.
…se of block hash in AsyncSubstrateInterface.
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 |
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.
🔥
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.
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 |
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.
Will this file be a script in the future?
raise typer.Exit() | ||
|
||
|
||
class CLIManager: |
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.
pls describe the purpose of the class
return message, bool_result | ||
return obj, True | ||
|
||
async def _make_rpc_request( |
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.
pls add docstring
from dataclasses import dataclass | ||
|
||
|
||
class Constants: |
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.
pls describe the class
|
||
|
||
@dataclass | ||
class DelegatesDetails: |
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.
pls describe the class
) | ||
|
||
|
||
class Defaults: |
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.
pls describe the class
* `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.
* `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.
* `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.
* `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.
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.