-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Ensure sphinx correctly parses docstrings #991
Ensure sphinx correctly parses docstrings #991
Conversation
…ing the documentation
… was blocking us from upgrading to sphinx 5.0.0
@@ -65,7 +65,6 @@ | |||
"sphinx.ext.napoleon", | |||
"sphinx.ext.viewcode", | |||
"sphinx_copybutton", | |||
"sphinx_panels", |
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.
Please note that I removed this package because I wanted to update sphinx to 5.0.0 since:
@@ -86,6 +85,7 @@ | |||
autodoc_member_order = "groupwise" | |||
autoclass_content = "both" | |||
autodoc_typehints_format = "short" | |||
autodoc_mock_imports = ["tree_sitter_languages", "llama-index"] |
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.
After updating sphinx to 5.0.0, when building the docs, I was running into a different error:
Handler <function process_automodsumm_generation at 0x7fedb8d30430> for event 'builder-inited' threw an exception (exception: No module named 'gpt_engineer.tools.experimental.document_chunker')
make: *** [html] Error 2
I followed the advice here and ensure that the two files were mocked when building the docs. This fixed the issue.
53b3d60
to
4750a22
Compare
… into ensure-sphinx-correctly-parses-docstrings
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.
looks good thank you
This addresses task 1 of this issue: #990
Here are the main changes:
api_reference.rst
is now up-to-date after running thecreate_api_rst.py
locally and committing the generated files. Not sure it makes sense to commit all these files or if we simply want to generate them when we build the projectcreate_api_rst.py
script in the pre_build step. I think this makes sense, but please let me know if you thing differently. I took inspiration from how the langchain project seems to have solved thisUpdate 1 - Did the two following changes:
sphinx_panels
that required an older version of sphinxUpdate 2 - Did the following change: