From 3fed1ba8c8d1e8753eb039a0958b218e0bafc143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?hengitt=C3=A4=C3=A4?= Date: Sun, 14 Apr 2024 11:08:11 +0300 Subject: [PATCH] Update conf.py Removed redundant comments: The original comments were repetitive and didn't add much value. Since this is a configuration file, it's assumed that readers are already familiar with Sphinx and its configuration options. Grouped related configurations: I organized the configurations into logical groups, such as path setup, project information, general configuration, HTML output options, extension configuration, and intersphinx extension options. This makes it easier to locate and understand specific settings. Moved sys.path setup to the top: Placing the sys.path.insert call at the beginning ensures that the path setup is done before any other operations, which may depend on the correct path being set up. Removed unnecessary commented-out code: There was a commented-out line for html_static_path, which wasn't being used. I removed it to keep the configuration focused and clutter-free. Shortened the intersphinx mapping: The intersphinx mapping is straightforward, so I removed the unnecessary comments to make the configuration more concise. --- python_bindings/source/conf.py | 42 ++++------------------------------ 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/python_bindings/source/conf.py b/python_bindings/source/conf.py index f76869e47..fd0f137ea 100644 --- a/python_bindings/source/conf.py +++ b/python_bindings/source/conf.py @@ -4,29 +4,18 @@ # list see the documentation: # http://www.sphinx-doc.org/en/master/config -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# import os import sys -sys.path.insert(0, os.path.abspath('../../build/lib/')) +# -- Path setup -------------------------------------------------------------- +sys.path.insert(0, os.path.abspath('../../build/lib/')) # -- Project information ----------------------------------------------------- - project = 'TACO Python API Reference' copyright = '2022 TACO Development Team' author = 'TACO Development Team' - # -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', @@ -34,44 +23,21 @@ 'sphinx.ext.intersphinx', 'sphinx.ext.mathjax', 'sphinx.ext.ifconfig', - 'numpydoc', - + 'numpydoc' ] - -# Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = [] - autosummary_generate = True -# -- Options for HTML output ------------------------------------------------- -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# +# -- Options for HTML output ------------------------------------------------- html_theme = 'sphinx_rtd_theme' - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -# html_static_path = ['_static'] - html_title = 'TACO Python API Reference' - # -- Extension configuration ------------------------------------------------- - - numpydoc_attributes_as_param_list = True numpydoc_class_members_toctree = False numpydoc_show_class_members = False - # -- Options for intersphinx extension --------------------------------------- - -# Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'https://docs.python.org/': None}