A newer version of the Gradio SDK is available:
5.35.0
Useful Tips on How to Build the Documentation
Steps
- Install
sphinx
andsphinx_rtd_theme
:pip install sphinx sphinx_rtd_theme
- Create a
docs
directory in the root of the project:mkdir docs
- Create the documentation structure:
cd docs sphinx-quickstart
- Answer the questions as follows:
- Separate source and build directories (y/n) [n]: n
- Project name: PROTAC-Degradation-Predictor
- Author name(s): Your Name
- Project version: v1.0.1
- Answer the questions as follows:
- Edit the
conf.py
file:- Add the following lines:
import os import sys sys.path.insert(0, os.path.abspath('..'))
- Add the following line to the
extensions
list:'sphinx.ext.autodoc',
- Check the current
conf.py
file in this repository for more details.
- Add the following lines:
- Create modules rst files:
sphinx-apidoc -o docs/source/ ./protac_degradation_predictor
- To include modules in the documentation, in
index.rst
, add the following line:source/modules
- Setup the gh-pages branch:
git checkout --orphan gh-pages git reset --hard git commit --allow-empty -m "Init" git push origin gh-pages git checkout main
- Generate the specific workflow Action file:
- See file
.github/workflows/gh-pages.yml
in this repository.
- See file
- The start page is in the file
index.rst
.
Miscellaneous
- Useful guide
- Automatically create modules rst files:
sphinx-apidoc -o source/ ../protac_degradation_predictor
- Then, in
index.rst
, add the following line:source/modules
- Then, in
- Build the documentation:
make clean ; make html