I am trying to genereate docs using Sphinx but I am guessing I have my path set incorrectly or something along those lines. My file structure is as follows:
project_name
docs
build
source
index.rst
conf.py
src
classes
book.py
_init_.py
app.py
Class book.py looks like:
class Book
""" Class that describes a book.
:param title: De pagina waarvan de review is gescraped.
:type title: str
:param publisher: De gebruiker die de review heeft geplaatst.
:type publisher: str
"""
def _init_(self):
self._title = 'Unknown'
self._publiser = 'Unknown'
The file init.py looks like:
from . import Book
I edited the conf.py file for Sphinx and uncommented: import os import sys
sys.path.insert(0, os.path.abspath('../../src/'))
And index.rst looks like:
.. review_scrapers documentation master file, created by
sphinx-quickstart on Fri Mar 26 08:54:56 2021.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to review_scrapers's documentation!
===========================================
.. toctree::
:maxdepth: 2
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Now when I run the following command from my project root:
sphinx-build -b html docs/source/ docs/build/
Sphinx does not seem to find the class I added to my project.
What am I doing wrong here?