Skip to content

Commit

Permalink
Use automodapi and ruff it
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Jan 23, 2025
1 parent 1e544cf commit ab91994
Showing 1 changed file with 30 additions and 22 deletions.
52 changes: 30 additions & 22 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'cheta'
copyright = '2025, Smithsonian Astrophysical Observatory'
author = 'Tom Aldcroft'
project = "cheta"
copyright = "2025, Smithsonian Astrophysical Observatory"
author = "Tom Aldcroft"

# -- Path setup --------------------------------------------------------------
rootpath = Path(__file__).resolve().parents[1]
Expand All @@ -23,32 +23,36 @@

# 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.imgmath',
# 'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'sphinx_copybutton',
'matplotlib.sphinxext.plot_directive',
# 'numpydoc'
]

templates_path = ['_templates']
extensions = [
# "sphinx.ext.autodoc",
# "sphinx.ext.autosummary",
"sphinx.ext.mathjax",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinx_copybutton",
"matplotlib.sphinxext.plot_directive",
"numpydoc",
"sphinx_automodapi.automodapi",
"sphinx_automodapi.smart_resolver",
]

templates_path = ["_templates"]

# Version information from the package.
pkg = importlib.import_module(project)
version = pkg.__version__
release = version

exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# Do not show type hints in the documentation
autodoc_typehints = 'none'
autodoc_typehints = "none"

# -- Options for HTML output ---------------------------------------------------
html_baseurl = f"https://sot.github.io/{project}/"

# The theme to use for HTML and HTML Help pages.
html_theme = 'pydata_sphinx_theme'
html_theme = "pydata_sphinx_theme"

html_theme_options = {
"icon_links": [
Expand All @@ -64,9 +68,7 @@
}

# No left sidebar
html_sidebars = {
"**": []
}
html_sidebars = {"**": []}

# If true, links to the reST sources are added to the pages.
html_show_sourcelink = True
Expand All @@ -76,7 +78,7 @@
copybutton_prompt_is_regexp = True

# Plot directive configuration
plot_formats = ['png']
plot_formats = ["png"]
plot_html_show_formats = False
plot_html_show_source_link = False
plot_pre_code = """\
Expand All @@ -95,5 +97,11 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
}
"numpy": ("http://docs.scipy.org/doc/numpy/", None),
}

automodapi_inheritance_diagram = False
# autosummary_generate = True
# autosummary_imported_members = False

toc_object_entries = False

0 comments on commit ab91994

Please sign in to comment.