-
Notifications
You must be signed in to change notification settings - Fork 63
Standardize Success Message Printing with print.success #786
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
Standardize Success Message Printing with print.success #786
Conversation
|
@thewhaleking would you include this PR for the release? |
49a8f26 to
e0f7370
Compare
ibraheem-abe
left a comment
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.
Looks good at first glance.
I think we should use white_heavy_check_mark instead of white_check_mark for the success messages.
And also need to check why the e2e tests broke for the wallet - probably the success assertion need to be looked at - it might be fixed when you change to the heavy mark
@ibraheem-abe it seems testing is failed at very first stage when download linux environment |
|
@ibraheem-abe this is ready to go |
Refactor: Standardize Success Message Printing with
print_successSummary
This PR refactors success message printing across the codebase to use the centralized
print_successutility function frombittensor_cli/src/bittensor/utils.py. This ensures consistent formatting, behavior, and maintainability of success messages throughout the CLI.Changes
Core Functionality
The
print_successfunction provides a standardized way to display success messages::white_check_mark:)print_consoleutilityFiles Modified
Success message printing has been standardized across the following command modules:
Command Modules
Staking Commands (
bittensor_cli/src/commands/stake/)add.py- Stake addition success messagesremove.py- Stake removal finalization messagesmove.py- Stake movement confirmation messagesclaim.py- Stake claim success messageschildren_hotkeys.py- Child hotkey operations success messagesauto_staking.py- Auto-staking configuration messagesCrowdloan Commands (
bittensor_cli/src/commands/crowd/)contribute.py- Contribution success messagescreate.py- Crowdloan creation success messagesSubnet Commands (
bittensor_cli/src/commands/subnets/)subnets.py- Subnet registration and operation success messagesmechanisms.py- Subnet mechanism updates success messagesWallet Commands (
bittensor_cli/src/commands/)wallets.py- Wallet operation success messagesproxy.py- Proxy operation success messagesSudo Commands (
bittensor_cli/src/commands/)sudo.py- Sudo operation success messagesExtrinsic Modules (
bittensor_cli/src/bittensor/extrinsics/)transfer.py- Transfer operation success messagesserving.py- Serving operation success messagesroot.py- Root operation success messagesregistration.py- Registration success messagesOther Modules
cli.py- CLI-level success messagesweights.py- Weight operation success messagesBenefits
Technical Details
Function Signature
Usage Pattern
After:
Impact
Related Issues
Contribution by Gittensor, learn more at https://gittensor.io/