You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.5 KiB

# Sphinx configuration file
import os
import sys
sys.path.insert(0, os.path.abspath('../src'))
# Project information
project = 'One-Prompt Medical Image Segmentation'
copyright = '2024, One-Prompt Team'
author = 'One-Prompt Team'
version = '1.0.0'
release = '1.0.0'
# Extensions
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.mathjax',
'sphinx.ext.intersphinx',
]
# Napoleon settings for Google-style docstrings
napoleon_google_docstring = True
napoleon_numpy_docstring = True
napoleon_include_init_with_doc = True
napoleon_include_private_with_doc = False
napoleon_include_special_with_doc = True
# Mock imports for documentation building
autodoc_mock_imports = [
'torch',
'torchvision',
'numpy',
'pandas',
'monai',
'PIL',
'cv2',
'skimage',
'einops',
'tensorboardX',
'sklearn',
'matplotlib',
'seaborn',
'tqdm',
'dateutil',
]
# Intersphinx mapping
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'torch': ('https://pytorch.org/docs/stable/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
}
# HTML theme
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
# Source file settings
source_suffix = '.rst'
master_doc = 'index'
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# Autodoc settings
autodoc_default_options = {
'members': True,
'member-order': 'bysource',
'special-members': '__init__',
'undoc-members': True,
'exclude-members': '__weakref__'
}