Standardize Success Message Printing with print.success#786
Standardize Success Message Printing with print.success#786ibraheem-abe merged 14 commits intoopentensor:stagingfrom
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.
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 |
* feat: add the print_success util * feat: refactor with print_success * fix: update with print_success and print_error * ruff format * fix: revert cli * fix: update the util for print_success * fix: update the print_error and revert print_success for remove.py file * hotfix: add the missing character * fix: change to white_check_mark * fix: revert to white_heavy_check_mark * fix: revert print_success for wallet and few consol from utils * ruff format * fix: revert in the e2e util * ruff format
* feat: add the print_success util * feat: refactor with print_success * fix: update with print_success and print_error * ruff format * fix: revert cli * fix: update the util for print_success * fix: update the print_error and revert print_success for remove.py file * hotfix: add the missing character * fix: change to white_check_mark * fix: revert to white_heavy_check_mark * fix: revert print_success for wallet and few consol from utils * ruff format * fix: revert in the e2e util * ruff format
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/