How to add new modules on Sphinx?

58 Views Asked by At

I'm new to Sphinx documentation. Everything works fine, but I added a new module and it's not being added to the documentation...

conf.py:

# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join('..', '..', '..')))

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'cludyn'
copyright = '2024, Abel'
author = 'Abel'
release = '1.0'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ["sphinx.ext.napoleon", "sphinx.ext.viewcode", "sphinx.ext.autodoc"]

templates_path = ['_templates']
exclude_patterns = []



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']

index.rst:

Welcome to cludyn's documentation!
==================================

.. toctree::
   :maxdepth: 2
   :caption: Contents:
   
   modules



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

Structure:

  • cludyn
    • docs (build and source separated).
    • __init__.py
    • materials
      • __init__.py
      • iron.py
      • ironmmonca.py (new file)
    • solvers
      • __init__.py
      • cludyn0.py

I'm running .\make.bat html.

At cludyn.materials.rst, ironmmonca.py is not being added:

cludyn.materials package
========================

Submodules
----------

cludyn.materials.iron module
----------------------------

.. automodule:: cludyn.materials.iron
   :members:
   :undoc-members:
   :show-inheritance:

Module contents
---------------

.. automodule:: cludyn.materials
   :members:
   :undoc-members:
   :show-inheritance:

0

There are 0 best solutions below