Skip to content

BTSDK: Move do* methods to related extrinsic#2286

Merged
basfroman merged 16 commits intobtsdkfrom
feat/roman/move-underscored-methods-to-extrinsics
Sep 10, 2024
Merged

BTSDK: Move do* methods to related extrinsic#2286
basfroman merged 16 commits intobtsdkfrom
feat/roman/move-underscored-methods-to-extrinsics

Conversation

@basfroman
Copy link
Collaborator

@basfroman basfroman commented Sep 5, 2024

  • all calls to the network are consolidated in related extrinsiсs
  • improved bittensor.utils.networking.ensure_connected logic and description
  • removed unused calls and methods from subtensor
  • all extrinsics returns formatter subtensor errors

@basfroman basfroman self-assigned this Sep 5, 2024
@basfroman basfroman added enhancement New feature or request bittensor labels Sep 5, 2024
@basfroman basfroman requested a review from a team September 5, 2024 19:40
@basfroman basfroman changed the title feat/roman/move-underscored-methods-to-extrinsics BTSDK: Move do* methods to related extrinsic Sep 6, 2024
Copy link
Contributor

@thewhaleking thewhaleking left a comment

Choose a reason for hiding this comment

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

Only blocker is the docstring update. Others are just questions/tips.

# DEALINGS IN THE SOFTWARE.

from typing import Union, TYPE_CHECKING
from typing import Dict, Tuple, Optional, Union, TYPE_CHECKING
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need Dict or Tuple.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I need this because of the linter doesn't want to see dict and tuple instead of Dict and Tuple as type annotation. It's complaints.

import pytest

import bittensor
# import bittensor
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this line just be entirely removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

deferentially. good catch!

@@ -37,6 +105,7 @@ def commit_weights_extrinsic(
"""
Commits a hash of the neuron's weights to the Bittensor blockchain using the provided wallet.
This function is a wrapper around the `_do_commit_weights` method, handling user prompts and error messages.
Copy link
Contributor

Choose a reason for hiding this comment

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

Update docstring.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

…try" has incompatible type "LoggingMachine"; expected "Logger | None" [arg-type]`
@basfroman basfroman merged commit e0ad585 into btsdk Sep 10, 2024
@basfroman basfroman deleted the feat/roman/move-underscored-methods-to-extrinsics branch September 10, 2024 00:40
@ibraheem-abe ibraheem-abe mentioned this pull request Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants