Closed pgleeson closed 2 years ago
Something for @parikshit14 to look into.
Hi @pgleeson, Found what's causing the problem. while parsing
A model of a section of the :class:`Document`.
Will contain one :class:`Paragraph` or more.
parse.long_description
which is present inside def _parse_definition(cls):
skips the first non-empty line.
So what we can do is, we can add a label to the docstring like:
Description:
A model of a section of the :class:`Document`.
Will contain one :class:`Paragraph` or more.
and hence this results with:
"definition": "A model of a section of the :class:`Document`.\nWill contain one :class:`Paragraph` or more."
Hey @parikshit14,
Can you check if it parses the first line into the short_description attribute without modifying the docstring? If so, then I would just concatenate the short and long description if they are both present. I would rather not change the docstring formatting if possible since it is a standard.
@davidt0x, ya that makes more sense. Will create a pull request for it.
Fixed by #14
e.g. this: https://github.com/ModECI/modelspec/blob/0cdcac0f2bd4f139846c6b5ab18518d945ee4cef/examples/document.py#L22-L26
is only the last line in generated docs:
https://github.com/ModECI/modelspec/blob/0cdcac0f2bd4f139846c6b5ab18518d945ee4cef/examples/document.specification.json#L26
Required for proper documentation of MDF...