I am new to Sphinx, and have tried to follow the documentation and guidance from books and YouTube videos. My classes and functions are documented like using autodoc:
class Person:
'''
This class describes a person
'''
def __init__(self):
self.name = ''
self.birth_date = date.today()
self.gender = ''
def set_date_of_birth(self, year: int, month: int, day: int):
'''
Sets the value of the birth date.
:param year: The year.
:param month: The month.
:param day: The day.
:return: None.
'''
self.birth_date = date(year, month, day)
After launching sphinx-quickstart
and make html
afterwards, an index.html
is created that only contains empty Index, Module Index, and Search Page, but no reference to the code whatever.
conf.py
contains extensions as follows:
extensions = [ 'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx'
]
Obviously something is wrong or missing, but what? The test project does not use virtual environment, but a global interpreter instead (Python 3.10, is this of importance?). The project itself is in PyCharm. I would be thankful for a working and comprehensible example.