-
Notifications
You must be signed in to change notification settings - Fork 132
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
Add sybil examples to more files #1586
Conversation
Allow pytest to succeed in environments where sybil is not available.
* Exclude those that we have not yet updated to work with sybil. * Change R""" to r""" to avoid sybil parsing errors.
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.
The PR looks good overall I just have a few small questions/comments.
The example simulation had 0 particles on rank 0, leading to (0,) shape arrays instead of the expected (0,3) shape array.
Co-authored-by: Brandon Butler <[email protected]>
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.
PR looks good. Only some minor comments.
@@ -681,13 +655,13 @@ def categories(self): | |||
|
|||
@property | |||
def string_categories(self): | |||
"""`list` of `str`: A list of the string names of the allowed \ | |||
"""list[str]: A list of the string names of the allowed \ |
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.
"""list[str]: A list of the string names of the allowed \ | |
"""`list` [`str`]: A list of the string names of the allowed \ |
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.
These are parsed correctly as is. The napoleon engine in sphinx understands these type annotations and expands list
and str
to links. We need explicit links only in cases where we add additional text to the type e.g. "list
[str
], optional".
@@ -348,32 +363,74 @@ def set_snapshot(self, snapshot): | |||
|
|||
@property | |||
def particle_types(self): | |||
"""list[str]: List of all particle types in the simulation state.""" | |||
"""list[str]: List of all particle types in the simulation state. |
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.
"""list[str]: List of all particle types in the simulation state. | |
"""`list` [`str`]: List of all particle types in the simulation state. |
Same for all the following
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.
Description
Add sybil examples to all *.py files in the
hoomd
source directory. Also reword some documentation for clarity and reduce the toctree depth.Motivation and context
Provide users with code examples that are tested and known to execute without errors.
How has this been tested?
I executed sybil tests locally (serial CPU build).
Change log
No additional change log is needed over that in #1574.
Checklist:
sphinx-doc/credits.rst
) in the pull request source branch.