HITEN Documentation
This directory contains the Sphinx documentation for the HITEN package.
Building the Documentation
Prerequisites
First, install the documentation dependencies:
pip install -e ".[docs]"
Building HTML Documentation
To build the HTML documentation:
# Using make (Linux/macOS)
make html
# Using make.bat (Windows)
make.bat html
# Using sphinx-build directly
sphinx-build -b html . _build/html
The built documentation will be available in _build/html/index.html
.
Live Development
For live development with automatic rebuilding:
# Install sphinx-autobuild
pip install sphinx-autobuild
# Start live server
make livehtml
# or on Windows: make.bat livehtml
This will start a local server (usually at http://127.0.0.1:8000) that automatically rebuilds the documentation when files change.
Building Other Formats
# PDF documentation
make latexpdf
# EPUB documentation
make epub
Documentation Structure
conf.py
- Sphinx configurationindex.rst
- Main documentation pageinstallation.rst
- Installation guidequickstart.rst
- Quick start guideapi/
- API reference documentationuser_guide/
- User guide documentationexamples/
- Example documentationdeveloper/
- Developer documentation_static/
- Static files (CSS, images, etc.)_templates/
- Custom templates
Adding New Documentation
API Documentation: Add new modules to the appropriate file in
api/
User Guide: Add new guides to
user_guide/
Examples: Add new examples to
examples/
Developer Docs: Add developer information to
developer/
Configuration
The Sphinx configuration is in conf.py
. Key settings:
Extensions: Configured for autodoc, napoleon, math support, etc.
Theme: Uses sphinx-rtd-theme
Autodoc: Automatically generates API docs from docstrings
Math: Supports LaTeX math notation
Cross-references: Configured for Python, NumPy, SciPy, etc.
Troubleshooting
Common Issues
Import errors: Make sure the package is installed in development mode
Missing dependencies: Install all documentation dependencies
Build errors: Check for syntax errors in RST files
Missing modules: Ensure all modules are properly imported in
conf.py
Getting Help
Check the Sphinx documentation
See the sphinx-rtd-theme documentation
Check the GitHub Issues
Contributing
When contributing to the documentation:
Follow the existing style and structure
Use proper RST syntax
Include cross-references where appropriate
Test the build locally before submitting
Update the table of contents if adding new sections