Comments (4)
Something like doc = NumpyDocString(NumpyDocString("\n " + TestClass.__doc__)
does the job. However, adding an fixed number of spaces doesn't look stable to me. 😅
Adding something like doc = NumpyDocString("\n " + callable_obj.__doc__)
in L67 of the cli_main leads to a bunch of parsing errors of numpydoc
philiploche@Philips-MacBook-Air:~/repos/mda_cli$ python3 cli_main.py -h
Warning: Unknown section Example
Traceback (most recent call last):
File "cli_main.py", line 372, in <module>
add_to_CLIs(member, analysis_interfaces)
File "cli_main.py", line 67, in add_to_CLIs
doc = NumpyDocString("\n " + callable_obj.__doc__)
File "/usr/local/lib/python3.8/site-packages/numpydoc/docscrape.py", line 147, in __init__
self._parse()
File "/usr/local/lib/python3.8/site-packages/numpydoc/docscrape.py", line 402, in _parse
self['See Also'] = self._parse_see_also(content)
File "/usr/local/lib/python3.8/site-packages/numpydoc/docscrape.py", line 324, in _parse_see_also
raise ParseError("%s is not a item name" % line)
numpydoc.docscrape.ParseError: pmda.density.DensityAnalysis for a parallel version is not a item name in '\n
Seems like there is still some work todo...
from mdacli.
EDIT:
Geez.... I just reproduced your previous answer.... sorry for this lapse :-o (see history of the comment)
I guess we need to study the NumpyDoc parser in detail because it seems is all a matter of giving the proper spaces in the docstring. File here - > https://github.com/numpy/numpydoc/blob/121c327ddbb1394eccef0fc3cb51bdf66979f5c6/numpydoc/docscrape.py#L111
We will continue on this quest, but it seems that definitively we need to change docstrings upstream.
Cheers!
from mdacli.
I am trying to write a general parser we can use to read the docstrings. In the lines of Numpy doc but not so strict and focusing only on our requirements.
from mdacli.
I forgot to set PR #3 to close this issue.
It may be that we need to readdress this with minor modifications to accommodate edge cases on the documentation of the Analysis Classes. If that comes to be the case, we will revisit this issue.
from mdacli.
Related Issues (20)
- mdacli.mdanalysis.org no longer works for docs HOT 8
- fix GitHub pages deployment
- PyPI Readme
- drop py37 HOT 2
- mdacli broken since 0.1.20
- Integration tests HOT 1
- mdacli can't handle choices HOT 1
- Prepare for downstream usage
- use MDA style for docs
- show docs under www.mdanalysis.org HOT 1
- add RTD doc build to required checks in PR HOT 1
- some of the API docs are missing HOT 1
- Code snippet for inspecting arguments of MDA
- fix site_url in docs HOT 1
- docs on RTD contain Google Analytics HOT 2
- incorrect url for sitemap HOT 1
- Limit number of threads used by analysis
- build job fails for every version bump commit in main branch
- Generalize argparsing HOT 1
- mdacli doesn't loop over single frames HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mdacli.