-
Notifications
You must be signed in to change notification settings - Fork 351
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
Updating/improving/creating docstring codebase #2310
Updating/improving/creating docstring codebase #2310
Conversation
@@ -163,7 +172,7 @@ def stop(self): | |||
|
|||
class Axon: | |||
""" | |||
The ``axon`` class in Bittensor is a fundamental component that serves as the server-side interface for a neuron within the Bittensor network. | |||
The ``Axon`` class in Bittensor is a fundamental component that serves as the server-side interface for a neuron within the Bittensor network. |
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.
Only needs a single backtick. Not sure where our style of double-backticks comes from
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.
As I understand it, single backtick is used in cases of link and using the keyword :func:
(For example: :func:uvicorn.Server
). And double backticks allow to highlight a word.
@@ -230,9 +230,9 @@ def __abs__(self): | |||
@staticmethod | |||
def from_float(amount: float): | |||
""" | |||
Given tao (float), return Balance object with rao(int) and tao(float), where rao = int(tao*pow(10,9)) | |||
Given tao, return :func:`Balance` object with rao(``int``) and tao(``float``), where rao = int(tao*pow(10,9)) |
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.
is the use of the quotes inside a docstring really necessary?
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.
I would delete. Raj wants to highlight the types of variables. Although they are described below.
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.
I get that. I mean the "Balance"
vs Balance
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.
I see. :func:''Balance''
creates anchor link as #
in HTML. I did it based on what I've seen Raj do. He will ultimately do it the way he wants users to see it :)
a58492a
to
257b9a1
Compare
# Conflicts: # bittensor/core/extrinsics/prometheus.py # bittensor/core/tensor.py # bittensor/utils/__init__.py
The changes contain changes/additions, as well as supplemented and updated examples of code usage.
The approaches to describing type annotations have been changed to bring the code base to consistency.
Other minor changes and refactoring.
DO NOT MERGE without @rajkaramchedu approval