From fa027a37293cc550f0233e9933dd3348e86ce70e Mon Sep 17 00:00:00 2001 From: MLDataAnalytics <128093454+MLDataAnalytics@users.noreply.github.com> Date: Sat, 10 Aug 2024 08:44:52 -0400 Subject: [PATCH 1/2] Update conf.py --- docs/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 62f06f3..1fcb60b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,7 +27,8 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ["myst_parser"] +extensions = ["myst_parser", + "sphinx.ext.autodoc"] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] From f0453c93943dbf0ce78bb0dc3af20f05191f1884 Mon Sep 17 00:00:00 2001 From: MLDataAnalytics <128093454+MLDataAnalytics@users.noreply.github.com> Date: Sat, 10 Aug 2024 08:58:16 -0400 Subject: [PATCH 2/2] Update conf.py --- docs/conf.py | 71 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 62 insertions(+), 9 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 1fcb60b..6b3b65a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,16 +10,17 @@ # 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('.')) +import os +import sys +sys.path.insert(0, os.path.abspath('..')) # -- Project information ----------------------------------------------------- project = 'pNet' -copyright = '2024, Yong Fan' -author = 'Yong Fan' +copyright = '2024, pNet developers' +# The full version, including alpha/beta/rc tags +release = '1.0.1' # -- General configuration --------------------------------------------------- @@ -27,26 +28,78 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ["myst_parser", - "sphinx.ext.autodoc"] +extensions = ['myst_parser', + 'sphinx.ext.autodoc', + 'sphinx.ext.viewcode', + 'sphinx.ext.napoleon', + 'sphinx.ext.autosummary', + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.mathjax', + 'sphinx.ext.viewcode', + 'sphinxarg.ext', + 'sphinx_gallery.gen_gallery', + 'matplotlib.sphinxext.plot_directive'] + +# Generate the API documentation when building +autosummary_generate = True +autodoc_default_options = {'members': True, 'inherited-members': True} +numpydoc_show_class_members = False +autoclass_content = "class" + +napoleon_google_docstring = False +napoleon_numpy_docstring = True +napoleon_include_init_with_doc = False +napoleon_include_special_with_doc = False +napoleon_use_param = True +napoleon_use_ivar = True +napoleon_use_rtype = False + +napoleon_include_private_with_doc = False # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] +# The suffix(es) of source filenames. +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + # 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 = ['_build', 'Thumbs.db', '.DS_Store'] +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -# -html_theme = 'alabaster' +import sphinx_rtd_theme # noqa +html_theme = 'sphinx_rtd_theme' +html_show_sourcelink = False + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +html_theme_options = {} # 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'] + +# CSS files to include +html_css_files = ['theme_overrides.css'] + +# -- Options for HTMLHelp output --------------------------------------------- +# Output file base name for HTML help builder. +htmlhelp_basename = 'pNetdoc' + +doctest_global_setup = """\ +import numpy as np +np.random.seed(1234)\ +"""