-
Notifications
You must be signed in to change notification settings - Fork 44
Plug in Documentation
Provide your users with thorough information of what to expect of a plug-in.
Pyblish QML visualises documentation per-plugin, here are some best practices for writing it along with technical information about how the data is parsed before being displayed.
The following are some guidelines to adhere to when writing documentation for your plug-in, but are in no way mandatory nor have any effect on the operation of Pyblish or Pyblish QML.
- Provide a general understanding of what the plug-in is doing.
- In case of a validator, propose general solutions and best-practices for how to avoid failing.
- Do not provide specific solutions; save those for Exception Messages.
Documentation is taken from the __doc__
member of your plug-in class.
class MyValidator(...):
"""General description
Longer description here.
"""
As per PEP08, the first line of the above docstring is treated as a summary of the below description and used in the GUI right after drawing the name of the plug-in.
The longer portion is then shown when expanded.
If a line should be too long to display in the GUI, the end of it is elided.
Before showing the docstring, it is parsed. Parsing is currently very straightforward and operates on two rules.
- Remove all newlines
- Keep paragraphs
This happens so as to ensure that the maximum amount of space is used in the GUI and to get rid of the leading tabs present in any docstring.
Which means that this...
class MyValidator(...):
"""General description
Longer description
here.
"""
translates into..
General description
Longer description here.
As a side-effect of the above two rules, you cannot make lists or other entries that depend on newlines.