-
Notifications
You must be signed in to change notification settings - Fork 7
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
More tolerant docstring parser #31
Comments
I had committed a |
Example by @PicoCentauri
|
|
try again numpydocs. where docstrings updated in mda since #2 ? |
I just checked the numpydocs parser and they are still not able to parse docstrings without surrounding spaces... |
Yes, I tried the other day and I saw it was also a bit of a mess. I think we (ok me 😛 ) should write this more general parser, that is also compatible with the synphx parsing and than create tests on the side of MDAnalysis to enforce new Analysis classes follow these guidelines. |
Our current docstring parser located at
mdacli/src/mdacli/utils.py
Line 163 in 78fa3f2
returns a dictionary of the the docstring. It works but it is not as flexible and tolerant as the sphinx/napoleon implementation. Especially we have problems with the separator between a parameter name and its type; usually denoted by
name : type
. A different notation can not be parsed since we use a hardcoded splitmdacli/src/mdacli/utils.py
Lines 230 to 232 in 78fa3f2
Improvements with using a regex did also not succeed. If possible we should incorporate the sphinx parser or at least get some ideas from their implementation.
The text was updated successfully, but these errors were encountered: