You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seeing as there are at least three different contributors to the project, it would be nice if there was a guideline for contributing to the project, such as docstring styles, formatting, and other stuff. Seeing as you are the owner of the project, I believe it would be best if you decided on it. If you want, I can write one based on what you decide. Making the project follow a certain standard makes it easier for new contributors to get used to the code.
Things like spacing between operators and values, tabs-vs-spaces, maximum number of characters per line, could be included.
Regarding docstrings, I'm partial to the following style, using Google docstring formatting and .. math for displaying formulas:
classSaturation(Block):
"""Defines a saturation block. .. math:: output = \\begin{cases} min\_value, & \\textrm{if } input < min\_value max\_value, & \\textrm{if } input > max\_value input, & \\textrm{if } min\_value \leq input \leq max\_value\\end{cases} Args: input_variable (Variable): This is the input of the block. output_variable (Variable): This is the output of the block. min_value: This is the lower bound for the output. max_value: This is the upper bound for the output. """
The text was updated successfully, but these errors were encountered:
I have added the necessary option to the sphinx Makefile, so it renders it beautifully. As can be seen in the generated documentation for the Saturation block here.
Hey there, back again!
Seeing as there are at least three different contributors to the project, it would be nice if there was a guideline for contributing to the project, such as docstring styles, formatting, and other stuff. Seeing as you are the owner of the project, I believe it would be best if you decided on it. If you want, I can write one based on what you decide. Making the project follow a certain standard makes it easier for new contributors to get used to the code.
Things like spacing between operators and values, tabs-vs-spaces, maximum number of characters per line, could be included.
Regarding docstrings, I'm partial to the following style, using Google docstring formatting and
.. math
for displaying formulas:The text was updated successfully, but these errors were encountered: