-
Notifications
You must be signed in to change notification settings - Fork 37
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
Update MLI docstrings part 2 #699
Conversation
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 great! I have a few comments that I'd like to be addressed and then I think it's good to merge
|
||
:param descriptor: The descriptor that uniquely identifies the resource | ||
:returns: An attached DragonFLIChannel""" | ||
:returns: An attached DragonFLIChannel | ||
:raises: If creation of DragonFLIChanenel fails |
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.
What type of error does it raise?
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.
(if we raise whatever is raised by the underlying call, do we need to document it? Asking because I really don't know what we should do. Should we re-cast the Exception to something we own?)
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.
Oops I forgot to come back to this one! I actually don't know what error this raises, but I could raise a SmartSimError
. As far as what to do about documenting exceptions and where, that's something I'm trying to work through in my error handling ticket as well. If we explicitly raise something here then I think we document it.
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.
For now, I just did :raises Exception:
and I can make the changes to what exactly gets raised in the error handling ticket, if that's okay!
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.
LGTM, thanks for taking care of those small details I pointed out!
Part 2 of docstring updates! Keeping the description as a refresher.
I added and updated the MLI docstrings so that everything renders correctly and they are more consistent. This means I needed to make some decisions on what "consistent" means, because there were many different combinations going on. Feel free to push back on these! I just went with what looked like the best/what we were doing the most.
:param:
,:returns:
, etc do not use punctuation to end their description line UNLESS the line needs multiple sentences, in which case, use punctuation. (I think this happens once or twice).example: