Skip to content
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

Avoid docs build error by removing experimental packages & addressed a lot of the errors and warnings in documentation build #999

Merged
merged 11 commits into from
Feb 9, 2024

Conversation

kristiankyvik
Copy link
Collaborator

@kristiankyvik kristiankyvik commented Feb 6, 2024

Hi,

The sphinx documentation build was failing because of a exception: no module named xxxx error caused by an external dependencies (in this case lama-index) not being available at build time and breaking the building process when running:

python -m sphinx -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html

This PR fixes this error, by properly mocking the llama-index package.

UPDATE:
I ended up taking @ATheorell suggestion and have tried deleting all the experimental dependencies + code that depends on them.

@ATheorell
Copy link
Collaborator

Great that you found a solution to this, however, there is a more radical solution possible that I would prefer. Delete the experimental dependencies and all the code that depends on them. We keep having issues like this for the experimental dependencies and I don't even think anybody is using them. You think you could do this?

@kristiankyvik
Copy link
Collaborator Author

Yes, I think this makes sense, let me have a look at that.

@kristiankyvik kristiankyvik marked this pull request as draft February 6, 2024 18:58
@kristiankyvik kristiankyvik changed the title Avoid docs build error by correctly mocking the llama index package Avoid docs build error by removing experimental packages Feb 6, 2024
@kristiankyvik kristiankyvik marked this pull request as ready for review February 6, 2024 19:37
@kristiankyvik kristiankyvik changed the title Avoid docs build error by removing experimental packages Avoid docs build error by removing experimental packages & addressed a lot of the errors and warnings in documentation build Feb 9, 2024
@kristiankyvik
Copy link
Collaborator Author

I added to the scope of this PR to address a lot of the warning messages that were generated in the build.

We have gone from 164 warnings to 35 warnings. The remaining warnings are related to formatting discrepancies of the docstrings which I expect to be addressed in PR #994.

Please find attached the files containing the logs before and after the last changes.

logs_before.txt
logs_after.txt

@@ -107,7 +106,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting language to english as this was raising an error.

@@ -138,7 +137,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
# html_static_path = ["_static"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented out this setting as this was not being used and it was also generating a warning.

@@ -56,14 +56,6 @@ sphinx-copybutton = ">=0.5.1"
markdown-include = ">=0.6.0"
sphinx_copybutton = ">=0.5.2"

[tool.poetry.group.experimental]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed all experimental dependencies + files depending on them

@@ -202,3 +201,5 @@
myst_enable_extensions = [
"colon_fence",
]

myst_all_links_external = True
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ensures the myst_parser parses all links as hyperlinks. This will remove all the warnings related to links pointing to external files.

@ATheorell ATheorell merged commit 199e8a9 into gpt-engineer-org:main Feb 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants