106 lines
2.6 KiB
Python
106 lines
2.6 KiB
Python
"""Sphinx configuration for OpenClaw Trading documentation."""
|
|
|
|
import os
|
|
import sys
|
|
from datetime import datetime
|
|
|
|
# Add src to path for autodoc
|
|
sys.path.insert(0, os.path.abspath('../../src'))
|
|
|
|
# Project information
|
|
project = 'OpenClaw Trading'
|
|
copyright = f'{datetime.now().year}, OpenClaw Team'
|
|
author = 'OpenClaw Team'
|
|
version = '0.1.0'
|
|
release = '0.1.0'
|
|
|
|
# General configuration
|
|
extensions = [
|
|
'sphinx.ext.autodoc',
|
|
'sphinx.ext.viewcode',
|
|
'sphinx.ext.napoleon',
|
|
'sphinx.ext.intersphinx',
|
|
'sphinx.ext.autosummary',
|
|
'sphinx.ext.githubpages',
|
|
]
|
|
|
|
templates_path = ['_templates']
|
|
exclude_patterns = []
|
|
|
|
# HTML output options
|
|
html_theme = 'sphinx_rtd_theme'
|
|
html_static_path = ['_static']
|
|
html_title = 'OpenClaw Trading Documentation'
|
|
html_short_title = 'OpenClaw'
|
|
|
|
# Autodoc settings
|
|
autodoc_default_options = {
|
|
'members': True,
|
|
'member-order': 'bysource',
|
|
'special-members': '__init__',
|
|
'undoc-members': True,
|
|
'exclude-members': '__weakref__',
|
|
'show-inheritance': True,
|
|
}
|
|
|
|
autodoc_typehints = 'description'
|
|
autodoc_typehints_format = 'short'
|
|
|
|
# Napoleon settings (for Google/NumPy style docstrings)
|
|
napoleon_google_docstring = True
|
|
napoleon_numpy_docstring = False
|
|
napoleon_include_init_with_doc = True
|
|
napoleon_include_private_with_doc = False
|
|
napoleon_include_special_with_doc = True
|
|
napoleon_use_admonition_for_examples = True
|
|
napoleon_use_admonition_for_notes = True
|
|
napoleon_use_admonition_for_references = True
|
|
napoleon_use_ivar = False
|
|
napoleon_use_param = True
|
|
napoleon_use_rtype = True
|
|
napoleon_preprocess_types = True
|
|
napoleon_type_aliases = None
|
|
napoleon_attr_annotations = True
|
|
|
|
# Intersphinx mapping
|
|
intersphinx_mapping = {
|
|
'python': ('https://docs.python.org/3', None),
|
|
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
|
|
'numpy': ('https://numpy.org/doc/stable/', None),
|
|
}
|
|
|
|
# Autosummary
|
|
autosummary_generate = True
|
|
autosummary_imported_members = False
|
|
|
|
# Mock imports for modules that may fail to import
|
|
doc_mock_imports = [
|
|
'openclaw',
|
|
'openclaw.core',
|
|
'openclaw.agents',
|
|
'openclaw.workflow',
|
|
'openclaw.backtest',
|
|
'openclaw.factor',
|
|
'openclaw.learning',
|
|
'openclaw.portfolio',
|
|
'openclaw.exchange',
|
|
'openclaw.monitoring',
|
|
'openclaw.strategy',
|
|
'openclaw.data',
|
|
'openclaw.trading',
|
|
'openclaw.evolution',
|
|
'openclaw.memory',
|
|
'openclaw.optimizer',
|
|
'openclaw.comparison',
|
|
'openclaw.dashboard',
|
|
'openclaw.fusion',
|
|
'openclaw.debate',
|
|
'openclaw.indicators',
|
|
'openclaw.cli',
|
|
'openclaw.utils',
|
|
'pandas',
|
|
'numpy',
|
|
'langgraph',
|
|
'langchain',
|
|
]
|