2

I have built sphinx documentation for my package. It is working fine when testing localhost. But after uploading it to Github and building docs on readthedocs.org the documentation page is not working which uses autodoc. Here is the link to the Github repository.

https://github.com/SparkDrago05/quick_sqlite

Here is the link to the documentation.

https://quick-sqlite.readthedocs.io/en/latest/index.html

Any help will be appreciated!

1 Answers1

1

In your log file, it states WARNING: autodoc: failed to import class 'QuickSqlite' from module 'quick_sqlite'; the following exception was raised: No module named 'quick_sqlite'

You need to tell RTD to install your module. See: https://docs.readthedocs.io/en/stable/tutorial/index.html#making-warnings-more-visible

The reason sphinx.ext.autosummary and sphinx.ext.autodoc fail to import the code is because it is not installed. Luckily, the .readthedocs.yaml also allows you to specify which requirements to install.

.readthedocs.yaml

python:
  # Install our python package before building the docs
  install:
    - method: pip
      path: .
Steve Piercy
  • 13,693
  • 1
  • 44
  • 57