-
Notifications
You must be signed in to change notification settings - Fork 114
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
Merge and migrate Python API documents into docstring #387
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #387 +/- ##
========================================
Coverage 83.86% 83.86%
========================================
Files 24 24
Lines 8180 8180
========================================
Hits 6860 6860
Misses 1320 1320
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I am not satisfied with the generated API docs because they are too long (for example, |
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.
Thanks @lan496 for a lot of work. I installed autodoc2 using pip and I could generate the documentation using sphinx-autobuild. It looks very good. Originally I never thought spglib python API would be used so much by people. So I made it to be similar to the C functions and the design is not pythonic. Those can be renovated at some point in the future if it will be worth to do it.
@lan496, any docstring style is fine to me. |
*sphinx-style (it can be used for C/C++ code as well), and yes, I would say it's a better interface and rst/md agnostic. 👍 for that format |
Co-authored-by: Cristian Le <[email protected]>
This PR moves Python API documents into docstring of
python/spglib/spglib.py
. autodoc2 is used to generate API documents (which is compatible with myst). It will diminish the burden for document maintenance somewhat.@atztogo Spglib uses numpy-style docstring, but autodoc2 does not support it.
sphinx.ext.napoleon
does not work as well. Do we use sphinx's python-domain directives instead? Autodoc2 seems to support MyST docstring with these directives.https://sphinx-autodoc2.readthedocs.io/en/latest/quickstart.html#using-markdown-myst-docstrings