readthedocs do not show the contents of the function and its definition while html shows it

50 Views Asked by At

I am learning about creating the documents in readthedocs. I have created a documentation for a package NiCo which I want to upload in readthedocs so that public can access it. My repository directory has the following file.

(base) agrawal@wviz092 NiCo_Documentation % ls -a 
.           .git            README.md       nico_covariations
..          .gitignore      docs            nico_interactions
.DS_Store       .readthedocs.yaml   nico_annotations    utils


(base) agrawal@wviz092 NiCo_Documentation % ls docs  
Makefile            conf.py             nico_annotations.rst        nico_interactions.rst
_build              index.rst           nico_annotations.utils.rst  requirements.txt
_static             make.bat            nico_covariations.rst       utils.rst
_templates          modules.rst         nico_covariations.utils.rst

I created the docs using following command.

mkdir docs 
cd docs 
sphinx-quickstart 
cd ../
sphinx-apidoc -o docs .   
add manually  modules in line 13 of index.rst file   
cd docs 
make html 

cd .. 
git add . 
git commit -m "Adding NiCo Doc"
git push --set-upstream origin main 

I see the html file created in docs/_build/html/nico_covariations.html And it looks perfect.

When I load the NiCo_Documentation repository via readthedocs then the content of nico_covariations.html file is not visible.

These are the 4 main html views.

index annot interactions covariations

And following is readthedocs view. readthedocs view

conf.py

import os
import sys

sys.path.insert(0,os.path.abspath(".."))

project = 'NiCo'
copyright = '2023,'
author = 'A'
release = '1.0.0'

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

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

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

index.rst

.. NiCo documentation master file, created by
   sphinx-quickstart on Mon Dec 11 23:14:58 2023.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

Welcome to NiCo's documentation!
================================

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

   modules

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

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

Any suggestion why the contents of the function def defined by docstring are missing in the readthedocs. Also I want to make nice contents and other things in readthedocs. If any tutorial exist please inform me. Thanks.

0

There are 0 best solutions below