feat: use sphinx to build our API document #1738
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Because our codebase become larger and larger. I find it is inefficiency to see every line code to catch up our latest progress. I prefer to build a API doc for us to do quick browser.
Solution for building API doc:
It is build-in module in python. But find it canot satisfied my requirement, and operation is tedious, I even need to manually generate every sub module by myself.
Sphinx [github] [doc] is a popular open source project to create intelligent and beautiful documentation. After some investigation, I think the final website is better than pydocs. So I choose it.
Not sure whether there exist better open source solution. Sphinx already solve my problem. But welcome any other suggestions.
What this PR do:
I only add the source directory, and ignore the build directory. In this way, we can keep commit clear and small. But when your want to browser the doc, you need to build it manually. I will add some cmd for building in the future PR.
How to run:
Go to
sphinx
directory runmake clean & make html
, then html file will generate insphinx/build
directory. Open index.html in your browser.How to update:
Go to
sphinx
directory, runsphinx-apidoc -o source ../opendevin -f
, then domake clean & make html
.Website example: